storm.trident.spout.IPartitionedTridentSpout Java Examples

The following examples show how to use storm.trident.spout.IPartitionedTridentSpout. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TridentTopology.java    From jstorm with Apache License 2.0 5 votes vote down vote up
public Stream newStream(String txId, ITridentDataSource dataSource) {
    if (dataSource instanceof IBatchSpout) {
        return newStream(txId, (IBatchSpout) dataSource);
    } else if (dataSource instanceof ITridentSpout) {
        return newStream(txId, (ITridentSpout) dataSource);
    } else if (dataSource instanceof IPartitionedTridentSpout) {
        return newStream(txId, (IPartitionedTridentSpout) dataSource);
    } else if (dataSource instanceof IOpaquePartitionedTridentSpout) {
        return newStream(txId, (IOpaquePartitionedTridentSpout) dataSource);
    } else {
        throw new UnsupportedOperationException("Unsupported stream");
    }
}
 
Example #2
Source File: TridentTopology.java    From jstorm with Apache License 2.0 4 votes vote down vote up
public Stream newStream(String txId, IPartitionedTridentSpout spout) {
    return newStream(txId, new PartitionedTridentSpoutExecutor(spout));
}
 
Example #3
Source File: TransactionalTridentKafkaSpout.java    From storm-kafka-0.8-plus with Apache License 2.0 4 votes vote down vote up
@Override
public IPartitionedTridentSpout.Coordinator getCoordinator(Map conf, TopologyContext context) {
    return new storm.kafka.trident.Coordinator(conf, _config);
}
 
Example #4
Source File: TransactionalTridentKafkaSpout.java    From storm-kafka-0.8-plus with Apache License 2.0 4 votes vote down vote up
@Override
public IPartitionedTridentSpout.Emitter getEmitter(Map conf, TopologyContext context) {
    return new TridentKafkaEmitter(conf, context, _config, _topologyInstanceId).asTransactionalEmitter();
}