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

hadoop shell commands should print usage if not given a class

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: scripts
    • Labels:
      None

      Description

      [root@bigtop-fedora-15 ~]# hdfs foobar
      Exception in thread "main" java.lang.NoClassDefFoundError: foobar
      Caused by: java.lang.ClassNotFoundException: foobar
      at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
      Could not find the main class: foobar. Program will exit.

      Instead of loading any class, it would be nice to explain the command is not valid and to call print_usage()

        Attachments

        1. HDFS-2565.patch
          2 kB
          Chu Tong
        2. HDFS-2565.patch
          2 kB
          Chu Tong
        3. HADOOP-11092.patch
          3 kB
          Allen Wittenauer

          Issue Links

            Activity

              People

              • Assignee:
                aw Allen Wittenauer
                Reporter:
                bmahe Bruno Mahé
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: