mynameborat commented on a change in pull request #1099: SAMZA-2267: Allow
overriding RocksDB file size parameters
URL: https://github.com/apache/samza/pull/1099#discussion_r301826408
##########
File path:
samza-kv-rocksdb/src/main/java/org/apache/samza/storage/kv/RocksDbOptionsHelper.java
##########
@@ -106,7 +108,9 @@ public static Options options(Config storeConfig, int
numTasksForContainer, File
options.setMaxLogFileSize(storeConfig.getLong(ROCKSDB_MAX_LOG_FILE_SIZE_BYTES,
64 * 1024 * 1024L));
options.setKeepLogFileNum(storeConfig.getLong(ROCKSDB_KEEP_LOG_FILE_NUM,
2));
-
+
options.setDeleteObsoleteFilesPeriodMicros(storeConfig.getLong(ROCKSDB_DELETE_OBSOLETE_FILES_PERIOD_MICROS,
21600000000L));
+ // The default for rocksdb is 18446744073709551615, which is larger than
java Long.MAX_VALUE. Hence using hex representation.
+
options.setMaxManifestFileSize(storeConfig.getLong(ROCKSDB_MAX_MANIFEST_FILE_SIZE,
0xFFFF_FFFF_FFFF_FFFFL));
Review comment:
Looks like `storeConfig.getLong` should fail to parse the default in the
case of absence of this configuration and will return -1 due to overflow.
Can we set this configuration only in the presence of it and leave it unset
since RocksDB defaults to `0xFFFF_FFFF_FFFF_FFFF`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services