hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8332) DistributedFileSystem listCacheDirectives() and listCachePools() API calls should check filesystem closed
Date Wed, 06 May 2015 16:36:00 GMT

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

Chris Nauroth commented on HDFS-8332:
-------------------------------------

Hello [~rakeshr].  Nice find!  Thank you for providing a patch.  It looks good.  I verified
locally that the tests pass, and I agree that the checkstyle warnings are unrelated.

We're very inconsistent about this logic in {{DFSClient}}, even looking beyond these 2 methods.
 See below for a list of the methods I spotted that don't call {{checkOpen}}.

Are you interested in providing a patch that covers all of these, or are you specifically
interested in patching just {{listCacheDirectives}} and {{listCachePools}}?  I'm fine with
either approach.  If you just want get the current patch committed, then I can file a separate
jira for a comprehensive fix across all of these methods.  Please let me know how you'd like
to proceed.

{code}
getBlockSize
getServerDefaults
reportBadBlocks
getLocatedBlocks
getBlockLocations
getBlockStorageLocations
createSymlink
getLinkTarget
setReplication
setStoragePolicy
getStoragePolicies
setSafeMode
listCacheDirectives
refreshNodes
metaSave
setBalancerBandwidth
finalizeUpgrade
getInotifyEventStream
{code}


> DistributedFileSystem listCacheDirectives() and listCachePools() 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
>              Labels: BB2015-05-TBR
>         Attachments: HDFS-8332-000.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)

Mime
View raw message