Java Code Examples for com.amazonaws.services.kinesis.model.Shard#withAdjacentParentShardId()
The following examples show how to use
com.amazonaws.services.kinesis.model.Shard#withAdjacentParentShardId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KinesisDataFetcher.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
/** * Utility function to convert {@link StreamShardMetadata} into {@link StreamShardHandle}. * * @param streamShardMetadata the {@link StreamShardMetadata} to be converted * @return a {@link StreamShardHandle} object */ public static StreamShardHandle convertToStreamShardHandle(StreamShardMetadata streamShardMetadata) { Shard shard = new Shard(); shard.withShardId(streamShardMetadata.getShardId()); shard.withParentShardId(streamShardMetadata.getParentShardId()); shard.withAdjacentParentShardId(streamShardMetadata.getAdjacentParentShardId()); HashKeyRange hashKeyRange = new HashKeyRange(); hashKeyRange.withStartingHashKey(streamShardMetadata.getStartingHashKey()); hashKeyRange.withEndingHashKey(streamShardMetadata.getEndingHashKey()); shard.withHashKeyRange(hashKeyRange); SequenceNumberRange sequenceNumberRange = new SequenceNumberRange(); sequenceNumberRange.withStartingSequenceNumber(streamShardMetadata.getStartingSequenceNumber()); sequenceNumberRange.withEndingSequenceNumber(streamShardMetadata.getEndingSequenceNumber()); shard.withSequenceNumberRange(sequenceNumberRange); return new StreamShardHandle(streamShardMetadata.getStreamName(), shard); }
Example 2
Source File: KinesisDataFetcher.java From flink with Apache License 2.0 | 6 votes |
/** * Utility function to convert {@link StreamShardMetadata} into {@link StreamShardHandle}. * * @param streamShardMetadata the {@link StreamShardMetadata} to be converted * @return a {@link StreamShardHandle} object */ public static StreamShardHandle convertToStreamShardHandle(StreamShardMetadata streamShardMetadata) { Shard shard = new Shard(); shard.withShardId(streamShardMetadata.getShardId()); shard.withParentShardId(streamShardMetadata.getParentShardId()); shard.withAdjacentParentShardId(streamShardMetadata.getAdjacentParentShardId()); HashKeyRange hashKeyRange = new HashKeyRange(); hashKeyRange.withStartingHashKey(streamShardMetadata.getStartingHashKey()); hashKeyRange.withEndingHashKey(streamShardMetadata.getEndingHashKey()); shard.withHashKeyRange(hashKeyRange); SequenceNumberRange sequenceNumberRange = new SequenceNumberRange(); sequenceNumberRange.withStartingSequenceNumber(streamShardMetadata.getStartingSequenceNumber()); sequenceNumberRange.withEndingSequenceNumber(streamShardMetadata.getEndingSequenceNumber()); shard.withSequenceNumberRange(sequenceNumberRange); return new StreamShardHandle(streamShardMetadata.getStreamName(), shard); }
Example 3
Source File: KinesisDataFetcher.java From flink with Apache License 2.0 | 6 votes |
/** * Utility function to convert {@link StreamShardMetadata} into {@link StreamShardHandle}. * * @param streamShardMetadata the {@link StreamShardMetadata} to be converted * @return a {@link StreamShardHandle} object */ public static StreamShardHandle convertToStreamShardHandle(StreamShardMetadata streamShardMetadata) { Shard shard = new Shard(); shard.withShardId(streamShardMetadata.getShardId()); shard.withParentShardId(streamShardMetadata.getParentShardId()); shard.withAdjacentParentShardId(streamShardMetadata.getAdjacentParentShardId()); HashKeyRange hashKeyRange = new HashKeyRange(); hashKeyRange.withStartingHashKey(streamShardMetadata.getStartingHashKey()); hashKeyRange.withEndingHashKey(streamShardMetadata.getEndingHashKey()); shard.withHashKeyRange(hashKeyRange); SequenceNumberRange sequenceNumberRange = new SequenceNumberRange(); sequenceNumberRange.withStartingSequenceNumber(streamShardMetadata.getStartingSequenceNumber()); sequenceNumberRange.withEndingSequenceNumber(streamShardMetadata.getEndingSequenceNumber()); shard.withSequenceNumberRange(sequenceNumberRange); return new StreamShardHandle(streamShardMetadata.getStreamName(), shard); }