[
https://issues.apache.org/jira/browse/HADOOP-19139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838458#comment-17838458
]
ASF GitHub Bot commented on HADOOP-19139:
-----------------------------------------
saxenapranav commented on code in PR #6699:
URL: https://github.com/apache/hadoop/pull/6699#discussion_r1569984613
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRandomRead.java:
##########
@@ -192,7 +192,11 @@ public void testSkipBounds() throws Exception {
Path testPath = path(TEST_FILE_PREFIX + "_testSkipBounds");
long testFileLength = assumeHugeFileExists(testPath);
- try (FSDataInputStream inputStream = this.getFileSystem().open(testPath)) {
+ try (FSDataInputStream inputStream = this.getFileSystem()
Review Comment:
There is an assertion on the if we can not seek past contentLength. With
lazy optimization if we open the inputStream with `fs.open()`, the inputStream
would not know the contentLength until first read is done. In this test, there
is no read but only seek and skip. Hence, using
`fs.openWithFile().withFileStatus().build().get()` so that the opened
inputStream is aware of the contentLength and can raise proper exception if
skip is out of contentLength.
> [ABFS]: No GetPathStatus call for opening AbfsInputStream
> ---------------------------------------------------------
>
> Key: HADOOP-19139
> URL: https://issues.apache.org/jira/browse/HADOOP-19139
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Reporter: Pranav Saxena
> Assignee: Pranav Saxena
> Priority: Major
> Labels: pull-request-available
>
> Read API gives contentLen and etag of the path. This information would be
> used in future calls on that inputStream. Prior information of eTag is of not
> much importance.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]