jnaous commented on a change in pull request #8644: Fix Kinesis resharding 
issues
URL: https://github.com/apache/incubator-druid/pull/8644#discussion_r332812382
 
 

 ##########
 File path: 
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisor.java
 ##########
 @@ -212,14 +225,47 @@ protected void 
scheduleReporting(ScheduledExecutorService reportingExec)
     // not yet implemented, see issue #6739
   }
 
+
+  /**
+   * We try to parse the shard number of the shard ID, using a BigInteger 
because the Kinesis shard ID can be
+   * up to 128 characters. The shard number is used preferentially because it 
provides a fixed and easily predictable
+   * mapping from shard to task group number.
+   *
+   * If we can't parse the shard number from the ID, then we fall back to 
hashing the shard ID string.
 
 Review comment:
   Why would this happen? If that might happen, wouldn't it be better to reduce 
the potential code paths and simplify things? If you mix approaches it becomes 
harder to figure out what was used to make the calculation.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to