Search in sources :

Example 1 with ScanDispatcher

use of org.apache.accumulo.core.spi.scan.ScanDispatcher in project accumulo by apache.

the class TableConfiguration method createScanDispatcher.

private static ScanDispatcher createScanDispatcher(AccumuloConfiguration conf, ServerContext context, TableId tableId) {
    ScanDispatcher newDispatcher = Property.createTableInstanceFromPropertyName(conf, Property.TABLE_SCAN_DISPATCHER, ScanDispatcher.class, null);
    Map<String, String> opts = conf.getAllPropertiesWithPrefixStripped(Property.TABLE_SCAN_DISPATCHER_OPTS);
    newDispatcher.init(new ScanDispatcher.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;
}
Also used : ScanDispatcher(org.apache.accumulo.core.spi.scan.ScanDispatcher) TableId(org.apache.accumulo.core.data.TableId) ServiceEnvironment(org.apache.accumulo.core.spi.common.ServiceEnvironment) ServiceEnvironmentImpl(org.apache.accumulo.server.ServiceEnvironmentImpl) HashMap(java.util.HashMap) Map(java.util.Map) EnumMap(java.util.EnumMap)

Aggregations

EnumMap (java.util.EnumMap)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 TableId (org.apache.accumulo.core.data.TableId)1 ServiceEnvironment (org.apache.accumulo.core.spi.common.ServiceEnvironment)1 ScanDispatcher (org.apache.accumulo.core.spi.scan.ScanDispatcher)1 ServiceEnvironmentImpl (org.apache.accumulo.server.ServiceEnvironmentImpl)1