[ https://issues.apache.org/jira/browse/HADOOP-19139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17840736#comment-17840736 ]
ASF GitHub Bot commented on HADOOP-19139: ----------------------------------------- anmolanmol1234 commented on code in PR #6699: URL: https://github.com/apache/hadoop/pull/6699#discussion_r1579209761 ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemAuthorization.java: ########## @@ -328,13 +328,13 @@ private void executeOp(Path reqPath, AzureBlobFileSystem fs, fs.open(reqPath); break; case Open: - InputStream is = fs.open(reqPath); - if (getConfiguration().getHeadOptimizationForInputStream()) { - try { - is.read(); - } catch (IOException ex) { - is.close(); - throw (IOException) ex.getCause(); + try(InputStream is = fs.open(reqPath)) { + if (getConfiguration().isInputStreamLazyOptimizationEnabled()) { + try { + is.read(); + } catch (IOException ex) { + throw (IOException) ex.getCause(); + } Review Comment: okay missed that part, males semse ########## hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemAuthorization.java: ########## @@ -328,13 +328,13 @@ private void executeOp(Path reqPath, AzureBlobFileSystem fs, fs.open(reqPath); break; case Open: - InputStream is = fs.open(reqPath); - if (getConfiguration().getHeadOptimizationForInputStream()) { - try { - is.read(); - } catch (IOException ex) { - is.close(); - throw (IOException) ex.getCause(); + try(InputStream is = fs.open(reqPath)) { + if (getConfiguration().isInputStreamLazyOptimizationEnabled()) { + try { + is.read(); + } catch (IOException ex) { + throw (IOException) ex.getCause(); + } Review Comment: okay missed that part, makes sense > [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: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org