You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "Yogi Devendra (JIRA)" <ji...@apache.org> on 2016/08/09 06:08:20 UTC
[jira] [Updated] (APEXMALHAR-2174) S3 File Reader reading more data
than expected
[ https://issues.apache.org/jira/browse/APEXMALHAR-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yogi Devendra updated APEXMALHAR-2174:
--------------------------------------
Fix Version/s: 3.5.0
> S3 File Reader reading more data than expected
> ----------------------------------------------
>
> Key: APEXMALHAR-2174
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2174
> Project: Apache Apex Malhar
> Issue Type: Bug
> Reporter: Chaitanya
> Assignee: Chaitanya
> Fix For: 3.5.0
>
>
> This is observed through the AWS billing.
> Issue might be the S3InputStream.read() which is used in readEntity().
> Reading the block can be achieved through the AmazonS3 api's. So, I am proposing the following solution:
> ```
> GetObjectRequest rangeObjectRequest = new GetObjectRequest(
> bucketName, key);
> rangeObjectRequest.setRange(startByte, noOfBytes);
> S3Object objectPortion = s3Client.getObject(rangeObjectRequest);
> S3ObjectInputStream wrappedStream = objectPortion.getObjectContent();
> byte[] record = ByteStreams.toByteArray(wrappedStream);
> Advantages of this solution: Parallel read will work for all types of s3 file systems.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)