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

Hudson commented on HDFS-15193:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #18100 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/18100/])
HDFS-15193. Improving the error message for missing (ayushsaxena: rev 
696a663cd0a1deb818f6b44ddc8ca20571bac980)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUtil.java
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java


> Improving the error message for missing 
> `dfs.namenode.rpc-address.$NAMESERVICE`
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-15193
>                 URL: https://issues.apache.org/jira/browse/HDFS-15193
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs
>            Reporter: Ctest
>            Assignee: Ctest
>            Priority: Minor
>             Fix For: 3.3.0
>
>         Attachments: HDFS-15193-001.patch, HDFS-15193-002.patch, 
> HDFS-15193-003.patch, HDFS-15193-004.patch
>
>
> I set `dfs.nameservices` with the value of one name service (let’s say `ns1` 
> for simplicity) and forgot to set `dfs.namenode.rpc-address.ns1`. 
> Then I got an error message:
> {code:java}
> [ERROR] testNonFederation(org.apache.hadoop.hdfs.tools.TestGetConf)  Time 
> elapsed: 0.195 s <<< ERROR!
> java.io.IOException: Incorrect configuration: namenode address 
> dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
>     at 
> org.apache.hadoop.hdfs.DFSUtil.getNNServiceRpcAddressesForCluster(DFSUtil.java:629)
>     at 
> org.apache.hadoop.hdfs.tools.TestGetConf.getAddressListFromConf(TestGetConf.java:132)
>     at 
> org.apache.hadoop.hdfs.tools.TestGetConf.verifyAddresses(TestGetConf.java:234)
>     at 
> org.apache.hadoop.hdfs.tools.TestGetConf.testNonFederation(TestGetConf.java:308)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
>     at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.lang.Thread.run(Thread.java:748)
> {code}
>  
> The error message above told me that `dfs.namenode.rpc-address` or 
> `dfs.namenode.servicerpc-address` should be set.
> However, the actual reason for the error is that 
> `dfs.namenode.rpc-address.ns1` or `dfs.namenode.servicerpc-address.ns1` is 
> not set.
>  
> *How to improve* 
> I wrote a patch to improve the error message. Here is the current error 
> message:
> {code:java}
> [ERROR] testNonFederation(org.apache.hadoop.hdfs.tools.TestGetConf)  Time 
> elapsed: 0.195 s <<< ERROR!
> java.io.IOException: Incorrect configuration: namenode address 
> dfs.namenode.servicerpc-address[.$NAMESERVICE] or 
> dfs.namenode.rpc-address[.$NAMESERVICE] is not configured.
> {code}
> Then the users can immediately know that they should set 
> `dfs.namenode.rpc-address.ns1` or `dfs.namenode.servicerpc-address.ns1` 
> according to the error message.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to