[
https://issues.apache.org/jira/browse/HADOOP-19211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17866904#comment-17866904
]
ASF GitHub Bot commented on HADOOP-19211:
-----------------------------------------
wujinhu commented on code in PR #6904:
URL: https://github.com/apache/hadoop/pull/6904#discussion_r1682025092
##########
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:
Ok, I will add some comments. OSS does not support multiple ranges.
> 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]