Search in sources :

Example 1 with RandomStorageLocationSelectorStrategy

use of org.apache.druid.segment.loading.RandomStorageLocationSelectorStrategy in project druid by druid-io.

the class LocalDataStorageDruidModuleTest method createInjector.

private static Injector createInjector() {
    return GuiceInjectors.makeStartupInjectorWithModules(ImmutableList.of(new LocalDataStorageDruidModule(), (Module) binder -> {
        binder.bind(new TypeLiteral<List<StorageLocation>>() {
        }).toInstance(ImmutableList.of());
        binder.bind(ColumnConfig.class).toInstance(() -> 0);
        binder.bind(StorageLocationSelectorStrategy.class).toInstance(new RandomStorageLocationSelectorStrategy(ImmutableList.of()));
    }));
}
Also used : TypeLiteral(com.google.inject.TypeLiteral) ColumnConfig(org.apache.druid.segment.column.ColumnConfig) RandomStorageLocationSelectorStrategy(org.apache.druid.segment.loading.RandomStorageLocationSelectorStrategy) Module(com.google.inject.Module) StorageLocation(org.apache.druid.segment.loading.StorageLocation) StorageLocationSelectorStrategy(org.apache.druid.segment.loading.StorageLocationSelectorStrategy) RandomStorageLocationSelectorStrategy(org.apache.druid.segment.loading.RandomStorageLocationSelectorStrategy)

Aggregations

Module (com.google.inject.Module)1 TypeLiteral (com.google.inject.TypeLiteral)1 ColumnConfig (org.apache.druid.segment.column.ColumnConfig)1 RandomStorageLocationSelectorStrategy (org.apache.druid.segment.loading.RandomStorageLocationSelectorStrategy)1 StorageLocation (org.apache.druid.segment.loading.StorageLocation)1 StorageLocationSelectorStrategy (org.apache.druid.segment.loading.StorageLocationSelectorStrategy)1