You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2021/03/15 18:43:00 UTC

[jira] [Commented] (BEAM-11815) fail to read more than 1M of items

    [ https://issues.apache.org/jira/browse/BEAM-11815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301874#comment-17301874 ] 

Kenneth Knowles commented on BEAM-11815:
----------------------------------------

Are you saying that DynamoDBIO is corrupting data? Pinging [~dennisyung] and [~iemejia] who may have some expertise in the connector.

> fail to read more than 1M of items
> ----------------------------------
>
>                 Key: BEAM-11815
>                 URL: https://issues.apache.org/jira/browse/BEAM-11815
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-aws
>            Reporter: Mohammad
>            Priority: P1
>
> In processElement:
>  
>  
> {code:java}
> private static class ReadFn<T> extends DoFn<Read<T>, T> {
>  @ProcessElement
>  public void processElement(@Element Read<T> spec, OutputReceiver<T> out) {
>  AmazonDynamoDB client = spec.getAwsClientsProvider().createDynamoDB();
>  ScanRequest scanRequest = spec.getScanRequestFn().apply(null);
>  scanRequest.setSegment(spec.getSegmentId());
>  ScanResult scanResult = client.scan(scanRequest);
>  out.output(spec.getScanResultMapperFn().apply(scanResult));
>  }
>  }{code}
>  
>  
> if total requested items > 1M dynamodb will only send upto 1M of data  and expects client to read remaining items through LastEvaluatedKey (see [this|https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/dynamodbv2/model/ScanRequest.html#setLimit-java.lang.Integer-])
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)