spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo Vanzin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-22519) Remove unnecessary stagingDirPath null check in ApplicationMaster.cleanupStagingDir()
Date Tue, 14 Nov 2017 23:21:01 GMT

     [ https://issues.apache.org/jira/browse/SPARK-22519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcelo Vanzin resolved SPARK-22519.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

Issue resolved by pull request 19749
[https://github.com/apache/spark/pull/19749]

> Remove unnecessary stagingDirPath null check in ApplicationMaster.cleanupStagingDir()
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-22519
>                 URL: https://issues.apache.org/jira/browse/SPARK-22519
>             Project: Spark
>          Issue Type: Improvement
>          Components: YARN
>    Affects Versions: 2.2.0
>            Reporter: Devaraj K
>            Priority: Trivial
>             Fix For: 2.3.0
>
>
> In the below, the condition checks whether the stagingDirPath is null but stagingDirPath
never becomes null. If SPARK_YARN_STAGING_DIR env var is null then it throws NPE while creating
the Path.
> {code:title=ApplicationMaster.scala|borderStyle=solid}
>         stagingDirPath = new Path(System.getenv("SPARK_YARN_STAGING_DIR"))
>         if (stagingDirPath == null) {
>           logError("Staging directory is null")
>           return
>         }
> {code}
> Here we need to check whether the System.getenv("SPARK_YARN_STAGING_DIR") is null or
not, not the stagingDirPath.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message