You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Genmao Yu (JIRA)" <ji...@apache.org> on 2017/02/13 08:58:41 UTC

[jira] [Comment Edited] (HADOOP-14072) AliyunOSS: Failed to read from stream when seek beyond the download size.

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

Genmao Yu edited comment on HADOOP-14072 at 2/13/17 8:57 AM:
-------------------------------------------------------------

pending for [~drankye] 's review


was (Author: unclegen):
pending for @Kai Zheng 's review

> AliyunOSS: Failed to read from stream when seek beyond the download size.
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-14072
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14072
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/oss
>    Affects Versions: 3.0.0-alpha2
>            Reporter: Genmao Yu
>            Assignee: Genmao Yu
>         Attachments: HADOOP-14072.001.patch
>
>
> {code}
> public synchronized void seek(long pos) throws IOException {
>     checkNotClosed();
>     if (position == pos) {
>       return;
>     } else if (pos > position && pos < position + partRemaining) {
>       AliyunOSSUtils.skipFully(wrappedStream, pos - position);
>       position = pos;
>     } else {
>       reopen(pos);
>     }
>   }
> {code}
> In seek function, we need to update the partRemaining when the seeking position is located in downloaded part.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org