Promote CompactionFilter* accessors to ColumnFamilyOptionsInterface (#3461)
Summary: When adding CompactionFilter and CompactionFilterFactory settings to the Java layer, ColumnFamilyOptions was modified directly instead of ColumnFamilyOptionsInterface. This meant that the old-stye Options monolith was left behind. This patch fixes that, by: - promoting the CompactionFilter + CompactionFilterFactory setters from ColumnFamilyOptions -> ColumnFamilyOptionsInterface - adding getters in ColumnFamilyOptionsInterface - implementing setters in Options - implementing getters in both ColumnFamilyOptions and Options - adding testcases - reusing a test CompactionFilterFactory by moving it to a common location Pull Request resolved: https://github.com/facebook/rocksdb/pull/3461 Differential Revision: D13278788 Pulled By: sagar0 fbshipit-source-id: 72602c6eb97dc80734e718abb5e2e9958d3c753bmain
parent
64aabc9183
commit
8261e0026b
@ -0,0 +1,20 @@ |
||||
package org.rocksdb.test; |
||||
|
||||
import org.rocksdb.AbstractCompactionFilter; |
||||
import org.rocksdb.AbstractCompactionFilterFactory; |
||||
import org.rocksdb.RemoveEmptyValueCompactionFilter; |
||||
|
||||
/** |
||||
* Simple CompactionFilterFactory class used in tests. Generates RemoveEmptyValueCompactionFilters. |
||||
*/ |
||||
public class RemoveEmptyValueCompactionFilterFactory extends AbstractCompactionFilterFactory<RemoveEmptyValueCompactionFilter> { |
||||
@Override |
||||
public RemoveEmptyValueCompactionFilter createCompactionFilter(final AbstractCompactionFilter.Context context) { |
||||
return new RemoveEmptyValueCompactionFilter(); |
||||
} |
||||
|
||||
@Override |
||||
public String name() { |
||||
return "RemoveEmptyValueCompactionFilterFactory"; |
||||
} |
||||
} |
Loading…
Reference in new issue