You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Hanisha Koneru (JIRA)" <ji...@apache.org> on 2017/01/24 23:05:26 UTC
[jira] [Updated] (HDFS-11362) Storage#shouldReturnNextDir should
check for null dirType
[ https://issues.apache.org/jira/browse/HDFS-11362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hanisha Koneru updated HDFS-11362:
----------------------------------
Status: Patch Available (was: Open)
> Storage#shouldReturnNextDir should check for null dirType
> ---------------------------------------------------------
>
> Key: HDFS-11362
> URL: https://issues.apache.org/jira/browse/HDFS-11362
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs
> Reporter: Hanisha Koneru
> Assignee: Hanisha Koneru
> Priority: Minor
> Attachments: HDFS-11362.000.patch
>
>
> _Storage#shouldReturnNextDir_ method checks if the next Storage directory is of the same type us dirType.
> {noformat}
> private boolean shouldReturnNextDir() {
> StorageDirectory sd = getStorageDir(nextIndex);
> return (dirType == null || sd.getStorageDirType().isOfType(dirType)) &&
> (includeShared || !sd.isShared());
> }
> {noformat}
> There is a possibility that sd.getStorageDirType() returns null (default dirType is null). Hence, before checking for type match, we should make sure that the value returned by sd.getStorageDirType() is not null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org