You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by aarondav <gi...@git.apache.org> on 2014/11/06 02:16:44 UTC

[GitHub] spark pull request: [SPARK-4236] Cleanup removed applications' fil...

GitHub user aarondav opened a pull request:

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

    [SPARK-4236] Cleanup removed applications' files in shuffle service

    This relies on a hook from whoever is hosting the shuffle service to invoke removeApplication() when the application is completed. Once invoked, we will clean up all the executors' shuffle directories we know about.

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

    $ git pull https://github.com/aarondav/spark cleanup

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

    https://github.com/apache/spark/pull/3126.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 #3126
    
----
commit 0028241bc604def395f2de93f0c692eba3884ec6
Author: Aaron Davidson <aa...@databricks.com>
Date:   2014-11-05T18:27:51Z

    [SPARK-4236] Cleanup removed applications' files in shuffle service
    
    This relies on a hook from whoever is hosting the shuffle service to invoke removeApplication() when the application is completed. Once invoked, we will clean up all the executors' shuffle directories we know about.

----


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19977559
  
    --- Diff: network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockManager.java ---
    @@ -43,13 +50,22 @@
     public class ExternalShuffleBlockManager {
       private final Logger logger = LoggerFactory.getLogger(ExternalShuffleBlockManager.class);
     
    -  // Map from "appId-execId" to the executor's configuration.
    -  private final ConcurrentHashMap<String, ExecutorShuffleInfo> executors =
    -    new ConcurrentHashMap<String, ExecutorShuffleInfo>();
    +  // Map containing all registered executors' metadata.
    +  private final ConcurrentMap<AppExecId, ExecutorShuffleInfo> executors;
     
    -  // Returns an id suitable for a single executor within a single application.
    -  private String getAppExecId(String appId, String execId) {
    -    return appId + "-" + execId;
    +  // Single-threaded executor used to perform expensive recursive directory deletion.
    +  private final Executor directoryCleanupExecutor;
    --- End diff --
    
    This is confusing because elsewhere when we say `executors` we mean Spark executors. I think we should call this something else `directoryCleaner` or something (and update the comment)


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19981671
  
    --- Diff: network/common/src/main/java/org/apache/spark/network/util/JavaUtils.java ---
    @@ -73,4 +79,58 @@ public static int nonNegativeHash(Object obj) {
         int hash = obj.hashCode();
         return hash != Integer.MIN_VALUE ? Math.abs(hash) : 0;
       }
    +
    +  /**
    +   * Delete a file or directory and its contents recursively.
    +   * Don't follow directories if they are symlinks.
    +   * Throws an exception if deletion is unsuccessful.
    +   */
    +  public static void deleteRecursively(File file) throws IOException {
    +    if (file == null) { return; }
    +
    +    if (file.isDirectory() && !isSymlink(file)) {
    +      IOException savedIOException = null;
    +      for (File child : listFilesSafely(file)) {
    +        try {
    +          deleteRecursively(child);
    +        } catch (IOException e) {
    +          // In case of multiple exceptions, only last one will be thrown
    +          savedIOException = e;
    +        }
    +      }
    +      if (savedIOException != null) {
    +        throw savedIOException;
    +      }
    +    }
    +
    +    if (!file.delete()) {
    --- End diff --
    
    ok, that's fine


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19978467
  
    --- Diff: network/common/src/main/java/org/apache/spark/network/util/JavaUtils.java ---
    @@ -73,4 +79,58 @@ public static int nonNegativeHash(Object obj) {
         int hash = obj.hashCode();
         return hash != Integer.MIN_VALUE ? Math.abs(hash) : 0;
       }
    +
    +  /**
    +   * Delete a file or directory and its contents recursively.
    +   * Don't follow directories if they are symlinks.
    +   * Throws an exception if deletion is unsuccessful.
    +   */
    +  public static void deleteRecursively(File file) throws IOException {
    +    if (file == null) { return; }
    +
    +    if (file.isDirectory() && !isSymlink(file)) {
    +      IOException savedIOException = null;
    +      for (File child : listFilesSafely(file)) {
    +        try {
    +          deleteRecursively(child);
    +        } catch (IOException e) {
    +          // In case of multiple exceptions, only last one will be thrown
    +          savedIOException = e;
    +        }
    +      }
    +      if (savedIOException != null) {
    +        throw savedIOException;
    +      }
    +    }
    +
    +    if (!file.delete()) {
    --- End diff --
    
    This form was actually copied from Utils, perhaps intended to make the side-effecty delete() more visually distinct from the existence check. I think it would be most clear if we just made a "deleted" intermediate value and then used the form you suggest.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61919455
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22972/
    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 pull request: [SPARK-4236] Cleanup removed applications' fil...

Posted by aarondav <gi...@git.apache.org>.
GitHub user aarondav reopened a pull request:

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

    [SPARK-4236] Cleanup removed applications' files in shuffle service

    This relies on a hook from whoever is hosting the shuffle service to invoke removeApplication() when the application is completed. Once invoked, we will clean up all the executors' shuffle directories we know about.

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

    $ git pull https://github.com/aarondav/spark cleanup

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

    https://github.com/apache/spark/pull/3126.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 #3126
    
----
commit 0028241bc604def395f2de93f0c692eba3884ec6
Author: Aaron Davidson <aa...@databricks.com>
Date:   2014-11-05T18:27:51Z

    [SPARK-4236] Cleanup removed applications' files in shuffle service
    
    This relies on a hook from whoever is hosting the shuffle service to invoke removeApplication() when the application is completed. Once invoked, we will clean up all the executors' shuffle directories we know about.

commit 382c97d8fb7e7f48a3d87e2e69a473acbc1ae8e0
Author: Aaron Davidson <aa...@databricks.com>
Date:   2014-11-06T01:28:58Z

    Cleanup

----


---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62083061
  
    LGTM. Hey by the way is there anything we need to change about the way `ContextCleaner` cleans up shuffle files now when external shuffle service is enabled? The only difference in functionality here is that we will not clean shuffle files based on scope anymore (we currently go through executors but they're now dead). This could be a problem for long-running contexts. Maybe we should add some extra TTL-based cleanup and default the timeout to a week or something. We could do this separately in [SPARK-4287](https://issues.apache.org/jira/browse/SPARK-4287).
    
    Also I think this conflicts with your other patch which I just merged.


---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62087342
  
    Weird, we both only added code to JavaUtils. I would think that it doesn't need to conflict there.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61919454
  
      [Test build #22972 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22972/consoleFull) for   PR 3126 at commit [`0028241`](https://github.com/apache/spark/commit/0028241bc604def395f2de93f0c692eba3884ec6).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `case class AllocatedBlocks(streamIdToAllocatedBlocks: Map[Int, Seq[ReceivedBlockInfo]]) `
      * `class ReceiverTracker(ssc: StreamingContext, skipReceiverLaunch: Boolean = false) extends Logging `



---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by aarondav <gi...@git.apache.org>.
Github user aarondav commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62043029
  
    Whoops, accidentally deleted it locally.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19977697
  
    --- Diff: network/shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleCleanupSuite.java ---
    @@ -0,0 +1,138 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.network.shuffle;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.util.Random;
    +import java.util.concurrent.Executor;
    +
    +import com.google.common.util.concurrent.MoreExecutors;
    +import org.junit.Test;
    +
    +import static org.junit.Assert.assertFalse;
    +import static org.junit.Assert.assertTrue;
    +
    +public class ExternalShuffleCleanupSuite {
    +
    +  // Same-thread Executor used to ensure cleanup happens synchronously in test thread.
    +  Executor sameThreadExecutor = MoreExecutors.sameThreadExecutor();
    +
    +  @Test
    +  public void noCleanupAndCleanup() throws IOException {
    +    TestShuffleDataContext dataContext = createSomeData();
    +
    +    ExternalShuffleBlockManager manager = new ExternalShuffleBlockManager(sameThreadExecutor);
    +    manager.registerExecutor("app", "exec0", dataContext.createExecutorInfo("shuffleMgr"));
    +    manager.applicationRemoved("app", false /* cleanup */);
    +
    +    assertStillThere(dataContext);
    +
    +    manager.registerExecutor("app", "exec1", dataContext.createExecutorInfo("shuffleMgr"));
    +    manager.applicationRemoved("app", true /* cleanup */);
    +
    +    assertCleanedUp(dataContext);
    +  }
    +
    +  @Test
    +  public void cleanupUsesExecutor() throws IOException {
    +    TestShuffleDataContext dataContext = createSomeData();
    +
    +    // Executor which does nothing to ensure we're actually using it.
    +    Executor noThreadExecutor = new Executor() {
    +      @Override public void execute(Runnable runnable) { /* do nothing */ }
    --- End diff --
    
    should we mutate some state in here and assert that the state is mutated?


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62091922
  
      [Test build #23032 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23032/consoleFull) for   PR 3126 at commit [`33a64a9`](https://github.com/apache/spark/commit/33a64a981863642403f5dbe6df81e8c45d8d29ba).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class StandaloneWorkerShuffleService(sparkConf: SparkConf, securityManager: SecurityManager)`



---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62079619
  
      [Test build #23026 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23026/consoleFull) for   PR 3126 at commit [`a1f73ab`](https://github.com/apache/spark/commit/a1f73ab3b2d979999926ff6e67648df9b3e546e4).
     * 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 pull request: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19976337
  
    --- Diff: core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala ---
    @@ -63,8 +63,9 @@ class ExternalShuffleServiceSuite extends ShuffleSuite with BeforeAndAfterAll {
         rdd.count()
         rdd.count()
     
    -    // Invalidate the registered executors, disallowing access to their shuffle blocks.
    -    rpcHandler.clearRegisteredExecutors()
    +    // Invalidate the registered executors, disallowing access to their shuffle blocks (without
    +    // deleting the actual shuffle files, so we could access them without the shuffle service).
    +    rpcHandler.applicationRemoved(sc.conf.getAppId, false /* cleanupLocalDirs */)
    --- End diff --
    
    can you just do `cleanupLocalDirs = false`?


---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62042444
  
    Hey was this already merged? I don't see it showing up on ASF.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62079623
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23026/
    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 pull request: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19976297
  
    --- Diff: core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala ---
    @@ -63,8 +63,9 @@ class ExternalShuffleServiceSuite extends ShuffleSuite with BeforeAndAfterAll {
         rdd.count()
         rdd.count()
     
    -    // Invalidate the registered executors, disallowing access to their shuffle blocks.
    -    rpcHandler.clearRegisteredExecutors()
    +    // Invalidate the registered executors, disallowing access to their shuffle blocks (without
    +    // deleting the actual shuffle files, so we could access them without the shuffle service).
    +    rpcHandler.applicationRemoved(sc.conf.getAppId, false /* cleanupLocalDirs */)
    --- End diff --
    
    can you just do `cleanupLocalDirs = false`?


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

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


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19920493
  
    --- Diff: network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockManager.java ---
    @@ -95,6 +111,56 @@ public ManagedBuffer getBlockData(String appId, String execId, String blockId) {
       }
     
       /**
    --- End diff --
    
    The following 32 lines are the only material change in this entire PR. The rest is utility functions imported from core Utils, Java cruft around lambdas and classes, and updating/adding tests.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

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


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62057273
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23015/
    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 pull request: [SPARK-4236] Cleanup removed applications' fil...

Posted by aarondav <gi...@git.apache.org>.
Github user aarondav commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62085977
  
    It was you -- JavaUtils changed. Updated.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61920506
  
      [Test build #22973 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22973/consoleFull) for   PR 3126 at commit [`382c97d`](https://github.com/apache/spark/commit/382c97d8fb7e7f48a3d87e2e69a473acbc1ae8e0).
     * 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 pull request: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62086175
  
      [Test build #23032 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23032/consoleFull) for   PR 3126 at commit [`33a64a9`](https://github.com/apache/spark/commit/33a64a981863642403f5dbe6df81e8c45d8d29ba).
     * This patch merges cleanly.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61914081
  
      [Test build #22973 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22973/consoleFull) for   PR 3126 at commit [`382c97d`](https://github.com/apache/spark/commit/382c97d8fb7e7f48a3d87e2e69a473acbc1ae8e0).
     * This patch merges cleanly.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62043612
  
      [Test build #23015 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23015/consoleFull) for   PR 3126 at commit [`382c97d`](https://github.com/apache/spark/commit/382c97d8fb7e7f48a3d87e2e69a473acbc1ae8e0).
     * This patch merges cleanly.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19976433
  
    --- Diff: network/common/src/main/java/org/apache/spark/network/util/JavaUtils.java ---
    @@ -73,4 +79,58 @@ public static int nonNegativeHash(Object obj) {
         int hash = obj.hashCode();
         return hash != Integer.MIN_VALUE ? Math.abs(hash) : 0;
       }
    +
    +  /**
    +   * Delete a file or directory and its contents recursively.
    +   * Don't follow directories if they are symlinks.
    +   * Throws an exception if deletion is unsuccessful.
    +   */
    +  public static void deleteRecursively(File file) throws IOException {
    +    if (file == null) { return; }
    +
    +    if (file.isDirectory() && !isSymlink(file)) {
    +      IOException savedIOException = null;
    +      for (File child : listFilesSafely(file)) {
    +        try {
    +          deleteRecursively(child);
    +        } catch (IOException e) {
    +          // In case of multiple exceptions, only last one will be thrown
    +          savedIOException = e;
    +        }
    +      }
    +      if (savedIOException != null) {
    +        throw savedIOException;
    +      }
    +    }
    +
    +    if (!file.delete()) {
    --- End diff --
    
    `if (!file.delete() && file.exists())`?


---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by aarondav <gi...@git.apache.org>.
Github user aarondav commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62070125
  
    Comments addressed.


---
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: [SPARK-4236] Cleanup removed applications' fil...

Posted by aarondav <gi...@git.apache.org>.
Github user aarondav commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-61914115
  
    @andrewor14 @rxin PTAL. For the YARN auxiliary service, I think it is sufficient just to just call `ExternalShuffleBlockHandler#applicationRemoved(appId)` at the appropriate time.



---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62091926
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23032/
    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 pull request: [SPARK-4236] Cleanup removed applications' fil...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3126#issuecomment-62092543
  
    Ok merging into master and 1.2


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61920509
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22973/
    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 pull request: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62070466
  
      [Test build #23026 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23026/consoleFull) for   PR 3126 at commit [`a1f73ab`](https://github.com/apache/spark/commit/a1f73ab3b2d979999926ff6e67648df9b3e546e4).
     * This patch merges cleanly.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#discussion_r19978349
  
    --- Diff: core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala ---
    @@ -63,8 +63,9 @@ class ExternalShuffleServiceSuite extends ShuffleSuite with BeforeAndAfterAll {
         rdd.count()
         rdd.count()
     
    -    // Invalidate the registered executors, disallowing access to their shuffle blocks.
    -    rpcHandler.clearRegisteredExecutors()
    +    // Invalidate the registered executors, disallowing access to their shuffle blocks (without
    +    // deleting the actual shuffle files, so we could access them without the shuffle service).
    +    rpcHandler.applicationRemoved(sc.conf.getAppId, false /* cleanupLocalDirs */)
    --- End diff --
    
    Right, not possible if the method is written in Java, unfortunately.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-61912786
  
      [Test build #22972 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22972/consoleFull) for   PR 3126 at commit [`0028241`](https://github.com/apache/spark/commit/0028241bc604def395f2de93f0c692eba3884ec6).
     * This patch merges cleanly.


---
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: [SPARK-4236] Cleanup removed applications' fil...

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

    https://github.com/apache/spark/pull/3126#issuecomment-62057265
  
      [Test build #23015 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23015/consoleFull) for   PR 3126 at commit [`382c97d`](https://github.com/apache/spark/commit/382c97d8fb7e7f48a3d87e2e69a473acbc1ae8e0).
     * 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