Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16525

System.err should be used when error occurs in multiple methods in DFSAdmin class

    XMLWordPrintableJSON

Details

    Description

      System.err should be used when error occurs in multiple methods in DFSAdmin class,as follows:

      //DFSAdmin#refreshCallQueue
      ...
      try{
        proxy.getProxy().refreshCallQueue();
        System.out.println("Refresh call queue successful for "
            + proxy.getAddress());
      }catch (IOException ioe){
        System.out.println("Refresh call queue failed for "
            + proxy.getAddress());
        exceptions.add(ioe);
      }
      ...
      

      The test method closed first in TestDFSAdminWithHA also needs to be modified,otherwise an error will be reported,similar to the following:

      [ERROR] Failures:
      [ERROR]   TestDFSAdminWithHA.testRefreshCallQueueNN1DownNN2Up:726->assertOutputMatches:77 Expected output to match 'Refresh call queue failed for.*
      Refresh call queue successful for.*
      ' but err_output was:
      Refresh call queue failed for localhost/127.0.0.1:12876
      refreshCallQueue: Call From h110/10.1.234.110 to localhost:12876 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused and output was:
      Refresh call queue successful for localhost/127.0.0.1:12878

      Attachments

        Issue Links

          Activity

            People

              it_singer yanbin.zhang
              it_singer yanbin.zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m