Class DynamoDBStreamsShardHandle
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle
-
- org.apache.flink.streaming.connectors.kinesis.model.DynamoDBStreamsShardHandle
-
public class DynamoDBStreamsShardHandle extends StreamShardHandle
DynamoDB streams shard handle format and utilities.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSHARDID_PREFIXstatic intSHARDID_PREFIX_LEN
-
Constructor Summary
Constructors Constructor Description DynamoDBStreamsShardHandle(String streamName, com.amazonaws.services.kinesis.model.Shard shard)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareShardIds(String firstShardId, String secondShardId)static booleanisValidShardId(String shardId)Dynamodb streams shard ID is a char string ranging from 28 characters to 65 characters.-
Methods inherited from class org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle
equals, getShard, getStreamName, hashCode, isClosed, toString
-
-
-
-
Field Detail
-
SHARDID_PREFIX
public static final String SHARDID_PREFIX
- See Also:
- Constant Field Values
-
SHARDID_PREFIX_LEN
public static final int SHARDID_PREFIX_LEN
-
-
Constructor Detail
-
DynamoDBStreamsShardHandle
public DynamoDBStreamsShardHandle(String streamName, com.amazonaws.services.kinesis.model.Shard shard)
-
-
Method Detail
-
isValidShardId
public static boolean isValidShardId(String shardId)
Dynamodb streams shard ID is a char string ranging from 28 characters to 65 characters. (See https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_Shard.html)The shardId observed usually takes the format of: "shardId-00000001536805703746-69688cb1", where "shardId-" is a prefix, followed by a 20-digit timestamp string and 0-36 or more characters, separated by '-'. Following this format, it is expected the child shards created during a re-sharding event have shardIds bigger than their parents.
- Parameters:
shardId- shard Id- Returns:
- boolean indicate if the given shard Id is valid
-
-