Java Code Examples for storm.trident.operation.TridentOperationContext#getPartitionIndex()
The following examples show how to use
storm.trident.operation.TridentOperationContext#getPartitionIndex() .
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: RecentTweetsStateQuery.java From first-stories-twitter with MIT License | 5 votes |
@Override public void prepare(Map conf, TridentOperationContext context) { partitionNum = context.getPartitionIndex(); numPartitions = context.numPartitions(); myturn = partitionNum; threshold = Double.valueOf((String) conf.get("THRESHOLD")); }
Example 2
Source File: Print.java From trident-tutorial with Apache License 2.0 | 4 votes |
@Override public void prepare(Map conf, TridentOperationContext context) { this.partitionIndex = context.getPartitionIndex(); this.numPartitions = context.numPartitions(); }
Example 3
Source File: StringCounter.java From trident-tutorial with Apache License 2.0 | 4 votes |
@Override public void prepare(Map conf, TridentOperationContext context) { this.partitionId = context.getPartitionIndex(); this.numPartitions = context.numPartitions(); }
Example 4
Source File: SingleEmitAggregator.java From jstorm with Apache License 2.0 | 4 votes |
@Override public void prepare(Map conf, TridentOperationContext context) { _agg.prepare(conf, context); this.myPartitionIndex = context.getPartitionIndex(); this.totalPartitions = context.numPartitions(); }