[
https://issues.apache.org/jira/browse/HADOOP-14722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Loughran updated HADOOP-14722:
------------------------------------
Attachment: HADOOP-14722-005.patch
I think it's OK, though I had a hard time reading through skip(). I've added
some comments there.
I also found it a bit odd reading through seek(), as the value of {{offset}} is
negative for forward seeks; this is the opposite of other examples
{{S3AInputStream.seekInStream()}}, {{SwiftNativeInputStream,seek()}}. It'd
really be good for future maintenance if this class's seek was consistent
*unless there's a really good reason not to*,
This has just made clear to me we've no FS contract tests for the semantics of
{{InputStream.skip()}}. I'll do it in the newly created HADOOP-14736 if/when I
get round to it.
Interestingly, {{InputStream.skip()}} is pretty vaguely defined; the base class
returns 0 for a -ve offset, and again, on any seek past EOF.
{{BlockBlobInputStream}} isn't following that, but neither does the only
implementation of skip() which is tested, the CryptoStream. Nobody has
complained so far.
h3. {{TestBlockBlobInputStream.test_0201_RandomReadTest}}
There's a lot of duplication in this test. Factored it out into a helper method
for a bit of clarity.
Also: noticed the {{assertEquals()}} args in {{test_0200_BasicReadTestV2}} were
the wrong way round: fixed.
Overall, I'm happy, as long as you are confident that the tests verify the
problem has been fixed. I would like that {{offset}} field inverted for
consistency with the others (or a justification for not doing so), and a full
test run through of my modified patch. I've already tested
{{TestBlockBlobInputStream}} against Azure Ireland.
> Azure: BlockBlobInputStream position incorrect after seek
> ---------------------------------------------------------
>
> Key: HADOOP-14722
> URL: https://issues.apache.org/jira/browse/HADOOP-14722
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs/azure
> Reporter: Thomas Marquardt
> Assignee: Thomas Marquardt
> Attachments: HADOOP-14722-001.patch, HADOOP-14722-002.patch,
> HADOOP-14722-003.patch, HADOOP-14722-005.patch
>
>
> The seek, skip, and getPos methods of BlockBlobInputStream do not correctly
> account for the stream's internal buffer. This results in invalid stream
> positions.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]