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

ASF GitHub Bot commented on HADOOP-19211:
-----------------------------------------

steveloughran commented on code in PR #6904:
URL: https://github.com/apache/hadoop/pull/6904#discussion_r1681602857


##########
hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSFileSystemStore.java:
##########
@@ -527,17 +530,14 @@ protected OSSListRequest createListObjectsRequest(String 
prefix,
    * @return This method returns null if the key is not found.
    */
   public InputStream retrieve(String key, long byteStart, long byteEnd) {
-    try {
-      GetObjectRequest request = new GetObjectRequest(bucketName, key);
-      request.setRange(byteStart, byteEnd);
-      InputStream in = ossClient.getObject(request).getObjectContent();
-      statistics.incrementReadOps(1);
-      return in;
-    } catch (OSSException | ClientException e) {
-      LOG.error("Exception thrown when store retrieves key: "
-              + key + ", exception: " + e);
-      return null;
+    GetObjectRequest request = new GetObjectRequest(bucketName, key);
+    if (useStandardHttpRangeBehavior) {
+      request.addHeader("x-oss-range-behavior", "standard");

Review Comment:
   1. can you document this
   2. are multiple ranges supported? aws s3 doesnt, though dell storage does





> AliyunOSS: Support vectored read API
> ------------------------------------
>
>                 Key: HADOOP-19211
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19211
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/oss
>    Affects Versions: 3.2.4, 3.3.6
>            Reporter: wujinhu
>            Assignee: wujinhu
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to