Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9154 Few improvements/bug fixes in offline image viewer and offline edit viewer
  3. HDFS-9157

[OEV and OIV] : Unnecessary parsing for mandatory arguements if "-h" option is specified as the only option

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • Reviewed

    Description

      In both tools, if "-h" is specified as the only option, it throws error as input and output not specified.

      master:/home/nijel/hadoop-3.0.0-SNAPSHOT/bin # ./hdfs oev -h
      Error parsing command-line options: Missing required options: o, i
      Usage: bin/hdfs oev [OPTIONS] -i INPUT_FILE -o OUTPUT_FILE
      

      In code the parsing is happening before the "-h" option is verified
      Can add code to return after initial check.

          if (argv.length == 1 && argv[1] == "-h") {
            printHelp();
            return 0;
          }
      

      Attachments

        1. HDFS-9157_6.patch
          8 kB
          nijel
        2. HDFS-9157_5.patch
          8 kB
          nijel
        3. HDFS-9157_4.patch
          8 kB
          nijel
        4. HDFS-9157_3.patch
          9 kB
          nijel
        5. HDFS-9157_2.patch
          9 kB
          nijel
        6. HDFS-9157_1.patch
          9 kB
          nijel

        Activity

          People

            nijel nijel
            nijel nijel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: