presto-kinesis/src/main/java/io/prestosql/plugin/kinesis/KinesisShardCheckpointer.java/KinesisShardCheckpointer/KinesisShardCheckpointer
class KinesisShardCheckpointer:    public KinesisShardCheckpointer(
            KinesisClientLeaseManager leaseManager,
            KinesisSplit kinesisSplit,
            String logicalProcessName,
            int currentIterationNumber,
            long checkpointIntervalMS,
            long dynamoReadCapacity,
            long dynamoWriteCapacity)
    {
        this.leaseManager = leaseManager;
        this.kinesisSplit = kinesisSplit;
        this.logicalProcessName = logicalProcessName;
        this.currentIterationNumber = currentIterationNumber;
        this.checkpointIntervalMillis = checkpointIntervalMS;

        try {
            this.leaseManager.createLeaseTableIfNotExists(dynamoReadCapacity, dynamoWriteCapacity);

            KinesisClientLease oldLease = this.leaseManager.getLease(createCheckpointKey(currentIterationNumber));
            if (oldLease != null) {
                this.kinesisClientLease = oldLease;
            }
            else {
                this.kinesisClientLease = new KinesisClientLease();
                this.kinesisClientLease.setLeaseKey(createCheckpointKey(currentIterationNumber));
            }
        }
        catch (ProvisionedThroughputException | InvalidStateException | DependencyException e) {
            throwIfUnchecked(e);
            throw new RuntimeException(e);
        }
        resetNextCheckpointTime();
    }