hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6731) Run "hdfs zkfc-formatZK" on a server in a non-namenode will cause a null pointer exception.
Date Wed, 23 Jul 2014 13:58:45 GMT

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

Hudson commented on HDFS-6731:
------------------------------

FAILURE: Integrated in Hadoop-Hdfs-trunk #1813 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1813/])
HDFS-6731. Run 'hdfs zkfc -formatZK' on a server in a non-namenode will cause a null pointer
exception. Contributed by Masatake Iwasaki (brandonli: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1612715)
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java


> Run "hdfs zkfc-formatZK" on a server in a non-namenode  will cause a null pointer exception.
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-6731
>                 URL: https://issues.apache.org/jira/browse/HDFS-6731
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: auto-failover, ha
>    Affects Versions: 2.0.4-alpha, 2.4.0
>            Reporter: WenJin Ma
>            Assignee: Masatake Iwasaki
>             Fix For: 2.6.0
>
>         Attachments: HADOOP-9603-0.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Run "hdfs zkfc-formatZK" on a server in a non-namenode  will cause a null pointer exception.
> {code}
> [hadoop@test bin]$ ./hdfs zkfc -formatZK
> Exception in thread "main" java.lang.NullPointerException
> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
> at org.apache.hadoop.hdfs.tools.NNHAServiceTarget.<init>(NNHAServiceTarget.java:57)
> at org.apache.hadoop.hdfs.tools.DFSZKFailoverController.create(DFSZKFailoverController.java:128)
> at org.apache.hadoop.hdfs.tools.DFSZKFailoverController.main(DFSZKFailoverController.java:172)
> {code}
> I look at the code, found in the org.apache.hadoop.hdfs.DFSUtil.getSuffixIDs () method
does not make judgments on this issue.
> {code}
> static String[] getSuffixIDs(final Configuration conf, final String addressKey,
>       String knownNsId, String knownNNId,
>       final AddressMatcher matcher) {
>     String nameserviceId = null;
>     String namenodeId = null;
>     int found = 0;
>    //......do something
>    if (found > 1) { // Only one address must match the local address
>       String msg = "Configuration has multiple addresses that match "
>           + "local node's address. Please configure the system with "
>           + DFS_NAMESERVICE_ID + " and "
>           + DFS_HA_NAMENODE_ID_KEY;
>       throw new HadoopIllegalArgumentException(msg);
>     }
>     // If the IP is not a local address, found to be less than 1.
>     // There should be throw an exception with clear message rather than cause a null
pointer exception.       
>     return new String[] { nameserviceId, namenodeId };
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message