Example usage for com.amazonaws.services.kinesis.model ShardIteratorType toString

List of usage examples for com.amazonaws.services.kinesis.model ShardIteratorType toString

Introduction

In this page you can find the example usage for com.amazonaws.services.kinesis.model ShardIteratorType toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.apache.druid.indexing.kinesis.KinesisRecordSupplier.java

License:Apache License

private void seekInternal(StreamPartition<String> partition, String sequenceNumber,
        ShardIteratorType iteratorEnum) {
    PartitionResource resource = partitionResources.get(partition);
    if (resource == null) {
        throw new ISE("Partition [%s] has not been assigned", partition);
    }/* w  w  w .j  a  v a  2s .c  om*/

    log.debug("Seeking partition [%s] to [%s]", partition.getPartitionId(),
            sequenceNumber != null ? sequenceNumber : iteratorEnum.toString());

    resource.shardIterator = wrapExceptions(() -> kinesis.getShardIterator(partition.getStream(),
            partition.getPartitionId(), iteratorEnum.toString(), sequenceNumber).getShardIterator());

    checkPartitionsStarted = true;
}

From source file:org.apache.druid.indexing.kinesis.KinesisRecordSupplier.java

License:Apache License

@Nullable
private String getSequenceNumberInternal(StreamPartition<String> partition, ShardIteratorType iteratorEnum) {
    return wrapExceptions(() -> getSequenceNumberInternal(partition,
            kinesis.getShardIterator(partition.getStream(), partition.getPartitionId(), iteratorEnum.toString())
                    .getShardIterator()));
}