Skip to content

Commit e340c04

Browse files
author
Youri K
committed
try smaller files
1 parent 4081b56 commit e340c04

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/scala/com/scalableminds/fossildb/db/RocksDBStore.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class RocksDBManager(dataDir: Path, columnFamilies: List[String], optionsFilePat
9494
def ingestFiles() = {
9595
val ifo = new IngestExternalFileOptions()
9696
ifo.setMoveFiles(true)
97-
val fileNames = (1 until 10).map(num => s"toIngest/test${num}.sst")
97+
val fileNames = (0 until 100000).map(num => s"toIngest/test${num}.sst")
9898
val asd: mutable.Buffer[String] = fileNames.toBuffer
9999
val handle = columnFamilyHandles("skeletons")
100100
db.ingestExternalFile(handle, asd.asJava, ifo)
@@ -108,9 +108,10 @@ class RocksDBManager(dataDir: Path, columnFamilies: List[String], optionsFilePat
108108
val writer = new SstFileWriter(new EnvOptions(), options)
109109
val store = getStoreForColumnFamily("skeletons")
110110
val it = store.get.scan("", None)
111-
it.take(10000).grouped(1000).zipWithIndex.foreach { case (seq, idx) =>
111+
it.take(100000).zipWithIndex.foreach { case (seq, idx) =>
112112
writer.open(s"data/test${idx}.sst")
113-
seq.foreach(el => writer.put(el.key.getBytes, el.value))
113+
val el = seq
114+
writer.put(el.key.getBytes, el.value)
114115
writer.finish()
115116
}
116117
}

0 commit comments

Comments
 (0)