@Override public ScanResult scan(String tableName, java.util.List<String> attributesToGet) { return scan(new ScanRequest().withTableName(tableName).withAttributesToGet(attributesToGet)); }
@Override public ScanResult scan(String tableName, java.util.Map<String, Condition> scanFilter) { return scan(new ScanRequest().withTableName(tableName).withScanFilter(scanFilter)); }
@Override public ScanResult scan(String tableName, java.util.List<String> attributesToGet, java.util.Map<String, Condition> scanFilter) { return scan(new ScanRequest().withTableName(tableName).withAttributesToGet(attributesToGet).withScanFilter(scanFilter)); }
ScanResult res; try { res = dynamoDB.scan(req); } catch (AmazonServiceException ex) { LOGGER.error(ex);
@Override public Set<String> getProjects() { return dynamoDBClient.scan(new ScanRequest().withTableName(tableConfig.getTableName()) .withAttributesToGet("project")).getItems().stream() .map(e -> e.get("project").getS()) .collect(Collectors.toSet()); }
@Override public List<MaterializedView> getMaterializedViews(String project) { List<Map<String, AttributeValue>> items = dynamoDBClient.scan(new ScanRequest() .withTableName(tableConfig.getTableName()) .withFilterExpression("#P = :pValue AND begins_with(type_table_name, :prefix)") .withExpressionAttributeNames(of("#P", "project")) .withExpressionAttributeValues(of( ":pValue", new AttributeValue(project), ":prefix", new AttributeValue("materialized_")))).getItems(); return items.stream() .map(item -> JsonHelper.read(item.get("value").getS(), MaterializedView.class)) .collect(Collectors.toList()); }
scanRequest.setTableName(tableName); scanRequest.setScanFilter(scanFilter); return scan(scanRequest);
scanRequest.setTableName(tableName); scanRequest.setAttributesToGet(attributesToGet); return scan(scanRequest);
scanRequest.setAttributesToGet(attributesToGet); scanRequest.setScanFilter(scanFilter); return scan(scanRequest);
@Override public ScanResult call() { log.debug("Executing DynamoDB scan: " + scanRequest); return dynamoDB.scan(scanRequest); } }, reporter, PrintCounter.DynamoDBReadThrottle);
@Override public ScanResult call() { log.debug("Executing DynamoDB scan: " + scanRequest); return dynamoDB.scan(scanRequest); } }, reporter, PrintCounter.DynamoDBReadThrottle);
public static ScanResult scanTable(AmazonDynamoDBClient client, String tableName) { return client.scan(new ScanRequest().withTableName(tableName)); }
@Override public ScanResult scan(String tableName, java.util.List<String> attributesToGet) { return scan(new ScanRequest().withTableName(tableName).withAttributesToGet(attributesToGet)); }
@Override public ScanResult scan(String tableName, java.util.Map<String, Condition> scanFilter) { return scan(new ScanRequest().withTableName(tableName).withScanFilter(scanFilter)); }
for (int attempts = 1; !bSuccess; attempts++) { try { scanResult = m_ddbClient.scan(scanRequest); if (attempts > 1) { m_logger.info("scan() succeeded on attempt #{}", attempts);
@Override public Collection<QueuedJob> readAll() { List<QueuedJob> queuedJobs = new LinkedList<>(); Map<String, AttributeValue> lastKey = null; do { LOG.debug("Fetching a page of jobs from DynamoDB!"); ScanRequest scanRequest = new ScanRequest() .withTableName(tableName) .withExclusiveStartKey(lastKey); ScanResult result = client.scan(scanRequest); for (Map<String, AttributeValue> item : result.getItems()) { queuedJobs.add(queuedJobFromMap(item)); } lastKey = result.getLastEvaluatedKey(); } while(lastKey != null); return queuedJobs; }
@Override public ScanResult scan(String tableName, java.util.List<String> attributesToGet, java.util.Map<String, Condition> scanFilter) { return scan(new ScanRequest().withTableName(tableName).withAttributesToGet(attributesToGet).withScanFilter(scanFilter)); }
ScanResult scanResult = m_client.scan(scanRequest); List<Map<String, AttributeValue>> itemList = scanResult.getItems(); if (itemList.size() == 0) break;
private static void findProductsForPriceLessThanZero() { Map<String, AttributeValue> expressionAttributeValues = new HashMap<String, AttributeValue>(); expressionAttributeValues.put(":pr", new AttributeValue().withN("100")); ScanRequest scanRequest = new ScanRequest() .withTableName(tableName) .withFilterExpression("Price < :pr") .withExpressionAttributeValues(expressionAttributeValues) .withProjectionExpression("Id, Title, ProductCategory, Price"); ScanResult result = client.scan(scanRequest); System.out.println("Scan of " + tableName + " for items with a price less than 100."); for (Map<String, AttributeValue> item : result.getItems()) { System.out.println(""); printItem(item); } }
.withSegment(segment); ScanResult result = client.scan(scanRequest);