HADOOP-14774. S3A case "testRandomReadOverBuffer" failed due to improper range parameter.
Contributed by Yonger.
(cherry picked from commit 83449abb40
)
This commit is contained in:
parent
05b4abf537
commit
5757600b8d
|
@ -152,7 +152,7 @@ public class S3AInputStream extends FSInputStream implements CanSetReadahead {
|
|||
streamStatistics.streamOpened();
|
||||
try {
|
||||
GetObjectRequest request = new GetObjectRequest(bucket, key)
|
||||
.withRange(targetPos, contentRangeFinish);
|
||||
.withRange(targetPos, contentRangeFinish - 1);
|
||||
if (S3AEncryptionMethods.SSE_C.equals(serverSideEncryptionAlgorithm) &&
|
||||
StringUtils.isNotBlank(serverSideEncryptionKey)){
|
||||
request.setSSECustomerKey(new SSECustomerKey(serverSideEncryptionKey));
|
||||
|
|
Loading…
Reference in New Issue