Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13486

Method invocation in log can be replaced by variable because the variable's toString method contain more info

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.2
    • None
    • None

    Description

      Similar to the fix in HADOOP-6419, in file:

      hadoop-rel-release-2.7.2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java

      Connection c = (Connection)key.attachment();
      ...
      LOG.info(Thread.currentThread().getName() + ": readAndProcess from client " + c.getHostAddress() + " threw exception [" + e + "]", (e instanceof WrappedRpcServerException) ? null : e);
      ...
      

      in class Connection, the toString method contains both getHostAddress() and remotePort

      public String toString() {
            return getHostAddress() + ":" + remotePort; 
          }
      

      Therefore the c.getHostAddress() should be replaced by c for simplicity and information wise.

      Attachments

        Issue Links

          Activity

            People

              abukor Attila Bukor
              chenfsd Nemo Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: