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


Java ThrottlingException类代码示例

本文整理汇总了Java中com.amazonaws.services.kinesis.clientlibrary.exceptions.ThrottlingException的典型用法代码示例。如果您正苦于以下问题:Java ThrottlingException类的具体用法?Java ThrottlingException怎么用?Java ThrottlingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: processRecords

import com.amazonaws.services.kinesis.clientlibrary.exceptions.ThrottlingException; //导入依赖的package包/类
@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);
	}
}
 
开发者ID:awslabs,项目名称:aws-kinesis-beanstalk-workers,代码行数:19,代码来源:MyRecordProcessor.java

示例2: shutdown

import com.amazonaws.services.kinesis.clientlibrary.exceptions.ThrottlingException; //导入依赖的package包/类
@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;
}
 
开发者ID:SumoLogic,项目名称:sumologic-kinesis-connector,代码行数:25,代码来源:KinesisConnectorRecordProcessor.java

示例3: processRecords

import com.amazonaws.services.kinesis.clientlibrary.exceptions.ThrottlingException; //导入依赖的package包/类
@Override
public void processRecords(List<Record> list, IRecordProcessorCheckpointer irpc) {        
    _logger.info("Processing {} records", list.size());
    for(Record r: list){
        String data = new String(r.getData().array());
        long seq = _buffer.next();
        KinesisEvent evt = _buffer.get(seq);
        evt.setData(data);
        _buffer.publish(seq);
    }
    try{
        irpc.checkpoint();
    }
    catch(InvalidStateException | KinesisClientLibDependencyException | ShutdownException | ThrottlingException ex){
        _logger.warn("Exception while checkpointing", ex);
    }
}
 
开发者ID:InformaticaCorp,项目名称:Surf,代码行数:18,代码来源:RecordProcessor.java


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