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

ASF GitHub Bot commented on HADOOP-19650:
-----------------------------------------

anujmodi2021 commented on code in PR #7880:
URL: https://github.com/apache/hadoop/pull/7880#discussion_r2287442313


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java:
##########
@@ -795,10 +801,10 @@ public boolean mkdirs(final Path f, final FsPermission 
permission) throws IOExce
 
   @Override
   public synchronized void close() throws IOException {
-    if (isClosed) {
+    if (isClosed()) {

Review Comment:
   fs.close() is supposed to be idempotent IMO





> ABFS: NPE when close() called on uninitialized filesystem
> ---------------------------------------------------------
>
>                 Key: HADOOP-19650
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19650
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/azure
>    Affects Versions: 3.4.2
>            Reporter: Steve Loughran
>            Assignee: Anuj Modi
>            Priority: Minor
>              Labels: pull-request-available
>
> code
> {code}
>   public void testABFSConstructor() throws Throwable {
>     new AzureBlobFileSystem().close();
>   }
> {code}
> stack
> {code}
> [ERROR] org.apache.hadoop.validator.TestRuntimeValid.testABFSConstructor -- 
> Time elapsed: 0.003 s <<< ERROR!
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.getClient()" because 
> "this.abfsStore" is null
>         at 
> org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.close(AzureBlobFileSystem.java:800)
>         at 
> org.apache.hadoop.validator.TestRuntimeValid.testABFSConstructor(TestRuntimeValid.java:49)
> {code}



--
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

Reply via email to