hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nemo Chen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-10750) Log refactoring: method invocation should be replaced by a shorter method
Date Thu, 11 Aug 2016 17:40:20 GMT
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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message