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

bin/hdfs should print a message when an invalid command is specified

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.23.1
    • None
    • tools
    • bin/hdfs prints a proper message instead of throwing ClassNotFound java exception.

    Description

      hdfs will currently give a NoClassDefFoundError stacktrace if there's a typo specifying the command.

      hadoop-0.24.0-SNAPSHOT $ ./bin/hdfs dfadmin
      Exception in thread "main" java.lang.NoClassDefFoundError: dfadmin
      Caused by: java.lang.ClassNotFoundException: dfadmin
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      

      Attachments

        1. HDFS-2930.patch
          5 kB
          Hızır Sefa İrken

        Issue Links

          Activity

            People

              Unassigned Unassigned
              eli2 Eli Collins
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: