jordw / heftydb Goto Github PK
View Code? Open in Web Editor NEWHigh performance persistent LSM key-value store library for the JVM.
License: Apache License 2.0
High performance persistent LSM key-value store library for the JVM.
License: Apache License 2.0
Execution error (ArithmeticException) at com.jordanwilliams.heftydb.offheap.BloomFilter$Builder/hashFunctionCount (BloomFilter.java:64).
/ by zero
{:clojure.main/message
"Execution error (ArithmeticException) at com.jordanwilliams.heftydb.offheap.BloomFilter$Builder/hashFunctionCount (BloomFilter.java:64).\n/ by zero\n",
:clojure.main/triage
{:clojure.error/class java.lang.ArithmeticException,
:clojure.error/line 64,
:clojure.error/cause "/ by zero",
:clojure.error/symbol
com.jordanwilliams.heftydb.offheap.BloomFilter$Builder/hashFunctionCount,
:clojure.error/source "BloomFilter.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message "Syntax error macroexpanding at (app1.clj:20:9).",
:data
{:clojure.error/phase :execution,
:clojure.error/line 20,
:clojure.error/column 9,
:clojure.error/source "app1.clj"},
:at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3707]}
{:type java.lang.ArithmeticException,
:message "/ by zero",
:at
[com.jordanwilliams.heftydb.offheap.BloomFilter$Builder
hashFunctionCount
"BloomFilter.java"
64]}],
:trace
[[com.jordanwilliams.heftydb.offheap.BloomFilter$Builder
hashFunctionCount
"BloomFilter.java"
64]
[com.jordanwilliams.heftydb.offheap.BloomFilter$Builder
"BloomFilter.java"
39]
[com.jordanwilliams.heftydb.table.file.TableBloomFilterWriter
"TableBloomFilterWriter.java"
39]
[com.jordanwilliams.heftydb.table.file.TableBloomFilterWriter
open
"TableBloomFilterWriter.java"
57]
[com.jordanwilliams.heftydb.table.file.FileTableWriter
open
"FileTableWriter.java"
223]
[com.jordanwilliams.heftydb.table.file.FileTableWriter$Task
run
"FileTableWriter.java"
138]
[com.jordanwilliams.heftydb.db.DBInitializer
writeTablesFromLogs
"DBInitializer.java"
99]
[com.jordanwilliams.heftydb.db.DBInitializer
initialize
"DBInitializer.java"
59]
[com.jordanwilliams.heftydb.db.HeftyDB open "HeftyDB.java" 200]
[app1$db_open invokeStatic "app1.clj" 16]
[app1$db_open invoke "app1.clj" 14]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3702]
[clojure.lang.Compiler$DefExpr eval "Compiler.java" 457]
[clojure.lang.Compiler eval "Compiler.java" 7182]
[clojure.lang.Compiler load "Compiler.java" 7636]
[clojure.lang.Compiler loadFile "Compiler.java" 7574]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$script_opt invokeStatic "main.clj" 535]
[clojure.main$script_opt invoke "main.clj" 530]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause "/ by zero",
:phase :execution}}
Would be great to have some sort of GitHub release so that its easier to grab the HeftyDb lib
Reference the code: https://github.com/jordw/heftydb/blob/master/src/main/java/com/jordanwilliams/heftydb/table/file/FileTableWriter.java#L201-L212 ,I find heftydb storage data by block, and use the block start key as the index record. I have a question, if we search the data key is not the start key, how should we find the right index. For example
If we search the key "mykey:07", Should we hit the index record "block-01" or "block-02" ?
java.lang.ArithmeticException: / by zero
at com.jordanwilliams.heftydb.offheap.BloomFilter$Builder.hashFunctionCount(BloomFilter.java:64)
at com.jordanwilliams.heftydb.offheap.BloomFilter$Builder.<init>(BloomFilter.java:39)
at com.jordanwilliams.heftydb.table.file.TableBloomFilterWriter.<init>(TableBloomFilterWriter.java:39)
at com.jordanwilliams.heftydb.table.file.TableBloomFilterWriter.open(TableBloomFilterWriter.java:57)
at com.jordanwilliams.heftydb.table.file.FileTableWriter.open(FileTableWriter.java:223)
at com.jordanwilliams.heftydb.table.file.FileTableWriter$Task.run(FileTableWriter.java:138)
at com.jordanwilliams.heftydb.db.DBInitializer.writeTablesFromLogs(DBInitializer.java:99)
at com.jordanwilliams.heftydb.db.DBInitializer.initialize(DBInitializer.java:59)
at com.jordanwilliams.heftydb.db.HeftyDB.open(HeftyDB.java:200)
at com.jordanwilliams.heftydb.test.DbTest.main(DbTest.java:19)
I think this issue is cased by commit.log is empty, so we should judge itγ According to: https://github.com/jordw/heftydb/blob/master/src/main/java/com/jordanwilliams/heftydb/db/DBInitializer.java#L92
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.