use of com.yahoo.bullet.storm.drpc.utils.DRPCOutputCollector in project bullet-storm by yahoo.
the class DRPCQuerySubscriberTest method setup.
@BeforeMethod
public void setup() {
DRPCConfig config = new DRPCConfig("src/test/resources/test_drpc_config.yaml");
// 1 task for the component named "foo" with task index 0
CustomTopologyContext context = new CustomTopologyContext(Collections.singletonList(1), "foo", 0);
config.set(DRPCConfig.STORM_CONTEXT, context);
Map stormConfig = new Config("src/test/resources/test_storm_config.yaml").getAll(Optional.empty());
config.set(DRPCConfig.STORM_CONFIG, stormConfig);
subscriber = new DRPCQuerySubscriber(config, 5);
DRPCOutputCollector collector = subscriber.getCollector();
// Override the DRPCSpout with our own that emits using our collector.
injectedMockSpout = new MockDRPCSpout("foo", collector);
subscriber.setSpout(injectedMockSpout);
}
Aggregations