You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SplitShardRequestsplitShardRequest = newSplitShardRequest();
splitShardRequest.setStreamName(myStreamName);
splitShardRequest.setShardToSplit(shard.getShardId());
/*Determine the hash key value which is half-way between the lowest and highest values in the shard.Thisis the starting hash key value for the child shard that will contain the upper half of the hash keys from theparent shard. Specify this value in the setNewStartingHashKey() method.You need specify only thisvalue; the Amazon Kinesis service automatically distributes the hash keys below this value to the otherchild shard that is created by the split.The last step is to call the splitShard() method on the AmazonKinesis service client.*/BigIntegerstartingHashKey = newBigInteger(shard.getHashKeyRange().getStartingHashKey());
BigIntegerendingHashKey = newBigInteger(shard.getHashKeyRange().getEndingHashKey());
StringnewStartingHashKey = startingHashKey.add(endingHashKey).divide(newBigInteger("2")).toString();
splitShardRequest.setNewStartingHashKey(newStartingHashKey);
client.splitShard(splitShardRequest);
The text was updated successfully, but these errors were encountered:
Example from http://awsdocs.s3.amazonaws.com/kinesis/latest/kinesis-dg.pdf
The text was updated successfully, but these errors were encountered: