rayman7718 commented on a change in pull request #1580:
URL: https://github.com/apache/samza/pull/1580#discussion_r809602335
##########
File path:
samza-core/src/main/java/org/apache/samza/container/grouper/stream/GroupBySystemStreamPartition.java
##########
@@ -50,9 +53,20 @@ public GroupBySystemStreamPartition(Config config) {
continue;
}
- HashSet<SystemStreamPartition> sspSet = new
HashSet<SystemStreamPartition>();
- sspSet.add(ssp);
- groupedMap.put(new TaskName(ssp.toString()), sspSet);
+ // if elasticity factor > 1 then elasticity is enabled
+ // for each ssp create ElasticityFactor number of tasks
+ // i.e; result will have number of tasks = ElasticityFactor X number of
SSP
+ // each task will have name SSP[system,stream,partition,keyBucket]
keyBucket <= elasticityFactor
+ // each task portion correspdnding to keyBucket of the SSP.
+ // #todo: add the elasticity ticket for more details?
+ if (elasticityFactor > 1) {
+ for (int i = 0; i < elasticityFactor; i++) {
+ SystemStreamPartition sspWithKeyBucket = new
SystemStreamPartition(ssp, i);
Review comment:
same as above, can be simplified,
then dont need the 2 line method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]