use of com.hazelcast.jet.kinesis.impl.source.HashRange in project hazelcast by hazelcast.
the class AbstractKinesisTest method splitShard.
protected void splitShard(Shard shard) {
HashRange range = HashRange.range(shard.getHashKeyRange());
BigInteger middle = range.getMinInclusive().add(range.getMaxExclusive()).divide(BigInteger.valueOf(2));
SplitShardRequest request = new SplitShardRequest();
request.setStreamName(STREAM);
request.setShardToSplit(shard.getShardId());
request.setNewStartingHashKey(middle.toString());
System.out.println("Splitting " + shard.getShardId());
kinesis.splitShard(request);
}
Aggregations