Ctest created HDFS-15193:
----------------------------
Summary: 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
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 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}
But 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:
[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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]