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

 ##########
 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:
   Hm, I really like being able to compute the shard -> task group mapping 
mentally and the round-robin behavior, but there is some uncertainty there. 
   
   The shardId format expected there is how Kinesis names the shards, and I 
don't see any way to rename shards in the API 
(https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html). 
   
   That said, the API doesn't really define the format of the shard names, 
beyond the allowed character set and length, so I think I'll go with only the 
hash path given the feedback and that uncertainty.

----------------------------------------------------------------
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