List of usage examples for com.amazonaws.services.dynamodbv2.model ResourceNotFoundException ResourceNotFoundException
public ResourceNotFoundException(String message)
From source file:org.apache.hadoop.dynamodb.write.AbstractDynamoDBRecordWriter.java
License:Open Source License
public AbstractDynamoDBRecordWriter(JobConf jobConf, Progressable progressable) { this.progressable = progressable; client = new DynamoDBClient(jobConf); tableName = jobConf.get(DynamoDBConstants.OUTPUT_TABLE_NAME); if (tableName == null) { throw new ResourceNotFoundException("No output table name was specified."); }/* ww w .j a va2s . c o m*/ IopsCalculator iopsCalculator = new WriteIopsCalculator(createJobClient(jobConf), client, tableName); iopsController = new IopsController(iopsCalculator, DEFAULT_AVERAGE_ITEM_SIZE_IN_BYTES, DynamoDBOperationType.WRITE); permissibleWritesPerSecond = iopsController.getTargetItemsPerSecond(); log.info("Number of allocated item writes per second: " + permissibleWritesPerSecond); // Hive may not have a valid Reporter and pass in null progressable // TODO Check whether this would happen when excluding Hive if (progressable instanceof Reporter) { reporter = (Reporter) progressable; } }