flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/model/KinesisStreamShard.java
/**
	 * Utility function to compare two shard ids
	 *
	 * @param firstShardId first shard id to compare
	 * @param secondShardId second shard id to compare
	 * @return a value less than 0 if the first shard id is smaller than the second shard id,
	 *         or a value larger than 0 the first shard is larger then the second shard id,
	 *         or 0 if they are equal
	 */
Utility function to compare two shard ids
@param firstShardId first shard id to compare
@param secondShardId second shard id to compare
@return a value less than 0 if the first shard id is smaller than the second shard id,
or a value larger than 0 the first shard is larger then the second shard id,
or 0 if they are equal
Utility function to compare two shard ids @param firstShardId first shard id to compare @param secondShardId second shard id to compare @return a value less than 0 if the first shard id is smaller than the second shard id or a value larger than 0 the first shard is larger then the second shard id or 0 if they are equal
public static int compareShardIds(String firstShardId, String secondShardId) {
		if (!isValidShardId(firstShardId)) {
			throw new IllegalArgumentException("The first shard id has invalid format.");
		}
		if (!isValidShardId(secondShardId)) {
			throw new IllegalArgumentException("The second shard id has invalid format.");
		}
		return Long.compare(Long.parseLong(firstShardId.substring(8)), Long.parseLong(secondShardId.substring(8)));
	}
public static int compareShardIds ( String firstShardId , String secondShardId ) { if ( ! isValidShardId ( firstShardId ) ) { throw new IllegalArgumentException ( "The first shard id has invalid format." ) ; } if ( ! isValidShardId ( secondShardId ) ) { throw new IllegalArgumentException ( "The second shard id has invalid format." ) ; } return Long . compare ( Long . parseLong ( firstShardId . substring ( 8 ) ) , Long . parseLong ( secondShardId . substring ( 8 ) ) ) ; }
Utility function to compare two shard ids
 @param firstShardId first shard id to compare
 @param secondShardId second shard id to compare
 @return a value less than 0 if the first shard id is smaller than the second shard id,
         or a value larger than 0 the first shard is larger then the second shard id,
         or 0 if they are equal
Utility function to compare two shard ids @param firstShardId first shard id to compare @param secondShardId second shard id to compare @return a value less than 0 if the first shard id is smaller than the second shard id or a value larger than 0 the first shard is larger then the second shard id or 0 if they are equal
// digit segment of the shard id starts at index 8