Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima committed Feb 17, 2025
1 parent 7dda8f8 commit 7bd2bec
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,24 @@ private static ColumnFamilyOptions createColumnFamilyOptions(
final ColumnFamilyOptions cfOptions;
try {
final LRUCache cache =
column
.getIsLargerCacheAvalilable()
.map(
isLarger -> {
if (isLarger) {
return new LRUCache(configuration.getLargerCacheCapacity());
} else {
return new LRUCache(configuration.getCacheCapacity());
}
})
.orElse(new LRUCache(configuration.getCacheCapacity()));
cfOptions = new ColumnFamilyOptions()
column
.getIsLargerCacheAvalilable()
.map(
isLarger -> {
if (isLarger) {
return new LRUCache(configuration.getLargerCacheCapacity());
} else {
return new LRUCache(configuration.getCacheCapacity());
}
})
.orElse(new LRUCache(configuration.getCacheCapacity()));
cfOptions =
new ColumnFamilyOptions()
.setCompressionType(configuration.getCompressionType())
.setBottommostCompressionType(configuration.getBottomMostCompressionType())
.setLevelCompactionDynamicLevelBytes(true)
.setTableFormatConfig(createBlockBasedTableConfig(cache));
}
catch (Exception e) {
} catch (Exception e) {
throw new RuntimeException("Error creating column family options", e);
}
return cfOptions;
Expand All @@ -192,14 +192,14 @@ private static ColumnFamilyOptions createColumnFamilyOptions(
final KvStoreConfiguration configuration) {
final ColumnFamilyOptions cfOptions;
try {
final LRUCache cache = new LRUCache(configuration.getCacheCapacity());
cfOptions = new ColumnFamilyOptions()
.setCompressionType(configuration.getCompressionType())
.setBottommostCompressionType(configuration.getBottomMostCompressionType())
.setLevelCompactionDynamicLevelBytes(true)
.setTableFormatConfig(createBlockBasedTableConfig(cache));
}
catch (Exception e) {
final LRUCache cache = new LRUCache(configuration.getCacheCapacity());
cfOptions =
new ColumnFamilyOptions()
.setCompressionType(configuration.getCompressionType())
.setBottommostCompressionType(configuration.getBottomMostCompressionType())
.setLevelCompactionDynamicLevelBytes(true)
.setTableFormatConfig(createBlockBasedTableConfig(cache));
} catch (Exception e) {
throw new RuntimeException("Error creating column family options", e);
}
return cfOptions;
Expand Down

0 comments on commit 7bd2bec

Please sign in to comment.