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

Sean Busbey commented on HDFS-8332:
-----------------------------------

Being incompatible and breaking some tests are two different problems. It's 
true that just because tests fail it does not mean a change is incompatible. 
However, this change is still incompatible.

* The [FileSystem specification doesn't say that all operations must fail after 
a 
close|http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/filesystem/filesystem.html]
* Neither does the javadoc on FileSystem.close (though it does imply it)
* The [specification specifically says that HDFS' behavior is 
correct|http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/filesystem/extending.html]

I agree that this change is good and one we should do. However, it *will* break 
some downstream user code that worked before. A good sign of this is that it 
broke some code maintained by the Hadoop community, ostensibly those most 
familiar with how HDFS works.

It's important that we properly document when we change things in a way that 
might break downstream users (wether or not they were doing the correct thing 
before) so that they can make appropriate adjustments before upgrading, 
especially when those changes are in a minor version.

> DFS client API calls should check filesystem closed
> ---------------------------------------------------
>
>                 Key: HDFS-8332
>                 URL: https://issues.apache.org/jira/browse/HDFS-8332
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 2.8.0
>
>         Attachments: HDFS-8332-000.patch, HDFS-8332-001.patch, 
> HDFS-8332-002-Branch-2.patch, HDFS-8332-002.patch, 
> HDFS-8332.001.branch-2.patch
>
>
> I could see {{listCacheDirectives()}} and {{listCachePools()}} APIs can be 
> called even after the filesystem close. Instead these calls should do 
> {{checkOpen}} and throws:
> {code}
> java.io.IOException: Filesystem closed
>       at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:464)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to