Java 类com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason 实例源码

项目:aws-kinesis-beanstalk-workers    文件:MyRecordProcessor.java   
@Override
public void processRecords(List<Record> records,
        IRecordProcessorCheckpointer checkpointer) {
    LOG.info(String.format("Received %s Records", records.size()));

    // add a call to your business logic here!
    //
    // myLinkedClasses.doSomething(records)
    //
    //
    try {
        checkpointer.checkpoint();
    } catch (KinesisClientLibDependencyException | InvalidStateException
            | ThrottlingException | ShutdownException e) {
        e.printStackTrace();
        super.shutdown(checkpointer, ShutdownReason.ZOMBIE);
    }
}
项目:aws-kinesis-beanstalk-workers    文件:ManagedClientProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer,
        ShutdownReason reason) {
    LOG.info("Shutting down record processor for shard: " + kinesisShardId);

    // Important to checkpoint after reaching end of shard, so we can start
    // processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        try {
            checkpoint(checkpointer);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
项目:sumologic-kinesis-connector    文件:KinesisConnectorRecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    LOG.info("Shutting down record processor with shardId: " + shardId + " with reason " + reason);
    if (isShutdown) {
        LOG.warn("Record processor for shardId: " + shardId + " has been shutdown multiple times.");
        return;
    }
    switch (reason) {
        case TERMINATE:
            emit(checkpointer, transformToOutput(buffer.getRecords()));
            try {
                checkpointer.checkpoint();
            } catch (KinesisClientLibDependencyException | InvalidStateException | ThrottlingException | ShutdownException e) {
                LOG.error(e);
            }
            break;
        case ZOMBIE:
            break;
        default:
            throw new IllegalStateException("invalid shutdown reason");
    }
    emitter.shutdown();
    isShutdown = true;
}
项目:amazon-kinesis-aggregators    文件:AggregatorProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void processRecords(List<Record> records,
        IRecordProcessorCheckpointer checkpointer) {
    LOG.info("Aggregating " + records.size()
            + " records for Kinesis Shard " + kinesisShardId);
    try {
        // run data into the aggregator
        agg.aggregate(records);

        // checkpoint the aggregator and kcl
        agg.checkpoint();
        checkpointer.checkpoint(records.get(records.size() - 1));

        LOG.debug("Kinesis Checkpoint for Shard " + kinesisShardId
                + " Complete");
    } catch (Exception e) {
        e.printStackTrace();
        LOG.error(e);
        shutdown(checkpointer, ShutdownReason.ZOMBIE);
    }
}
项目:aws-big-data-blog    文件:MyRecordProcessor.java   
@Override
public void processRecords(List<Record> records,
        IRecordProcessorCheckpointer checkpointer) {
    LOG.info(String.format("Received %s Records", records.size()));

    // add a call to your business logic here!
    //
    // myLinkedClasses.doSomething(records)
    //
    //
    try {
        checkpointer.checkpoint();
    } catch (KinesisClientLibDependencyException | InvalidStateException
            | ThrottlingException | ShutdownException e) {
        e.printStackTrace();
        super.shutdown(checkpointer, ShutdownReason.ZOMBIE);
    }
}
项目:aws-big-data-blog    文件:ManagedClientProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer,
        ShutdownReason reason) {
    LOG.info("Shutting down record processor for shard: " + kinesisShardId);

    // Important to checkpoint after reaching end of shard, so we can start
    // processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        try {
            checkpoint(checkpointer);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
项目:aws-kinesis-zombies    文件:ZombieRecordProcessor.java   
@Override
@SneakyThrows
public void shutdown(ShutdownInput shutdownInput) {
    IRecordProcessorCheckpointer checkpointer = shutdownInput.getCheckpointer();
    ShutdownReason reason = shutdownInput.getShutdownReason();
    log.info("Finalizado trabajo: {}.", reason);
    checkpointer.checkpoint();
}
项目:ingestion-service    文件:RecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer iRecordProcessorCheckpointer, ShutdownReason shutdownReason) {

    if (producer != null) {
        producer.close();
    }

    logger.info("Shutting down record processor for shard: " + shardId);
    // Important to checkpoint after reaching end of shard, so we can start processing data from child shards.
    if (shutdownReason == ShutdownReason.TERMINATE) {
        checkpoint(iRecordProcessorCheckpointer);
    }
}
项目:spark-cstar-canaries    文件:EventRecordProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    // Important to checkpoint after reaching end of shard,
    // so we can start processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        performCheckpoint(checkpointer);
    }
}
项目:dynamodb-streams-kafka    文件:KafkaForwardingStreamsRecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    if(reason == ShutdownReason.TERMINATE) {
        try {
            checkpointer.checkpoint();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
项目:flume-kinesis    文件:FlumeSourceRecordProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    logger.info("Shutting down record processor for shard: " + kinesisShardId);
    // Important to checkpoint after reaching end of shard, so we can start processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        checkpoint(checkpointer);
    }
}
项目:aws-big-data-blog    文件:KinesisRecordProcessor.java   
/**
 * {@inheritDoc}
 */
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    LOG.info("Shutting down record processor for shard: " + kinesisShardId);
    // Important to checkpoint after reaching end of shard, so we can start processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        checkpoint(checkpointer);
    }
}
项目:aws-big-data-blog    文件:StreamsRecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    LOG.info("Shutting down record processor for shard: " + kinesisShardId);
    // Important to checkpoint after reaching end of shard, so we can start
    // processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        checkpoint(checkpointer);
    }
}
项目:micro-genie    文件:KinesisRawEventRecordProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    LOGGER.info("Shutting down record processor for shard: " + kinesisShardId);
    /** Important to checkpoint after reaching end of shard, so we can start processing data from child shards. **/
    if (reason == ShutdownReason.TERMINATE) {
        checkpoint(checkpointer);
    }
}
项目:aws-dynamodb-examples    文件:StreamsRecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer,
        ShutdownReason reason) {
    if(reason == ShutdownReason.TERMINATE) {
        try {
            checkpointer.checkpoint();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
项目:tweetamo    文件:TweetamoRecordProcessor.java   
/**
 * {@inheritDoc}
 */
@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    LOG.info("Shutting down record processor for shard: " + kinesisShardId);
    // Important to checkpoint after reaching end of shard, so we can start processing data from child shards.
    if (reason == ShutdownReason.TERMINATE) {
        checkpoint(checkpointer);
    }
}
项目:awsbigdata    文件:Processor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer arg0, ShutdownReason arg1) {
}
项目:Surf    文件:RecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer irpc, ShutdownReason sr) {
    _logger.info("Shutting down record processor");
}
项目:Surf    文件:RecordProcessor.java   
@Override
public void shutdown(IRecordProcessorCheckpointer irpc, ShutdownReason sr) {
    _logger.info("Shutting down record processor");
}