Search in sources :

Example 1 with IEventHubReceiverFactory

use of org.apache.storm.eventhubs.spout.IEventHubReceiverFactory in project storm by apache.

the class TestTransactionalTridentEmitter method setUp.

@Before
public void setUp() throws Exception {
    EventHubSpoutConfig conf = new EventHubSpoutConfig("username", "password", "namespace", "entityname", 16, "zookeeper");
    conf.setTopologyName("TestTopo");
    IEventHubReceiverFactory recvFactory = new IEventHubReceiverFactory() {

        @Override
        public IEventHubReceiver create(EventHubSpoutConfig config, String partitionId) {
            return new EventHubReceiverMock(partitionId);
        }
    };
    partition = new Partition(conf, "0");
    emitter = new TransactionalTridentEventHubEmitter(conf, batchSize, null, recvFactory);
    collectorMock = new TridentCollectorMock();
}
Also used : IEventHubReceiverFactory(org.apache.storm.eventhubs.spout.IEventHubReceiverFactory) EventHubSpoutConfig(org.apache.storm.eventhubs.spout.EventHubSpoutConfig) EventHubReceiverMock(org.apache.storm.eventhubs.spout.EventHubReceiverMock) Before(org.junit.Before)

Aggregations

EventHubReceiverMock (org.apache.storm.eventhubs.spout.EventHubReceiverMock)1 EventHubSpoutConfig (org.apache.storm.eventhubs.spout.EventHubSpoutConfig)1 IEventHubReceiverFactory (org.apache.storm.eventhubs.spout.IEventHubReceiverFactory)1 Before (org.junit.Before)1