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

ArrayIndexOutOfBoundsException with empty environment variables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.8.0, 3.0.0-alpha1
    • yarn
    • None
    • Reviewed

    Description

      Looking at line 80 of org.apache.hadoop.yarn.util.Apps an index out of range exception occurs if an environment variable is encountered without a value.

      java.lang.ArrayIndexOutOfBoundsException: 1
      	at org.apache.hadoop.yarn.util.Apps.setEnvFromInputString(Apps.java:80)
      

      I believe this occurs because java will not return empty strings from the split method. Similar to this http://stackoverflow.com/questions/14602062/java-string-split-removed-empty-values

      Attachments

        1. YARN-3768.000.patch
          3 kB
          Zhihai Xu
        2. YARN-3768.001.patch
          3 kB
          Zhihai Xu
        3. YARN-3768.002.patch
          6 kB
          Gera Shegalov
        4. YARN-3768.003.patch
          6 kB
          Gera Shegalov
        5. YARN-3768.004.patch
          6 kB
          Zhihai Xu

        Issue Links

          Activity

            People

              zxu Zhihai Xu
              joeferner Joe Ferner
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: