use of org.apache.druid.segment.join.BroadcastTableJoinableFactory in project druid by druid-io.
the class SegmentManagerBroadcastJoinIndexedTableTest method setup.
@Before
public void setup() throws IOException {
segmentPuller = new LocalDataSegmentPuller();
objectMapper = new DefaultObjectMapper().registerModule(new SegmentizerModule()).registerModule(new SimpleModule().registerSubtypes(new NamedType(LocalLoadSpec.class, "local")));
indexIO = new IndexIO(objectMapper, () -> 0);
objectMapper.setInjectableValues(new InjectableValues.Std().addValue(LocalDataSegmentPuller.class, segmentPuller).addValue(ExprMacroTable.class.getName(), TestExprMacroTable.INSTANCE).addValue(ObjectMapper.class.getName(), objectMapper).addValue(IndexIO.class, indexIO));
segmentCacheDir = temporaryFolder.newFolder();
segmentDeepStorageDir = temporaryFolder.newFolder();
segmentCacheManager = new SegmentLocalCacheManager(new SegmentLoaderConfig() {
@Override
public List<StorageLocationConfig> getLocations() {
return Collections.singletonList(new StorageLocationConfig(segmentCacheDir, null, null));
}
}, objectMapper);
segmentManager = new SegmentManager(new SegmentLocalCacheLoader(segmentCacheManager, indexIO, objectMapper));
joinableFactory = new BroadcastTableJoinableFactory(segmentManager);
EmittingLogger.registerEmitter(new NoopServiceEmitter());
}
Aggregations