You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jerryshao <gi...@git.apache.org> on 2017/07/13 04:05:53 UTC

[GitHub] spark pull request #18617: [SPARK-21376][YARN] Fix yarn client token expire ...

GitHub user jerryshao opened a pull request:

    https://github.com/apache/spark/pull/18617

    [SPARK-21376][YARN] Fix yarn client token expire issue when cleaning the staging files in long running scenario

    ## What changes were proposed in this pull request?
    
    This issue happens in long running application with yarn cluster mode, because yarn#client doesn't sync token with AM, so it will always keep the initial token, this token may be expired in the long running scenario, so when yarn#client tries to clean up staging directory after application finished, it will use this expired token and meet token expire issue.
    
    ## How was this patch tested?
    
    Manual verification is secure cluster.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jerryshao/apache-spark SPARK-21376

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18617.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18617
    
----
commit 11a14a36734806c150b2f7855badc5f18e30490c
Author: jerryshao <ss...@hortonworks.com>
Date:   2017-07-13T04:00:00Z

    make sure client process could clean the staging files without getting token expire issue
    
    Change-Id: I851f829d38ab93a4caafb7ca029d34da76f92f76

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    **[Test build #79577 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79577/testReport)** for PR 18617 at commit [`11a14a3`](https://github.com/apache/spark/commit/11a14a36734806c150b2f7855badc5f18e30490c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18617: [SPARK-21376][YARN] Fix yarn client token expire ...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18617#discussion_r127309324
  
    --- Diff: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -192,16 +193,29 @@ private[spark] class Client(
        * Cleanup application staging directory.
        */
       private def cleanupStagingDir(appId: ApplicationId): Unit = {
    -    val stagingDirPath = new Path(appStagingBaseDir, getAppStagingDir(appId))
    -    try {
    -      val preserveFiles = sparkConf.get(PRESERVE_STAGING_FILES)
    -      val fs = stagingDirPath.getFileSystem(hadoopConf)
    -      if (!preserveFiles && fs.delete(stagingDirPath, true)) {
    -        logInfo(s"Deleted staging directory $stagingDirPath")
    +    def cleanupStagingDirInternal(): Unit = {
    +      val stagingDirPath = new Path(appStagingBaseDir, getAppStagingDir(appId))
    +      try {
    +        val preserveFiles = sparkConf.get(PRESERVE_STAGING_FILES)
    --- End diff --
    
    Sure, I will change the code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18617: [SPARK-21376][YARN] Fix yarn client token expire ...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18617#discussion_r127299428
  
    --- Diff: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -192,16 +193,29 @@ private[spark] class Client(
        * Cleanup application staging directory.
        */
       private def cleanupStagingDir(appId: ApplicationId): Unit = {
    -    val stagingDirPath = new Path(appStagingBaseDir, getAppStagingDir(appId))
    -    try {
    -      val preserveFiles = sparkConf.get(PRESERVE_STAGING_FILES)
    -      val fs = stagingDirPath.getFileSystem(hadoopConf)
    -      if (!preserveFiles && fs.delete(stagingDirPath, true)) {
    -        logInfo(s"Deleted staging directory $stagingDirPath")
    +    def cleanupStagingDirInternal(): Unit = {
    +      val stagingDirPath = new Path(appStagingBaseDir, getAppStagingDir(appId))
    +      try {
    +        val preserveFiles = sparkConf.get(PRESERVE_STAGING_FILES)
    --- End diff --
    
    You could do this check before even trying anything else in this method (just return early).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/79577/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Hi, All.
    Can we have this on `branch-2.2`, too?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Merging to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18617: [SPARK-21376][YARN] Fix yarn client token expire ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/18617


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    **[Test build #79593 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79593/testReport)** for PR 18617 at commit [`c83d426`](https://github.com/apache/spark/commit/c83d426d3d40dda22e4ff339213e7903a2b3b265).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    **[Test build #79593 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79593/testReport)** for PR 18617 at commit [`c83d426`](https://github.com/apache/spark/commit/c83d426d3d40dda22e4ff339213e7903a2b3b265).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/79593/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    **[Test build #79577 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79577/testReport)** for PR 18617 at commit [`11a14a3`](https://github.com/apache/spark/commit/11a14a36734806c150b2f7855badc5f18e30490c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18617: [SPARK-21376][YARN] Fix yarn client token expire issue w...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/18617
  
    @tgravescs @vanzin can you please help to review, thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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