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

LogLevel#main throws exception if no arguments provided

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None

      Description

      root@b9ab37566005:/# hadoop daemonlog
      
      Usage: General options are:
      	[-getlevel <host:port> <classname> [-protocol (http|https)]
      	[-setlevel <host:port> <classname> <level> [-protocol (http|https)]
      
      Exception in thread "main" org.apache.hadoop.HadoopIllegalArgumentException: No arguments specified
      	at org.apache.hadoop.log.LogLevel$CLI.parseArguments(LogLevel.java:138)
      	at org.apache.hadoop.log.LogLevel$CLI.run(LogLevel.java:106)
      	at org.apache.hadoop.log.LogLevel.main(LogLevel.java:70)
      

      I think we can catch the exception in the main method, and dump a log error message instead of throw the stack which may frustrate users.

        Attachments

        1. HADOOP-13697.001.patch
          2 kB
          Mingliang Liu
        2. HADOOP-13697.000.patch
          1 kB
          Mingliang Liu

          Issue Links

            Activity

              People

              • Assignee:
                liuml07 Mingliang Liu
                Reporter:
                liuml07 Mingliang Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: