[ 
https://issues.apache.org/jira/browse/HDFS-7632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Nauroth updated HDFS-7632:
--------------------------------
    Attachment: HDFS-7632.001.patch

The root cause is in {{MiniDFSCluster#getStorageDirPath}}, which had been 
hard-coded to assume 2 storage locations per DataNode.  The attached patch 
fixes it to use the number of storage locations per DataNode requested by the 
caller.  This required changing a few methods from static methods to instance 
methods, and then the corresponding call sites in the test code needed to be 
updated.  {{MiniDFSCluster}} is annotated as {{Unstable}}, so we're free to 
make this change.  It's also listed as {{LimitedPrivate}} for a few projects.  
I grep'd those projects and didn't see any calls to these methods.

> MiniDFSCluster configures DataNode data directories incorrectly if using more 
> than 1 DataNode and more than 2 storage locations per DataNode.
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-7632
>                 URL: https://issues.apache.org/jira/browse/HDFS-7632
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-7632.001.patch
>
>
> {{MiniDFSCluster}} allows the caller to set the number of storage locations 
> per DataNode.  If this number is set higher than 2, and if the cluster is 
> configured with more than 1 DataNode, then the calculation of the storage 
> directory paths will be incorrect.  Multiple DataNodes will attempt to use 
> the same storage directory, and one of them will fail while trying to acquire 
> the file lock.



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

Reply via email to