hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingliang Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11085) Add unit tests for NameNode failing to startup when name dir can not be written
Date Thu, 03 Nov 2016 20:27:58 GMT

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

Mingliang Liu commented on HDFS-11085:

The patch looks good to me overall.

Some minor comments:
# Checkstyle warning is related.
# MiniDFSCluster can be used in try-catch. Shorter and neater.
# I think we can use {{Paths.get()}} for joining path strings. Assuming file path separate
is / is not platform independent probably. Also if there are methods in JDK or Apache component
that work just fine, I hesitate to use third party libraries.
661	    final String nnDirStr = Joiner.on("/").join(
662	        hdfsDir.toString(),
663	        GenericTestUtils.getMethodName(), "name");
# I don't think we need the implementation details about the Collection type (List). We just
need the only element in the collections, don't we?
673	      /* get and verify NN dir */
674	      List<URI> nameDirs = (List<URI>) FSNamesystem.getNamespaceDirs(config);
Collection<URI> nameDirs = FSNamesystem.getNamespaceDirs(config);
final URI nameDir = nameDirs.iterator().next();

> Add unit tests for NameNode failing to startup when name dir can not be written
> -------------------------------------------------------------------------------
>                 Key: HDFS-11085
>                 URL: https://issues.apache.org/jira/browse/HDFS-11085
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode, test
>            Reporter: Mingliang Liu
>            Assignee: Xiaobing Zhou
>         Attachments: HDFS-11085.000.patch
> This can be placed in {{org.apache.hadoop.hdfs.server.namenode.TestStartup}} test class.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message