Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3157

Refactor the exception handling in ConverterUtils#to*Id

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.0
    • Component/s: resourcemanager
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      yarn.cmd application -kill application_123

      Format wrong given for application id or attempt. Exception will be thrown to console with out any info

      15/02/07 22:18:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where
      Exception in thread "main" java.util.NoSuchElementException
      at com.google.common.base.AbstractIterator.next(AbstractIterator.java:75)
      at org.apache.hadoop.yarn.util.ConverterUtils.toApplicationId(ConverterUtils.java:146)
      at org.apache.hadoop.yarn.util.ConverterUtils.toApplicationId(ConverterUtils.java:205)
      at org.apache.hadoop.yarn.client.cli.ApplicationCLI.killApplication(ApplicationCLI.java:383)
      at org.apache.hadoop.yarn.client.cli.ApplicationCLI.run(ApplicationCLI.java:219)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

      Need to add catch block for java.util.NoSuchElementException also

      ./yarn container -status container_e20_1423221031460_0003_01
      Exception in thread "main" java.util.NoSuchElementException
      at com.google.common.base.AbstractIterator.next(AbstractIterator.java:75)
      at org.apache.hadoop.yarn.api.records.ContainerId.fromString(ContainerId.java:227)
      at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:178)

        Attachments

        1. YARN-3157.1.patch
          3 kB
          Bibin Chundatt
        2. YARN-3157.2.patch
          3 kB
          Bibin Chundatt
        3. YARN-3157.2.patch
          3 kB
          Bibin Chundatt
        4. YARN-3157.3.patch
          4 kB
          Bibin Chundatt
        5. YARN-3157.patch
          3 kB
          Bibin Chundatt
        6. YARN-3157.patch
          1 kB
          Bibin Chundatt

          Activity

            People

            • Assignee:
              bibinchundatt Bibin Chundatt
              Reporter:
              bibinchundatt Bibin Chundatt
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: