Nemo Chen created HDFS-10750:
--------------------------------
Summary: Log refactoring: method invocation should be replaced by
a shorter method
Key: HDFS-10750
URL: https://issues.apache.org/jira/browse/HDFS-10750
Project: Hadoop HDFS
Issue Type: Bug
Affects Versions: 2.7.2
Reporter: Nemo Chen
Similar to the fix for AVRO-115. In file:
hadoop-rel-release-2.7.2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
in line 695, the logging code:
{code:borderStyle=solid}
LOG.info(getRole() + " RPC up at: " + rpcServer.getRpcAddress());
{code}
In the same class, there is a method in line 907:
{code:borderStyle=solid}
/**
* @return NameNode RPC address
*/
public InetSocketAddress getNameNodeAddress() {
return rpcServer.getRpcAddress();
}
{code}
We can tell that rpcServer.getRpcAddress() could be replaced by method
getNameNodeAddress() for the case of readability and simplicity
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]