Update common utils

This commit is contained in:
Andrea Cavalli 2021-06-09 02:56:53 +02:00
parent 54143ac364
commit 6039241d2b
2 changed files with 7 additions and 4 deletions

View File

@ -240,7 +240,7 @@
<dependency>
<groupId>org.warp</groupId>
<artifactId>common-utils</artifactId>
<version>1.1.3</version>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>

View File

@ -107,6 +107,7 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
);
createIfNotExists(descriptors, options, inMemory, this.dbPath, dbPathString);
// Create all column families that don't exist
createAllColumns(descriptors, options, inMemory, dbPathString);
@ -219,12 +220,14 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
options.setKeepLogFileNum(10);
options.setAllowFAllocate(true);
options.setRateLimiter(new RateLimiter(10L * 1024L * 1024L)); // 10MiB/s max compaction write speed
options.setDbPaths(List.of(new DbPath(databasesDirPath.resolve(path.getFileName() + "_hot"),
10L * 1024L * 1024L * 1024L), // 10GiB
var paths = List.of(new DbPath(databasesDirPath.resolve(path.getFileName() + "_hot"),
10L * 1024L * 1024L * 1024L), // 10GiB
new DbPath(databasesDirPath.resolve(path.getFileName() + "_cold"),
100L * 1024L * 1024L * 1024L), // 100GiB
new DbPath(databasesDirPath.resolve(path.getFileName() + "_colder"),
600L * 1024L * 1024L * 1024L))); // 600GiB
600L * 1024L * 1024L * 1024L)); // 600GiB
options.setDbPaths(paths);
options.setCfPaths(paths);
// Direct I/O parameters. Removed because they use too much disk.
//options.setUseDirectReads(true);
//options.setUseDirectIoForFlushAndCompaction(true);