Yuanliang Zhang created HDFS-15395:
--------------------------------------
Summary: The exception message of
"DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY" is not precise
Key: HDFS-15395
URL: https://issues.apache.org/jira/browse/HDFS-15395
Project: Hadoop HDFS
Issue Type: Bug
Components: namenode
Reporter: Yuanliang Zhang
The exception message of "DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY" in DFSUtil.java
may not be precise.
The current message is: "Incorrect configuration: namenode address
{color:#FF0000}DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY *or*
DFS_NAMENODE_RPC_ADDRESS_KEY is not configured{color}"
{code:java}
public static Map<String, Map<String, InetSocketAddress>>
getNNServiceRpcAddresses(
Configuration conf) throws IOException {
...
Map<String, Map<String, InetSocketAddress>> addressList =
DFSUtilClient.getAddresses(conf, defaultAddress,
DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY,
DFS_NAMENODE_RPC_ADDRESS_KEY);
if (addressList.isEmpty()) {
throw new IOException("Incorrect configuration: namenode address "
+ DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY + " or "
+ DFS_NAMENODE_RPC_ADDRESS_KEY
+ " is not configured.");
}
return addressList;
}
{code}
However, from the doc:
{quote}If the value of this property (dfs.namenode.servicerpc-address) is unset
the value of dfs.namenode.rpc-address will be used as the default.
{quote}
The code in NameNode.java also confirm this logic. So I think this message may
need to refined to be consistent with the doc and code logic that the
dfs.namenode.rpc-address should always be set.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]