当前位置: 首页>>代码示例>>Java>>正文


Java ShutdownReason.TERMINATE属性代码示例

本文整理汇总了Java中com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason.TERMINATE属性的典型用法代码示例。如果您正苦于以下问题:Java ShutdownReason.TERMINATE属性的具体用法?Java ShutdownReason.TERMINATE怎么用?Java ShutdownReason.TERMINATE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason的用法示例。


在下文中一共展示了ShutdownReason.TERMINATE属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: shutdown

/**
 * {@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();
		}
	}
}
 
开发者ID:awslabs,项目名称:aws-kinesis-beanstalk-workers,代码行数:18,代码来源:ManagedClientProcessor.java

示例2: shutdown

@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);
    }
}
 
开发者ID:SaschaMoellering,项目名称:ingestion-service,代码行数:13,代码来源:RecordProcessor.java

示例3: shutdown

/**
 * {@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);
    }
}
 
开发者ID:lenards,项目名称:spark-cstar-canaries,代码行数:11,代码来源:EventRecordProcessor.java

示例4: shutdown

@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer, ShutdownReason reason) {
    if(reason == ShutdownReason.TERMINATE) {
        try {
            checkpointer.checkpoint();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:gnethercutt,项目名称:dynamodb-streams-kafka,代码行数:10,代码来源:KafkaForwardingStreamsRecordProcessor.java

示例5: shutdown

/**
 * {@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);
    }
}
 
开发者ID:DevOps-TangoMe,项目名称:flume-kinesis,代码行数:11,代码来源:FlumeSourceRecordProcessor.java

示例6: shutdown

/**
 * {@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);
    }
}
 
开发者ID:awslabs,项目名称:aws-big-data-blog,代码行数:10,代码来源:KinesisRecordProcessor.java

示例7: shutdown

@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);
	}
}
 
开发者ID:awslabs,项目名称:aws-big-data-blog,代码行数:9,代码来源:StreamsRecordProcessor.java

示例8: shutdown

/**
 * {@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);
    }
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:11,代码来源:KinesisRawEventRecordProcessor.java

示例9: shutdown

@Override
public void shutdown(IRecordProcessorCheckpointer checkpointer,
        ShutdownReason reason) {
    if(reason == ShutdownReason.TERMINATE) {
        try {
            checkpointer.checkpoint();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-examples,代码行数:11,代码来源:StreamsRecordProcessor.java

示例10: shutdown

/**
 * {@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);
    }
}
 
开发者ID:dselman,项目名称:tweetamo,代码行数:11,代码来源:TweetamoRecordProcessor.java


注:本文中的com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason.TERMINATE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。