dain/leveldb — Issue #7: RuntimeException: Could not open table occurs when you run the DbBenchmark
Author: chirino
Created: 2012-01-06 01:22:05+00:00
State: open

When you run the DbBenchmark with the following arguments:
--num=1000000 --benchmarks=fillrandom,readseq

It produces the following error:

LevelDB: iq80 leveldb version 0.2-SNAPSHOT
Date: Thu Jan 05 20:18:11 EST 2012
Keys: 16 bytes each
Values: 100 bytes each (50 bytes after compression)
Entries: 1000000
RawSize: 110.6 MB (estimated)
FileSize: 62.9 MB (estimated)
------------------------------------------------
fillrandom : 9.326 micros/op; 11.9 MB/s
... finished 1700000 ops Exception in thread "main" java.lang.RuntimeException: Could not open table 74
at org.iq80.leveldb.impl.TableCache.getTable(TableCache.java:95)
at org.iq80.leveldb.impl.TableCache.newIterator(TableCache.java:77)
at org.iq80.leveldb.impl.TableCache.newIterator(TableCache.java:72)
at org.iq80.leveldb.util.LevelIterator.openNextFile(LevelIterator.java:118)
at org.iq80.leveldb.util.LevelIterator.getNextElement(LevelIterator.java:94)
at org.iq80.leveldb.util.AbstractSeekingIterator.hasNext(AbstractSeekingIterator.java:30)
at org.iq80.leveldb.util.DbIterator$ComparableIterator.next(DbIterator.java:216)
at org.iq80.leveldb.util.DbIterator.getNextElement(DbIterator.java:87)
at org.iq80.leveldb.util.AbstractSeekingIterator.hasNext(AbstractSeekingIterator.java:30)
at org.iq80.leveldb.impl.SnapshotSeekingIterator.findNextUserEntry(SnapshotSeekingIterator.java:98)
at org.iq80.leveldb.impl.SnapshotSeekingIterator.getNextElement(SnapshotSeekingIterator.java:65)
at org.iq80.leveldb.util.AbstractSeekingIterator.hasNext(AbstractSeekingIterator.java:30)
at org.iq80.leveldb.impl.SeekingIteratorAdapter.hasNext(SeekingIteratorAdapter.java:34)
at org.iq80.leveldb.DbBenchmark.readSequential(DbBenchmark.java:430)
at org.iq80.leveldb.DbBenchmark.run(DbBenchmark.java:149)
at org.iq80.leveldb.DbBenchmark.main(DbBenchmark.java:640)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.io.FileNotFoundException: /tmp/dbbench/000074.sst (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.iq80.leveldb.impl.TableCache$TableAndFile.(TableCache.java:115)
at org.iq80.leveldb.impl.TableCache$TableAndFile.(TableCache.java:105)
at org.iq80.leveldb.impl.TableCache$1.load(TableCache.java:65)
at org.iq80.leveldb.impl.TableCache$1.load(TableCache.java:61)
at com.google.common.cache.CustomConcurrentHashMap$ComputingValueReference.compute(CustomConcurrentHashMap.java:3426)
at com.google.common.cache.CustomConcurrentHashMap$Segment.compute(CustomConcurrentHashMap.java:2322)
at com.google.common.cache.CustomConcurrentHashMap$Segment.getOrCompute(CustomConcurrentHashMap.java:2291)
at com.google.common.cache.CustomConcurrentHashMap.getOrCompute(CustomConcurrentHashMap.java:3802)
at com.google.common.cache.ComputingCache.get(ComputingCache.java:46)
at org.iq80.leveldb.impl.TableCache.getTable(TableCache.java:88)
... 20 more