Zakelly commented on a change in pull request #17874:
URL: https://github.com/apache/flink/pull/17874#discussion_r757225258
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/PredefinedOptions.java
##########
@@ -83,35 +78,24 @@ public ColumnFamilyOptions
createColumnOptions(Collection<AutoCloseable> handles
* <li>setCompactionStyle(CompactionStyle.LEVEL)
* <li>setLevelCompactionDynamicLevelBytes(true)
* <li>setIncreaseParallelism(4)
- * <li>setUseFsync(false)
* <li>setDisableDataSync(true)
* <li>setMaxOpenFiles(-1)
* <li>setInfoLogLevel(InfoLogLevel.HEADER_LEVEL)
- * <li>setStatsDumpPeriodSec(0)
* </ul>
*
* <p>Note: Because Flink does not rely on RocksDB data on disk for
recovery, there is no need
* to sync data to stable storage.
*/
- SPINNING_DISK_OPTIMIZED {
-
- @Override
- public DBOptions createDBOptions(Collection<AutoCloseable>
handlesToClose) {
- return new DBOptions()
- .setIncreaseParallelism(4)
- .setUseFsync(false)
- .setMaxOpenFiles(-1)
- .setInfoLogLevel(InfoLogLevel.HEADER_LEVEL)
- .setStatsDumpPeriodSec(0);
- }
-
- @Override
- public ColumnFamilyOptions
createColumnOptions(Collection<AutoCloseable> handlesToClose) {
- return new ColumnFamilyOptions()
- .setCompactionStyle(CompactionStyle.LEVEL)
- .setLevelCompactionDynamicLevelBytes(true);
- }
- },
+ SPINNING_DISK_OPTIMIZED(
+ new HashMap<ConfigOption<?>, Object>() {
+ {
+ put(RocksDBConfigurableOptions.MAX_BACKGROUND_THREADS, 4);
+ put(RocksDBConfigurableOptions.MAX_OPEN_FILES, -1);
+ put(RocksDBConfigurableOptions.LOG_LEVEL,
InfoLogLevel.HEADER_LEVEL);
+ put(RocksDBConfigurableOptions.COMPACTION_STYLE,
CompactionStyle.LEVEL);
+ put(RocksDBConfigurableOptions.USE_DYNAMIC_LEVEL_SIZE,
true);
+ }
Review comment:
Sure, I added serialVersionUID in each class.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]