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

ArrayIndexOutOfBoundsException with empty environment variables

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: yarn
    • Labels:
      None
    • Hadoop Flags:
      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

              • Assignee:
                zxu zhihai xu
                Reporter:
                joeferner Joe Ferner
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: