use of org.apache.accumulo.core.spi.compaction.CompactionDispatcher in project accumulo by apache.
the class TableConfiguration method createCompactionDispatcher.
private static CompactionDispatcher createCompactionDispatcher(AccumuloConfiguration conf, ServerContext context, TableId tableId) {
CompactionDispatcher newDispatcher = Property.createTableInstanceFromPropertyName(conf, Property.TABLE_COMPACTION_DISPATCHER, CompactionDispatcher.class, null);
Map<String, String> opts = conf.getAllPropertiesWithPrefixStripped(Property.TABLE_COMPACTION_DISPATCHER_OPTS);
newDispatcher.init(new CompactionDispatcher.InitParameters() {
private final ServiceEnvironment senv = new ServiceEnvironmentImpl(context);
@Override
public TableId getTableId() {
return tableId;
}
@Override
public Map<String, String> getOptions() {
return opts;
}
@Override
public ServiceEnvironment getServiceEnv() {
return senv;
}
});
return newDispatcher;
}
Aggregations