You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2015/10/15 02:02:46 UTC

[GitHub] spark pull request: [SPARK-10984] [WIP] Simplify *MemoryManager cl...

GitHub user JoshRosen opened a pull request:

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

    [SPARK-10984] [WIP] Simplify *MemoryManager class structure

    This patch refactors the MemoryManager class structure. After #9000, Spark had the following classes:
    
    - MemoryManager
    - StaticMemoryManager
    - ExecutorMemoryManager
    - TaskMemoryManager
    - ShuffleMemoryManager
    
    This is fairly confusing. To simplify things, this patch consolidates several of these classes:
    
    - ShuffleMemoryManager and ExecutorMemoryManager were merged into MemoryManager.
    - TaskMemoryManager is moved into Spark Core.
    
    This patch is currently a work-in-progress; the remaining TODOs:
    
    - [x] Merge ExecutorMemoryManager into MemoryManager.
    - [ ] Merge ShuffleMemoryManager into MemoryManager.
    - [x] Move TaskMemoryManager from `spark-unsafe` to `spark-core`.
    - [ ] Refactor TaskMemoryManager interactions so tasks use only this and not both this and ShuffleMemoryManager.
    - [ ] Misc. docs and cleanup.

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

    $ git pull https://github.com/JoshRosen/spark SPARK-10984

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

    https://github.com/apache/spark/pull/9127.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 #9127
    
----
commit b7c9c2395393e8f910648180b456d66731bdd403
Author: Josh Rosen <jo...@databricks.com>
Date:   2015-10-14T22:52:28Z

    Move Unsafe mem. mgrs. to spark-core subproject.

commit 25ba4b54b0a88ed7f6db75a2f1d4a9b55b98b294
Author: Josh Rosen <jo...@databricks.com>
Date:   2015-10-14T23:47:08Z

    Merge ExecutorMemoryManager into MemoryManager.

----


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150398526
  
    **[Test build #44189 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44189/consoleFull)** for PR 9127 at commit [`c8ba196`](https://github.com/apache/spark/commit/c8ba196e6628c12ae3cc4517eb343dd546715716).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150489653
  
    **[Test build #44209 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44209/consoleFull)** for PR 9127 at commit [`e874a45`](https://github.com/apache/spark/commit/e874a45d4047bb764612c124585609fb72dc406a).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150357892
  
    **[Test build #44173 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44173/consoleFull)** for PR 9127 at commit [`d86f435`](https://github.com/apache/spark/commit/d86f4356b3a7f9fddd7f4ad4365632bdab6bcc6b).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481132
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410857
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44194/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481742
  
    **[Test build #44203 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44203/consoleFull)** for PR 9127 at commit [`b3ad761`](https://github.com/apache/spark/commit/b3ad761dce8d2c7c2f719e37ebe2439e5247adff).


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150999046
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42898147
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -102,9 +113,88 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       /**
    -   * Release N bytes of execution memory.
    +   * Acquire N bytes of memory for execution, evicting cached blocks if necessary.
    +   * Blocks evicted in the process, if any, are added to `evictedBlocks`.
    +   * @return number of bytes successfully granted (<= N).
    +   */
    +  @VisibleForTesting
    +  private[memory] def doAcquireExecutionMemory(
    +      numBytes: Long,
    +      evictedBlocks: mutable.Buffer[(BlockId, BlockStatus)]): Long
    +
    +  /**
    +   * Try to acquire up to `numBytes` of execution memory for the current task and return the number
    +   * of bytes obtained, or 0 if none can be allocated.
    +   *
    +   * This call may block until there is enough free memory in some situations, to make sure each
    +   * task has a chance to ramp up to at least 1 / 2N of the total memory pool (where N is the # of
    +   * active tasks) before it is forced to spill. This can happen if the number of tasks increase
    +   * but an older task had a lot of memory already.
        */
    -  def releaseExecutionMemory(numBytes: Long): Unit = synchronized {
    +  def acquireExecutionMemory(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    --- End diff --
    
    `final def`?


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877948
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43875/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42905961
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -87,6 +88,7 @@ import org.apache.spark.storage.{BlockId, DiskBlockObjectWriter}
      * - Users are expected to call stop() at the end to delete all the intermediate files.
      */
     private[spark] class ExternalSorter[K, V, C](
    +    context: TaskContext,
    --- End diff --
    
    Also, having it default doesn't buy us much, since we'd still need to update the other call-sites because positional arguments have now changed. I suppose we could also swap the ordering of arguments. I'd like to just leave this as-is, though; it's not a big deal to pass it explicitly at the one or two call sites.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150383050
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44174/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148841544
  
    Build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148440578
  
    Merged build started.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150758736
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42902567
  
    --- Diff: core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java ---
    @@ -316,9 +313,13 @@ private long freeMemory() {
         long memoryFreed = 0;
         for (MemoryBlock block : allocatedPages) {
           taskMemoryManager.freePage(block);
    -      shuffleMemoryManager.release(block.size());
    --- End diff --
    
    when do we release this now?


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150759996
  
    **[Test build #44290 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44290/consoleFull)** for PR 9127 at commit [`0b5c72f`](https://github.com/apache/spark/commit/0b5c72f7587df667c650c8102b3ce2af182f3b93).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150397739
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150706590
  
    **[Test build #44261 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44261/consoleFull)** for PR 9127 at commit [`aa14113`](https://github.com/apache/spark/commit/aa141135ab5f55366de47e7d3cbad26eade5d1e5).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150674234
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150690785
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44255/
    Test FAILed.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151019891
  
    **[Test build #44326 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44326/consoleFull)** for PR 9127 at commit [`f68fdb1`](https://github.com/apache/spark/commit/f68fdb10cdd988bca644c567f1f9b7f1d882dda6).
     * 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148844176
  
      [Test build #43862 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43862/consoleFull) for   PR 9127 at commit [`3bbc54d`](https://github.com/apache/spark/commit/3bbc54df1519079635161d113caf87a15857e654).


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150756901
  
    This PR is logically blocked on #9260.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150756901
  
    This PR is logically blocked on #9260.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150371612
  
    **[Test build #44171 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44171/consoleFull)** for PR 9127 at commit [`46ad693`](https://github.com/apache/spark/commit/46ad6933a79ab6a2a88857d184fd9dff72224eef).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150493424
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44205/
    Test FAILed.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150739641
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42912068
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -277,10 +311,20 @@ public long cleanUpAllAllocatedMemory() {
             freedBytes += memory.size();
             // We don't call free() here because that calls Set.remove, which would lead to a
             // ConcurrentModificationException here.
    -        executorMemoryManager.free(memory);
    +        memoryManager.tungstenMemoryAllocator().free(memory);
    --- End diff --
    
    ok


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150408774
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150493379
  
    **[Test build #44205 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44205/consoleFull)** for PR 9127 at commit [`a7e8320`](https://github.com/apache/spark/commit/a7e8320a3a56196dbd8d0abfd6d5fbe2cb6e3b52).
     * This patch **fails Spark unit 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150999036
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150342959
  
    **[Test build #44170 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44170/consoleFull)** for PR 9127 at commit [`f21b767`](https://github.com/apache/spark/commit/f21b767f0cada8c69836887a77e81c2f4de9186b).
     * This patch **fails Scala style 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148876684
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410853
  
    **[Test build #44194 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44194/consoleFull)** for PR 9127 at commit [`f9240e9`](https://github.com/apache/spark/commit/f9240e9b4dd3b0f96d4e70f4a62e2c3fbf1cb723).
     * This patch **fails Scala style 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150773194
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44290/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150369361
  
    **[Test build #44178 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44178/consoleFull)** for PR 9127 at commit [`66ae259`](https://github.com/apache/spark/commit/66ae259cf123e3744e436eece7a222bf2c36e24c).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150690737
  
    **[Test build #44255 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44255/consoleFull)** for PR 9127 at commit [`e56d039`](https://github.com/apache/spark/commit/e56d039cd31369ceaafee541037433e48ab78522).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150342965
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148858646
  
      [Test build #43866 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43866/consoleFull) for   PR 9127 at commit [`ec48ff9`](https://github.com/apache/spark/commit/ec48ff940b1d657476f31ffaffef314c8fba6c8b).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150674196
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42897901
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -129,7 +155,14 @@ public MemoryBlock allocatePage(long size) {
           }
           allocatedPages.set(pageNumber);
         }
    -    final MemoryBlock page = executorMemoryManager.allocate(size);
    +    final long acquiredExecutionMemory = acquireExecutionMemory(size);
    +    if (acquiredExecutionMemory != size) {
    +      synchronized (this) {
    +        allocatedPages.clear(pageNumber);
    --- End diff --
    
    Whoops, good catch. Yes.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148846214
  
    Build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42898522
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +274,44 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  /**
    +   * Returns the execution memory consumption, in bytes, for the given task.
    +   */
    +  private[memory] def getExecutionMemoryUsageForTask(taskAttemptId: Long): Long = synchronized {
    +    memoryConsumptionForTask.getOrElse(taskAttemptId, 0L)
    +  }
    +
    +  // -- Methods related to Tungsten managed memory -------------------------------------------------
    --- End diff --
    
    Fields


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150380260
  
    **[Test build #44173 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44173/consoleFull)** for PR 9127 at commit [`d86f435`](https://github.com/apache/spark/commit/d86f4356b3a7f9fddd7f4ad4365632bdab6bcc6b).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148862657
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150482154
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150342967
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44170/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42802121
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala ---
    @@ -320,21 +320,20 @@ private[joins] final class UnsafeHashedRelation(
       override def readExternal(in: ObjectInput): Unit = Utils.tryOrIOException {
         val nKeys = in.readInt()
         // This is used in Broadcast, shared by multiple tasks, so we use on-heap memory
    -    val taskMemoryManager = new TaskMemoryManager(new ExecutorMemoryManager(MemoryAllocator.HEAP))
    --- End diff --
    
    This use of the memory managers in HashedRelation was messy before and is slightly messier now; I'd like to find a clean way to deal with this before merging this refactoring.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410797
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150676906
  
    Merged build finished. Test FAILed.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150714468
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150716097
  
    **[Test build #44269 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44269/consoleFull)** for PR 9127 at commit [`5af0b17`](https://github.com/apache/spark/commit/5af0b17803dd33051daafdffae069b0f38c13495).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805822
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    +
    +  /*
    +   * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    +   * collection (ExternalAppendOnlyMap or ExternalSorter) used by these tasks can acquire memory
    +   * from this pool and release it as it spills data out. When a task ends, all its memory will be
    +   * released by the Executor.
    +   *
    +   * This class tries to ensure that each task gets a reasonable share of memory, instead of some
    +   * task ramping up to a large amount first and then causing others to spill to disk repeatedly.
    +   * If there are N tasks, it ensures that each tasks can acquire at least 1 / 2N of the memory
    +   * before it has to spill, and at most 1 / N. Because N varies dynamically, we keep track of the
    +   * set of active tasks and redo the calculations of 1 / 2N and 1 / N in waiting tasks whenever
    +   * this set changes. This is all done by synchronizing access to `memoryManager` to mutate state
    +   * and using wait() and notifyAll() to signal changes.
    +   */
    +
    +  /**
    +   * Sets the page size, in bytes.
    +   *
    +   * If user didn't explicitly set "spark.buffer.pageSize", we figure out the default value
    +   * by looking at the number of cores available to the process, and the total amount of memory,
    +   * and then divide it by a factor of safety.
    +   */
    +  val pageSizeBytes: Long = {
    +    val minPageSize = 1L * 1024 * 1024   // 1MB
    +    val maxPageSize = 64L * minPageSize  // 64MB
    +    val cores = if (numCores > 0) numCores else Runtime.getRuntime.availableProcessors()
    +    // Because of rounding to next power of 2, we may have safetyFactor as 8 in worst case
    +    val safetyFactor = 16
    +    val size = ByteArrayMethods.nextPowerOf2(maxExecutionMemory / cores / safetyFactor)
    +    val default = math.min(maxPageSize, math.max(minPageSize, size))
    +    conf.getSizeAsBytes("spark.buffer.pageSize", default)
    +  }
    +
    +
    +  private val taskMemory = new mutable.HashMap[Long, Long]()  // taskAttemptId -> memory bytes
    +
    +  /**
    +   * Try to acquire up to numBytes memory for the current task, and return the number of bytes
    +   * obtained, or 0 if none can be allocated. This call may block until there is enough free memory
    +   * in some situations, to make sure each task has a chance to ramp up to at least 1 / 2N of the
    +   * total memory pool (where N is the # of active tasks) before it is forced to spill. This can
    +   * happen if the number of tasks increases but an older task had a lot of memory already.
    +   */
    +  def tryToAcquire(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    +    assert(numBytes > 0, "invalid number of bytes requested: " + numBytes)
    +
    +    // Add this task to the taskMemory map just so we can keep an accurate count of the number
    +    // of active tasks, to let other tasks ramp down their memory in calls to tryToAcquire
    +    if (!taskMemory.contains(taskAttemptId)) {
    +      taskMemory(taskAttemptId) = 0L
    +      // This will later cause waiting tasks to wake up and check numTasks again
    +      notifyAll()
    +    }
    +
    +    // Keep looping until we're either sure that we don't want to grant this request (because this
    +    // task would have more than 1 / numActiveTasks of the memory) or we have enough free
    +    // memory to give it (we always let each task get at least 1 / (2 * numActiveTasks)).
    +    // TODO: simplify this to limit each task to its own slot
    +    while (true) {
    +      val numActiveTasks = taskMemory.keys.size
    +      val curMem = taskMemory(taskAttemptId)
    +      val freeMemory = maxExecutionMemory - taskMemory.values.sum
    +
    +      // How much we can grant this task; don't let it grow to more than 1 / numActiveTasks;
    +      // don't let it be negative
    +      val maxToGrant =
    +        math.min(numBytes, math.max(0, (maxExecutionMemory / numActiveTasks) - curMem))
    +      // Only give it as much memory as is free, which might be none if it reached 1 / numTasks
    +      val toGrant = math.min(maxToGrant, freeMemory)
    +
    +      if (curMem < maxExecutionMemory / (2 * numActiveTasks)) {
    +        // We want to let each task get at least 1 / (2 * numActiveTasks) before blocking;
    +        // if we can't give it this much now, wait for other tasks to free up memory
    +        // (this happens if older tasks allocated lots of memory before N grew)
    +        if (
    +          freeMemory >= math.min(maxToGrant, maxExecutionMemory / (2 * numActiveTasks) - curMem)) {
    +          return acquire(toGrant, taskAttemptId)
    +        } else {
    +          logInfo(
    +            s"TID $taskAttemptId waiting for at least 1/2N of shuffle memory pool to be free")
    +          wait()
    +        }
    +      } else {
    +        return acquire(toGrant, taskAttemptId)
    +      }
    +    }
    +    0L  // Never reached
    +  }
    +
    +  /**
    +   * Acquire N bytes of execution memory from the memory manager for the current task.
    +   * @return number of bytes actually acquired (<= N).
    +   */
    +  private def acquire(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    +    val evictedBlocks = new ArrayBuffer[(BlockId, BlockStatus)]
    +    val acquired = acquireExecutionMemory(numBytes, evictedBlocks)
    +    // Register evicted blocks, if any, with the active task metrics
    +    // TODO: just do this in `acquireExecutionMemory` (SPARK-10985)
    +    Option(TaskContext.get()).foreach { tc =>
    +      val metrics = tc.taskMetrics()
    +      val lastUpdatedBlocks = metrics.updatedBlocks.getOrElse(Seq[(BlockId, BlockStatus)]())
    +      metrics.updatedBlocks = Some(lastUpdatedBlocks ++ evictedBlocks.toSeq)
    +    }
    +    taskMemory(taskAttemptId) += acquired
    +    acquired
    +  }
    +
    +  /** Release numBytes bytes for the current task. */
    +  def release(numBytes: Long, taskAttemptId: Long): Unit = synchronized {
    +    val curMem = taskMemory.getOrElse(taskAttemptId, 0L)
    +    if (curMem < numBytes) {
    +      throw new SparkException(
    +        s"Internal error: release called on $numBytes bytes but task only has $curMem")
    +    }
    +    if (taskMemory.contains(taskAttemptId)) {
    +      taskMemory(taskAttemptId) -= numBytes
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    +  }
    +
    +  /** Release all memory for the current task and mark it as inactive (e.g. when a task ends). */
    +  private[memory] def releaseMemoryForTask(taskAttemptId: Long): Unit = synchronized {
    +    taskMemory.remove(taskAttemptId).foreach { numBytes =>
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    +  }
    +
    +  /** Returns the memory consumption, in bytes, for the current task */
    +  private[memory] def getMemoryConsumptionForTask(taskAttemptId: Long): Long = synchronized {
    +    taskMemory.getOrElse(taskAttemptId, 0L)
    +  }
    +
    +  // -- Methods related to Tungsten managed memory -------------------------------------------------
    +
    +  /**
    +   * Tracks whether Tungsten memory will be allocated on the JVM heap or off-heap using
    +   * sun.misc.Unsafe.
    +   */
    +  final val tungstenMemoryIsAllocatedInHeap: Boolean =
    +    !conf.getBoolean("spark.unsafe.offHeap", false)
    +
    +  /**
    +   * Allocates memory for use by Unsafe/Tungsten code. Exposed to enable untracked allocations of
    +   * temporary data structures.
    +   */
    +  final val tungstenMemoryAllocator: MemoryAllocator =
    +    if (tungstenMemoryIsAllocatedInHeap) MemoryAllocator.HEAP else MemoryAllocator.UNSAFE
    +
    +  private val POOLING_THRESHOLD_BYTES: Int = 1024 * 1024
    +
    +  /**
    +   * Returns true if allocations of the given size should go through the pooling mechanism and
    +   * false otherwise.
    +   */
    +  private def shouldPool(size: Long): Boolean = {
    +    // Very small allocations are less likely to benefit from pooling.
    +    // At some point, we should explore supporting pooling for off-heap memory, but for now we'll
    +    // ignore that case in the interest of simplicity.
    +    size >= POOLING_THRESHOLD_BYTES && tungstenMemoryIsAllocatedInHeap
    +  }
    +
    +  @GuardedBy("this")
    +  private val bufferPoolsBySize: util.Map[Long, util.LinkedList[WeakReference[MemoryBlock]]] =
    +    new util.HashMap[Long, util.LinkedList[WeakReference[MemoryBlock]]]
    +
    +  /**
    +   * Allocates a contiguous block of memory. Note that the allocated memory is not guaranteed
    +   * to be zeroed out (call `zero()` on the result if this is necessary).
    +   */
    +  @throws(classOf[OutOfMemoryError])
    +  final def allocateMemoryBlock(size: Long): MemoryBlock = {
    +    // TODO(josh): Integrate with execution memory management
    +    if (shouldPool(size)) {
    +      this synchronized {
    +        val pool: util.LinkedList[WeakReference[MemoryBlock]] = bufferPoolsBySize.get(size)
    +        if (pool != null) {
    +          while (!pool.isEmpty) {
    +            val blockReference: WeakReference[MemoryBlock] = pool.pop
    +            val memory: MemoryBlock = blockReference.get
    +            if (memory != null) {
    +              assert(memory.size == size)
    +              return memory
    +            }
    +          }
    +          bufferPoolsBySize.remove(size)
    +        }
    +      }
    +      tungstenMemoryAllocator.allocate(size)
    +    } else {
    +      tungstenMemoryAllocator.allocate(size)
    +    }
    +  }
    +
    +  final def freeMemoryBlock(memory: MemoryBlock) {
    --- End diff --
    
    add a java doc?


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150675826
  
    **[Test build #44253 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44253/consoleFull)** for PR 9127 at commit [`04ec429`](https://github.com/apache/spark/commit/04ec4296f16fc46f2f9b8802276dd8e77027e295).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150393606
  
    **[Test build #44178 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44178/consoleFull)** for PR 9127 at commit [`66ae259`](https://github.com/apache/spark/commit/66ae259cf123e3744e436eece7a222bf2c36e24c).
     * This patch **fails Spark unit 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151019948
  
    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 pull request: [SPARK-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150496567
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42894526
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -103,16 +107,38 @@
       private final boolean inHeap;
     
       /**
    -   * Construct a new MemoryManager.
    +   * Construct a new TaskMemoryManager.
    +   */
    +  public TaskMemoryManager(MemoryManager memoryManager, long taskAttemptId) {
    +    this.inHeap = memoryManager.tungstenMemoryIsAllocatedInHeap();
    +    this.memoryManager = memoryManager;
    +    this.taskAttemptId = taskAttemptId;
    +  }
    +
    +  /**
    +   * Acquire N bytes of memory for execution, evicting cached blocks if necessary.
    +   * @return number of bytes successfully granted (<= N).
        */
    -  public TaskMemoryManager(ExecutorMemoryManager executorMemoryManager) {
    -    this.inHeap = executorMemoryManager.inHeap;
    -    this.executorMemoryManager = executorMemoryManager;
    +  public long acquireExecutionMemory(long size) {
    +    return memoryManager.acquireExecutionMemory(size, taskAttemptId);
    +  }
    +
    +  /**
    +   * Release N bytes of execution memory.
    +   */
    +  public void releaseExecutionMemory(long size) {
    +    memoryManager.releaseExecutionMemory(size, taskAttemptId);
    +  }
    +
    +  public long pageSizeBytes() {
    +    return memoryManager.pageSizeBytes();
       }
     
       /**
        * Allocate a block of memory that will be tracked in the MemoryManager's page table; this is
        * intended for allocating large blocks of memory that will be shared between operators.
    +   *
    +   * Returns `null` if there was not enough memory to allocate the page.
    --- End diff --
    
    nit `@return`


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150367607
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148439397
  
    Jenkins, retest this please.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150397749
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150355235
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148862658
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43866/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805011
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -103,16 +107,39 @@
       private final boolean inHeap;
     
       /**
    -   * Construct a new MemoryManager.
    +   * Construct a new TaskMemoryManager.
    +   */
    +  public TaskMemoryManager(MemoryManager memoryManager, long taskAttemptId) {
    +    this.inHeap = memoryManager.tungstenMemoryIsAllocatedInHeap();
    +    this.memoryManager = memoryManager;
    +    this.taskAttemptId = taskAttemptId;
    +  }
    +
    +  /**
    +   * Acquire N bytes of memory for execution, evicting cached blocks if necessary.
    +   * Blocks evicted in the process, if any, are added to `evictedBlocks`.
    --- End diff --
    
    there's no `evictedBlocks` here


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150382994
  
    **[Test build #44174 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44174/consoleFull)** for PR 9127 at commit [`bba5550`](https://github.com/apache/spark/commit/bba555056d704ad795915cd4a32a9172e87955c7).
     * This patch **fails Spark unit 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150726490
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805528
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    +
    +  /*
    +   * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    +   * collection (ExternalAppendOnlyMap or ExternalSorter) used by these tasks can acquire memory
    +   * from this pool and release it as it spills data out. When a task ends, all its memory will be
    +   * released by the Executor.
    +   *
    +   * This class tries to ensure that each task gets a reasonable share of memory, instead of some
    +   * task ramping up to a large amount first and then causing others to spill to disk repeatedly.
    +   * If there are N tasks, it ensures that each tasks can acquire at least 1 / 2N of the memory
    +   * before it has to spill, and at most 1 / N. Because N varies dynamically, we keep track of the
    +   * set of active tasks and redo the calculations of 1 / 2N and 1 / N in waiting tasks whenever
    +   * this set changes. This is all done by synchronizing access to `memoryManager` to mutate state
    +   * and using wait() and notifyAll() to signal changes.
    +   */
    +
    +  /**
    +   * Sets the page size, in bytes.
    +   *
    +   * If user didn't explicitly set "spark.buffer.pageSize", we figure out the default value
    +   * by looking at the number of cores available to the process, and the total amount of memory,
    +   * and then divide it by a factor of safety.
    +   */
    +  val pageSizeBytes: Long = {
    +    val minPageSize = 1L * 1024 * 1024   // 1MB
    +    val maxPageSize = 64L * minPageSize  // 64MB
    +    val cores = if (numCores > 0) numCores else Runtime.getRuntime.availableProcessors()
    +    // Because of rounding to next power of 2, we may have safetyFactor as 8 in worst case
    +    val safetyFactor = 16
    +    val size = ByteArrayMethods.nextPowerOf2(maxExecutionMemory / cores / safetyFactor)
    +    val default = math.min(maxPageSize, math.max(minPageSize, size))
    +    conf.getSizeAsBytes("spark.buffer.pageSize", default)
    +  }
    +
    +
    +  private val taskMemory = new mutable.HashMap[Long, Long]()  // taskAttemptId -> memory bytes
    +
    +  /**
    +   * Try to acquire up to numBytes memory for the current task, and return the number of bytes
    +   * obtained, or 0 if none can be allocated. This call may block until there is enough free memory
    +   * in some situations, to make sure each task has a chance to ramp up to at least 1 / 2N of the
    +   * total memory pool (where N is the # of active tasks) before it is forced to spill. This can
    +   * happen if the number of tasks increases but an older task had a lot of memory already.
    +   */
    +  def tryToAcquire(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    --- End diff --
    
    it's unclear what kind of memory this is trying to acquire. I think we should rename this something like `acquireExecutionMemoryForThread`


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150339850
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906184
  
    --- Diff: core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java ---
    @@ -316,9 +313,13 @@ private long freeMemory() {
         long memoryFreed = 0;
         for (MemoryBlock block : allocatedPages) {
           taskMemoryManager.freePage(block);
    -      shuffleMemoryManager.release(block.size());
    --- End diff --
    
    This memory is now released as part of `taskMemoryManager.freePage()`.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150367574
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150999247
  
    **[Test build #44326 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44326/consoleFull)** for PR 9127 at commit [`f68fdb1`](https://github.com/apache/spark/commit/f68fdb10cdd988bca644c567f1f9b7f1d882dda6).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42905857
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -87,6 +88,7 @@ import org.apache.spark.storage.{BlockId, DiskBlockObjectWriter}
      * - Users are expected to call stop() at the end to delete all the intermediate files.
      */
     private[spark] class ExternalSorter[K, V, C](
    +    context: TaskContext,
    --- End diff --
    
    Passing it in explicitly makes this easier to unit test.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151019949
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44326/
    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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148239917
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43753/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805531
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    +
    +  /*
    +   * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    --- End diff --
    
    Oh, right. I just wholesale copied this while merging the managers, so I still need to edit and lift these comments higher up.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42837584
  
    --- Diff: core/src/test/scala/org/apache/spark/shuffle/ShuffleMemoryManagerSuite.scala ---
    @@ -1,326 +0,0 @@
    -/*
    - * 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.shuffle
    -
    -import java.util.concurrent.CountDownLatch
    -import java.util.concurrent.atomic.AtomicInteger
    -
    -import org.mockito.Mockito._
    -import org.scalatest.concurrent.Timeouts
    -import org.scalatest.time.SpanSugar._
    -
    -import org.apache.spark.{SparkFunSuite, TaskContext}
    -import org.apache.spark.executor.TaskMetrics
    -
    -class ShuffleMemoryManagerSuite extends SparkFunSuite with Timeouts {
    --- End diff --
    
    @andrewor14: don't let me forget to port this suite's tests into the new MemoryManagerSuite (or maybe a new suite that's named to reflect the fact that it tests division of execution memory among tasks). Thanks to the TaskMemoryManager refactoring, I'm hoping that we can simplify the test code somewhat by using Futures instead of threads, since we won't need to set thread locals anymore.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150402701
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44191/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150339819
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150739645
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44274/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877821
  
    Merged build finished. Test FAILed.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150733124
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150393790
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44178/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42902440
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -277,10 +311,20 @@ public long cleanUpAllAllocatedMemory() {
             freedBytes += memory.size();
             // We don't call free() here because that calls Set.remove, which would lead to a
             // ConcurrentModificationException here.
    -        executorMemoryManager.free(memory);
    +        memoryManager.tungstenMemoryAllocator().free(memory);
    --- End diff --
    
    can these just be `memoryManager.free(memory)`? i.e. We still keep the actual allocation code in a separate class, but just provide a helper method to call the internal memory allocator. Then you don't need to say `tungstenMemoryAllocator` everywhere.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150408763
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150733111
  
    **[Test build #44269 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44269/consoleFull)** for PR 9127 at commit [`5af0b17`](https://github.com/apache/spark/commit/5af0b17803dd33051daafdffae069b0f38c13495).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150677184
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150488635
  
    Merged build started.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150773193
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42902688
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkEnv.scala ---
    @@ -70,10 +69,7 @@ class SparkEnv (
         val httpFileServer: HttpFileServer,
         val sparkFilesDir: String,
         val metricsSystem: MetricsSystem,
    -    // TODO: unify these *MemoryManager classes (SPARK-10984)
    --- End diff --
    
    Yeah!


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150706625
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148842613
  
      [Test build #43858 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43858/consoleFull) for   PR 9127 at commit [`8f93e94`](https://github.com/apache/spark/commit/8f93e94139cbe01d37da3beaa3e2fe1261173590).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42898208
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -102,9 +113,88 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       /**
    -   * Release N bytes of execution memory.
    +   * Acquire N bytes of memory for execution, evicting cached blocks if necessary.
    +   * Blocks evicted in the process, if any, are added to `evictedBlocks`.
    +   * @return number of bytes successfully granted (<= N).
    +   */
    +  @VisibleForTesting
    +  private[memory] def doAcquireExecutionMemory(
    +      numBytes: Long,
    +      evictedBlocks: mutable.Buffer[(BlockId, BlockStatus)]): Long
    +
    +  /**
    +   * Try to acquire up to `numBytes` of execution memory for the current task and return the number
    +   * of bytes obtained, or 0 if none can be allocated.
    +   *
    +   * This call may block until there is enough free memory in some situations, to make sure each
    +   * task has a chance to ramp up to at least 1 / 2N of the total memory pool (where N is the # of
    +   * active tasks) before it is forced to spill. This can happen if the number of tasks increase
    +   * but an older task had a lot of memory already.
        */
    -  def releaseExecutionMemory(numBytes: Long): Unit = synchronized {
    +  def acquireExecutionMemory(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    --- End diff --
    
    then maybe we should add that "subclasses should override `doAcquireExecutionMemory` instead" in the java doc.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150345558
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150480036
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150482158
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44203/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42806409
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -30,7 +36,10 @@ import org.apache.spark.storage.{BlockId, BlockStatus, MemoryStore}
      * sorts and aggregations, while storage memory refers to that used for caching and propagating
      * internal data across the cluster. There exists one of these per JVM.
    --- End diff --
    
    we probably need to update this java doc to include all the new things that this class now does


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805452
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    +
    +  /*
    +   * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    --- End diff --
    
    some of these comments are outdated I think. E.g. this one's not only used for "shuffle operations"


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150400087
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150484914
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151024777
  
    @JoshRosen Great, 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


[GitHub] spark pull request: [SPARK-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150726923
  
    **[Test build #44274 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44274/consoleFull)** for PR 9127 at commit [`a264703`](https://github.com/apache/spark/commit/a264703ea0b2736d587b663cc104260c7aebd82d).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42898067
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -115,6 +205,35 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       /**
    +   * Release numBytes of execution memory belonging to the given task.
    +   */
    +  final def releaseExecutionMemory(numBytes: Long, taskAttemptId: Long): Unit = synchronized {
    +    val curMem = memoryConsumptionForTask.getOrElse(taskAttemptId, 0L)
    +    if (curMem < numBytes) {
    +      throw new SparkException(
    +        s"Internal error: release called on $numBytes bytes but task only has $curMem")
    +    }
    +    if (memoryConsumptionForTask.contains(taskAttemptId)) {
    +      memoryConsumptionForTask(taskAttemptId) -= numBytes
    +      if (memoryConsumptionForTask(taskAttemptId) <= 0) {
    +        memoryConsumptionForTask.remove(taskAttemptId)
    +      }
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    --- End diff --
    
    outdated


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481632
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481127
  
    **[Test build #44202 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44202/consoleFull)** for PR 9127 at commit [`a95bc08`](https://github.com/apache/spark/commit/a95bc087f2803c2b180d4e26a5a0921e73ce7dfa).
     * This patch **fails Scala style 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150371691
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44171/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42895096
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala ---
    @@ -49,18 +48,25 @@ import org.apache.spark.executor.ShuffleWriteMetrics
      * writes. This may lead to a performance regression compared to the normal case of using the
      * non-spilling AppendOnlyMap.
      */
    -@DeveloperApi
    --- End diff --
    
    Yeah. The issue is that Spillable now requires a TaskMemoryManager, which won't be available on the driver. I'm pretty sure that this class was never intended to be DeveloperAPI'd. If you feel strongly that we shouldn't break this, I can add a compatibility test.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42897848
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -129,7 +155,14 @@ public MemoryBlock allocatePage(long size) {
           }
           allocatedPages.set(pageNumber);
         }
    -    final MemoryBlock page = executorMemoryManager.allocate(size);
    +    final long acquiredExecutionMemory = acquireExecutionMemory(size);
    +    if (acquiredExecutionMemory != size) {
    +      synchronized (this) {
    +        allocatedPages.clear(pageNumber);
    --- End diff --
    
    do we need to release the memory we acquired here?


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148490204
  
      [Test build #43789 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43789/console) for   PR 9127 at commit [`25ba4b5`](https://github.com/apache/spark/commit/25ba4b54b0a88ed7f6db75a2f1d4a9b55b98b294).
     * 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42806926
  
    --- Diff: core/src/main/scala/org/apache/spark/shuffle/ShuffleMemoryManager.scala ---
    @@ -1,209 +0,0 @@
    -/*
    - * 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.shuffle
    -
    -import scala.collection.mutable
    -import scala.collection.mutable.ArrayBuffer
    -
    -import com.google.common.annotations.VisibleForTesting
    -
    -import org.apache.spark._
    -import org.apache.spark.memory.{StaticMemoryManager, MemoryManager}
    -import org.apache.spark.storage.{BlockId, BlockStatus}
    -import org.apache.spark.unsafe.array.ByteArrayMethods
    -
    -/**
    - * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    - * collection (ExternalAppendOnlyMap or ExternalSorter) used by these tasks can acquire memory
    - * from this pool and release it as it spills data out. When a task ends, all its memory will be
    - * released by the Executor.
    - *
    - * This class tries to ensure that each task gets a reasonable share of memory, instead of some
    - * task ramping up to a large amount first and then causing others to spill to disk repeatedly.
    - * If there are N tasks, it ensures that each tasks can acquire at least 1 / 2N of the memory
    - * before it has to spill, and at most 1 / N. Because N varies dynamically, we keep track of the
    - * set of active tasks and redo the calculations of 1 / 2N and 1 / N in waiting tasks whenever
    - * this set changes. This is all done by synchronizing access to `memoryManager` to mutate state
    - * and using wait() and notifyAll() to signal changes.
    - *
    - * Use `ShuffleMemoryManager.create()` factory method to create a new instance.
    - *
    - * @param memoryManager the interface through which this manager acquires execution memory
    - * @param pageSizeBytes number of bytes for each page, by default.
    - */
    -private[spark]
    -class ShuffleMemoryManager protected (
    -    memoryManager: MemoryManager,
    -    val pageSizeBytes: Long)
    -  extends Logging {
    -
    -  private val taskMemory = new mutable.HashMap[Long, Long]()  // taskAttemptId -> memory bytes
    -
    -  private def currentTaskAttemptId(): Long = {
    -    // In case this is called on the driver, return an invalid task attempt id.
    -    Option(TaskContext.get()).map(_.taskAttemptId()).getOrElse(-1L)
    --- End diff --
    
    Done.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150677135
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148844123
  
    Merged build started.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150733126
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44269/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148846170
  
      [Test build #43858 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43858/console) for   PR 9127 at commit [`8f93e94`](https://github.com/apache/spark/commit/8f93e94139cbe01d37da3beaa3e2fe1261173590).
     * This patch **fails MiMa tests**.
     * This patch **does not merge 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150739512
  
    **[Test build #44274 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44274/consoleFull)** for PR 9127 at commit [`a264703`](https://github.com/apache/spark/commit/a264703ea0b2736d587b663cc104260c7aebd82d).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148847432
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42897971
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -42,8 +60,10 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       // Amount of execution/storage memory in use, accesses must be synchronized on `this`
    -  protected var _executionMemoryUsed: Long = 0
    -  protected var _storageMemoryUsed: Long = 0
    +  @GuardedBy("this") protected var _executionMemoryUsed: Long = 0
    +  @GuardedBy("this") protected var _storageMemoryUsed: Long = 0
    +  // Map from taskAttemptId -> memory consumption in bytes
    +  @GuardedBy("this") private val memoryConsumptionForTask = new mutable.HashMap[Long, Long]()
    --- End diff --
    
    `executionMemoryForTask`?


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150358974
  
    **[Test build #44174 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44174/consoleFull)** for PR 9127 at commit [`bba5550`](https://github.com/apache/spark/commit/bba555056d704ad795915cd4a32a9172e87955c7).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877826
  
      [Test build #43875 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43875/consoleFull) for   PR 9127 at commit [`7d6a37f`](https://github.com/apache/spark/commit/7d6a37fe09cee6b10f32a7ed4140c8402555a0ea).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805085
  
    --- Diff: core/src/main/scala/org/apache/spark/shuffle/ShuffleMemoryManager.scala ---
    @@ -1,209 +0,0 @@
    -/*
    - * 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.shuffle
    -
    -import scala.collection.mutable
    -import scala.collection.mutable.ArrayBuffer
    -
    -import com.google.common.annotations.VisibleForTesting
    -
    -import org.apache.spark._
    -import org.apache.spark.memory.{StaticMemoryManager, MemoryManager}
    -import org.apache.spark.storage.{BlockId, BlockStatus}
    -import org.apache.spark.unsafe.array.ByteArrayMethods
    -
    -/**
    - * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    - * collection (ExternalAppendOnlyMap or ExternalSorter) used by these tasks can acquire memory
    - * from this pool and release it as it spills data out. When a task ends, all its memory will be
    - * released by the Executor.
    - *
    - * This class tries to ensure that each task gets a reasonable share of memory, instead of some
    - * task ramping up to a large amount first and then causing others to spill to disk repeatedly.
    - * If there are N tasks, it ensures that each tasks can acquire at least 1 / 2N of the memory
    - * before it has to spill, and at most 1 / N. Because N varies dynamically, we keep track of the
    - * set of active tasks and redo the calculations of 1 / 2N and 1 / N in waiting tasks whenever
    - * this set changes. This is all done by synchronizing access to `memoryManager` to mutate state
    - * and using wait() and notifyAll() to signal changes.
    - *
    - * Use `ShuffleMemoryManager.create()` factory method to create a new instance.
    - *
    - * @param memoryManager the interface through which this manager acquires execution memory
    - * @param pageSizeBytes number of bytes for each page, by default.
    - */
    -private[spark]
    -class ShuffleMemoryManager protected (
    -    memoryManager: MemoryManager,
    -    val pageSizeBytes: Long)
    -  extends Logging {
    -
    -  private val taskMemory = new mutable.HashMap[Long, Long]()  // taskAttemptId -> memory bytes
    -
    -  private def currentTaskAttemptId(): Long = {
    -    // In case this is called on the driver, return an invalid task attempt id.
    -    Option(TaskContext.get()).map(_.taskAttemptId()).getOrElse(-1L)
    --- End diff --
    
    It looks like I'll need to port this logic into Spillable so that those collections can continue to be used on the driver.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148841513
  
     Build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150399104
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44189/
    Test FAILed.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151022702
  
    I filed https://issues.apache.org/jira/browse/SPARK-11309 as one followup.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410856
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42902844
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -87,6 +88,7 @@ import org.apache.spark.storage.{BlockId, DiskBlockObjectWriter}
      * - Users are expected to call stop() at the end to delete all the intermediate files.
      */
     private[spark] class ExternalSorter[K, V, C](
    +    context: TaskContext,
    --- End diff --
    
    should this default to `TaskContext.get` like in EAOM?


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150773181
  
    **[Test build #44290 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44290/consoleFull)** for PR 9127 at commit [`0b5c72f`](https://github.com/apache/spark/commit/0b5c72f7587df667c650c8102b3ce2af182f3b93).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148875900
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148856667
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150496568
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44209/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150496521
  
    **[Test build #44209 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44209/consoleFull)** for PR 9127 at commit [`e874a45`](https://github.com/apache/spark/commit/e874a45d4047bb764612c124585609fb72dc406a).
     * This patch **fails Spark unit 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148442913
  
      [Test build #43789 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43789/consoleFull) for   PR 9127 at commit [`25ba4b5`](https://github.com/apache/spark/commit/25ba4b54b0a88ed7f6db75a2f1d4a9b55b98b294).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150406416
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805760
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    +
    +  /*
    +   * Allocates a pool of memory to tasks for use in shuffle operations. Each disk-spilling
    +   * collection (ExternalAppendOnlyMap or ExternalSorter) used by these tasks can acquire memory
    +   * from this pool and release it as it spills data out. When a task ends, all its memory will be
    +   * released by the Executor.
    +   *
    +   * This class tries to ensure that each task gets a reasonable share of memory, instead of some
    +   * task ramping up to a large amount first and then causing others to spill to disk repeatedly.
    +   * If there are N tasks, it ensures that each tasks can acquire at least 1 / 2N of the memory
    +   * before it has to spill, and at most 1 / N. Because N varies dynamically, we keep track of the
    +   * set of active tasks and redo the calculations of 1 / 2N and 1 / N in waiting tasks whenever
    +   * this set changes. This is all done by synchronizing access to `memoryManager` to mutate state
    +   * and using wait() and notifyAll() to signal changes.
    +   */
    +
    +  /**
    +   * Sets the page size, in bytes.
    +   *
    +   * If user didn't explicitly set "spark.buffer.pageSize", we figure out the default value
    +   * by looking at the number of cores available to the process, and the total amount of memory,
    +   * and then divide it by a factor of safety.
    +   */
    +  val pageSizeBytes: Long = {
    +    val minPageSize = 1L * 1024 * 1024   // 1MB
    +    val maxPageSize = 64L * minPageSize  // 64MB
    +    val cores = if (numCores > 0) numCores else Runtime.getRuntime.availableProcessors()
    +    // Because of rounding to next power of 2, we may have safetyFactor as 8 in worst case
    +    val safetyFactor = 16
    +    val size = ByteArrayMethods.nextPowerOf2(maxExecutionMemory / cores / safetyFactor)
    +    val default = math.min(maxPageSize, math.max(minPageSize, size))
    +    conf.getSizeAsBytes("spark.buffer.pageSize", default)
    +  }
    +
    +
    +  private val taskMemory = new mutable.HashMap[Long, Long]()  // taskAttemptId -> memory bytes
    +
    +  /**
    +   * Try to acquire up to numBytes memory for the current task, and return the number of bytes
    +   * obtained, or 0 if none can be allocated. This call may block until there is enough free memory
    +   * in some situations, to make sure each task has a chance to ramp up to at least 1 / 2N of the
    +   * total memory pool (where N is the # of active tasks) before it is forced to spill. This can
    +   * happen if the number of tasks increases but an older task had a lot of memory already.
    +   */
    +  def tryToAcquire(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    +    assert(numBytes > 0, "invalid number of bytes requested: " + numBytes)
    +
    +    // Add this task to the taskMemory map just so we can keep an accurate count of the number
    +    // of active tasks, to let other tasks ramp down their memory in calls to tryToAcquire
    +    if (!taskMemory.contains(taskAttemptId)) {
    +      taskMemory(taskAttemptId) = 0L
    +      // This will later cause waiting tasks to wake up and check numTasks again
    +      notifyAll()
    +    }
    +
    +    // Keep looping until we're either sure that we don't want to grant this request (because this
    +    // task would have more than 1 / numActiveTasks of the memory) or we have enough free
    +    // memory to give it (we always let each task get at least 1 / (2 * numActiveTasks)).
    +    // TODO: simplify this to limit each task to its own slot
    +    while (true) {
    +      val numActiveTasks = taskMemory.keys.size
    +      val curMem = taskMemory(taskAttemptId)
    +      val freeMemory = maxExecutionMemory - taskMemory.values.sum
    +
    +      // How much we can grant this task; don't let it grow to more than 1 / numActiveTasks;
    +      // don't let it be negative
    +      val maxToGrant =
    +        math.min(numBytes, math.max(0, (maxExecutionMemory / numActiveTasks) - curMem))
    +      // Only give it as much memory as is free, which might be none if it reached 1 / numTasks
    +      val toGrant = math.min(maxToGrant, freeMemory)
    +
    +      if (curMem < maxExecutionMemory / (2 * numActiveTasks)) {
    +        // We want to let each task get at least 1 / (2 * numActiveTasks) before blocking;
    +        // if we can't give it this much now, wait for other tasks to free up memory
    +        // (this happens if older tasks allocated lots of memory before N grew)
    +        if (
    +          freeMemory >= math.min(maxToGrant, maxExecutionMemory / (2 * numActiveTasks) - curMem)) {
    +          return acquire(toGrant, taskAttemptId)
    +        } else {
    +          logInfo(
    +            s"TID $taskAttemptId waiting for at least 1/2N of shuffle memory pool to be free")
    +          wait()
    +        }
    +      } else {
    +        return acquire(toGrant, taskAttemptId)
    +      }
    +    }
    +    0L  // Never reached
    +  }
    +
    +  /**
    +   * Acquire N bytes of execution memory from the memory manager for the current task.
    +   * @return number of bytes actually acquired (<= N).
    +   */
    +  private def acquire(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    +    val evictedBlocks = new ArrayBuffer[(BlockId, BlockStatus)]
    +    val acquired = acquireExecutionMemory(numBytes, evictedBlocks)
    +    // Register evicted blocks, if any, with the active task metrics
    +    // TODO: just do this in `acquireExecutionMemory` (SPARK-10985)
    +    Option(TaskContext.get()).foreach { tc =>
    +      val metrics = tc.taskMetrics()
    +      val lastUpdatedBlocks = metrics.updatedBlocks.getOrElse(Seq[(BlockId, BlockStatus)]())
    +      metrics.updatedBlocks = Some(lastUpdatedBlocks ++ evictedBlocks.toSeq)
    +    }
    +    taskMemory(taskAttemptId) += acquired
    +    acquired
    +  }
    +
    +  /** Release numBytes bytes for the current task. */
    +  def release(numBytes: Long, taskAttemptId: Long): Unit = synchronized {
    +    val curMem = taskMemory.getOrElse(taskAttemptId, 0L)
    +    if (curMem < numBytes) {
    +      throw new SparkException(
    +        s"Internal error: release called on $numBytes bytes but task only has $curMem")
    +    }
    +    if (taskMemory.contains(taskAttemptId)) {
    +      taskMemory(taskAttemptId) -= numBytes
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    +  }
    +
    +  /** Release all memory for the current task and mark it as inactive (e.g. when a task ends). */
    +  private[memory] def releaseMemoryForTask(taskAttemptId: Long): Unit = synchronized {
    +    taskMemory.remove(taskAttemptId).foreach { numBytes =>
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    +  }
    +
    +  /** Returns the memory consumption, in bytes, for the current task */
    +  private[memory] def getMemoryConsumptionForTask(taskAttemptId: Long): Long = synchronized {
    --- End diff --
    
    These all need to be renamed to refer to execution memory, since this class `MemoryManager` handles both execution and storage so it's not sure what kind of memory we're talking about. We actually also need to update a lot of comments 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 pull request: [SPARK-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150493422
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150393786
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877822
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43874/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150383049
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148239884
  
      [Test build #43753 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43753/console) for   PR 9127 at commit [`25ba4b5`](https://github.com/apache/spark/commit/25ba4b54b0a88ed7f6db75a2f1d4a9b55b98b294).
     * This patch **fails MiMa 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150355255
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148237660
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150699359
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148856711
  
    Merged build started.


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150714482
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906605
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -277,10 +311,20 @@ public long cleanUpAllAllocatedMemory() {
             freedBytes += memory.size();
             // We don't call free() here because that calls Set.remove, which would lead to a
             // ConcurrentModificationException here.
    -        executorMemoryManager.free(memory);
    +        memoryManager.tungstenMemoryAllocator().free(memory);
    --- End diff --
    
    "Everywhere" is only five places, all in TaskMemoryManager. To address your comment, I think I'd have to add two methods, `allocateTungstenMemory()` and `freeTungstenMemory()`, which only forwarded to that field. Given that, I'm not sure that I want to fix this; it's a net increase in code and I don't feel that it necessarily buys us any increase in clarity or correctness.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877946
  
      [Test build #43875 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43875/console) for   PR 9127 at commit [`7d6a37f`](https://github.com/apache/spark/commit/7d6a37fe09cee6b10f32a7ed4140c8402555a0ea).
     * This patch **fails Scala style 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150347493
  
    **[Test build #44171 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44171/consoleFull)** for PR 9127 at commit [`46ad693`](https://github.com/apache/spark/commit/46ad6933a79ab6a2a88857d184fd9dff72224eef).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150700049
  
    **[Test build #44261 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44261/consoleFull)** for PR 9127 at commit [`aa14113`](https://github.com/apache/spark/commit/aa141135ab5f55366de47e7d3cbad26eade5d1e5).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150342435
  
    **[Test build #44170 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44170/consoleFull)** for PR 9127 at commit [`f21b767`](https://github.com/apache/spark/commit/f21b767f0cada8c69836887a77e81c2f4de9186b).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150345493
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148844105
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906908
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -102,9 +113,88 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       /**
    -   * Release N bytes of execution memory.
    +   * Acquire N bytes of memory for execution, evicting cached blocks if necessary.
    +   * Blocks evicted in the process, if any, are added to `evictedBlocks`.
    +   * @return number of bytes successfully granted (<= N).
    +   */
    +  @VisibleForTesting
    +  private[memory] def doAcquireExecutionMemory(
    +      numBytes: Long,
    +      evictedBlocks: mutable.Buffer[(BlockId, BlockStatus)]): Long
    +
    +  /**
    +   * Try to acquire up to `numBytes` of execution memory for the current task and return the number
    +   * of bytes obtained, or 0 if none can be allocated.
    +   *
    +   * This call may block until there is enough free memory in some situations, to make sure each
    +   * task has a chance to ramp up to at least 1 / 2N of the total memory pool (where N is the # of
    +   * active tasks) before it is forced to spill. This can happen if the number of tasks increase
    +   * but an older task had a lot of memory already.
        */
    -  def releaseExecutionMemory(numBytes: Long): Unit = synchronized {
    +  def acquireExecutionMemory(numBytes: Long, taskAttemptId: Long): Long = synchronized {
    --- End diff --
    
    Fixed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150480323
  
    **[Test build #44202 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44202/consoleFull)** for PR 9127 at commit [`a95bc08`](https://github.com/apache/spark/commit/a95bc087f2803c2b180d4e26a5a0921e73ce7dfa).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150358782
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150482147
  
    **[Test build #44203 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44203/consoleFull)** for PR 9127 at commit [`b3ad761`](https://github.com/apache/spark/commit/b3ad761dce8d2c7c2f719e37ebe2439e5247adff).
     * This patch **fails Scala style 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150676909
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44253/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150676901
  
    **[Test build #44253 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44253/consoleFull)** for PR 9127 at commit [`04ec429`](https://github.com/apache/spark/commit/04ec4296f16fc46f2f9b8802276dd8e77027e295).
     * This patch **fails to build**.
     * 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150380315
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906959
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -42,8 +60,10 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       // Amount of execution/storage memory in use, accesses must be synchronized on `this`
    -  protected var _executionMemoryUsed: Long = 0
    -  protected var _storageMemoryUsed: Long = 0
    +  @GuardedBy("this") protected var _executionMemoryUsed: Long = 0
    +  @GuardedBy("this") protected var _storageMemoryUsed: Long = 0
    +  // Map from taskAttemptId -> memory consumption in bytes
    +  @GuardedBy("this") private val memoryConsumptionForTask = new mutable.HashMap[Long, Long]()
    --- End diff --
    
    Good idea.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410799
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44192/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148875907
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150485999
  
    **[Test build #44205 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44205/consoleFull)** for PR 9127 at commit [`a7e8320`](https://github.com/apache/spark/commit/a7e8320a3a56196dbd8d0abfd6d5fbe2cb6e3b52).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150401116
  
    **[Test build #44191 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44191/consoleFull)** for PR 9127 at commit [`6ec9c30`](https://github.com/apache/spark/commit/6ec9c30afb794a8d6da05fdf3fab5526315df98d).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42803768
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/Task.scala ---
    @@ -90,10 +91,6 @@ private[spark] abstract class Task[T](
           context.markTaskCompleted()
           try {
             Utils.tryLogNonFatalError {
    -          // Release memory used by this thread for shuffles
    -          SparkEnv.get.shuffleMemoryManager.releaseMemoryForThisTask()
    --- End diff --
    
    This is now called inside of the TaskMemoryManager's cleanup method.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150706626
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44261/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150399098
  
    **[Test build #44189 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44189/consoleFull)** for PR 9127 at commit [`c8ba196`](https://github.com/apache/spark/commit/c8ba196e6628c12ae3cc4517eb343dd546715716).
     * This patch **fails to build**.
     * 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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-151020332
  
    Woohoo, this passes tests!
    
    There are still a few minor follow-up tasks that I'd like to do for this, but I'm going to defer them to separate patches: this patch is fairly large and has conflicts with several other memory-management-related patches that are in-flight or which will be opened soon. @andrewor14, if you have any post-hoc review comments, I'll handle them in a followup. @davies, this should unblock your open patch.
    
    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: [SPARK-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148490411
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43789/
    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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150358744
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-149073706
  
    Alright, the first part of this change should be ready for review. At this point, there are a number of remaining small tasks for updating mocks which are used in unit tests, but the basic "client" APIs for interacting with the memory managers have been sketched out. Please take a look at those and provide feedback on whether the new, combined interfaces make sense. Once we agree on those interfaces, we can loop back and do a second review pass looking at the test refactoring 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: [SPARK-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150726497
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150402690
  
    **[Test build #44191 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44191/consoleFull)** for PR 9127 at commit [`6ec9c30`](https://github.com/apache/spark/commit/6ec9c30afb794a8d6da05fdf3fab5526315df98d).
     * This patch **fails to build**.
     * 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805408
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    --- End diff --
    
    instead of saying what this used to be, maybe describe what this does, i.e. it arbitrates execution memory across threads.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481657
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150677936
  
    **[Test build #44255 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44255/consoleFull)** for PR 9127 at commit [`e56d039`](https://github.com/apache/spark/commit/e56d039cd31369ceaafee541037433e48ab78522).


---
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-10984] Simplify *MemoryManager class st...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150758742
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150699383
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148862616
  
      [Test build #43866 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43866/console) for   PR 9127 at commit [`ec48ff9`](https://github.com/apache/spark/commit/ec48ff940b1d657476f31ffaffef314c8fba6c8b).
     * This patch **fails MiMa 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150480046
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42805575
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +164,217 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  // -- The code formerly known as ShuffleMemoryManager --------------------------------------------
    --- End diff --
    
    Sure. I'll still leave a pointer to the ShuffleMemoryManager name just in case anyone grepping through the new codebase is curious about what happened to it.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42902990
  
    --- Diff: core/src/test/scala/org/apache/spark/shuffle/ShuffleMemoryManagerSuite.scala ---
    @@ -1,326 +0,0 @@
    -/*
    - * 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.shuffle
    -
    -import java.util.concurrent.CountDownLatch
    -import java.util.concurrent.atomic.AtomicInteger
    -
    -import org.mockito.Mockito._
    -import org.scalatest.concurrent.Timeouts
    -import org.scalatest.time.SpanSugar._
    -
    -import org.apache.spark.{SparkFunSuite, TaskContext}
    -import org.apache.spark.executor.TaskMetrics
    -
    -class ShuffleMemoryManagerSuite extends SparkFunSuite with Timeouts {
    --- End diff --
    
    hey don't forget to port this suite!


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148847295
  
      [Test build #43862 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43862/console) for   PR 9127 at commit [`3bbc54d`](https://github.com/apache/spark/commit/3bbc54df1519079635161d113caf87a15857e654).
     * This patch **fails MiMa 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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148239916
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906919
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -115,6 +205,35 @@ private[spark] abstract class MemoryManager extends Logging {
       }
     
       /**
    +   * Release numBytes of execution memory belonging to the given task.
    +   */
    +  final def releaseExecutionMemory(numBytes: Long, taskAttemptId: Long): Unit = synchronized {
    +    val curMem = memoryConsumptionForTask.getOrElse(taskAttemptId, 0L)
    +    if (curMem < numBytes) {
    +      throw new SparkException(
    +        s"Internal error: release called on $numBytes bytes but task only has $curMem")
    +    }
    +    if (memoryConsumptionForTask.contains(taskAttemptId)) {
    +      memoryConsumptionForTask(taskAttemptId) -= numBytes
    +      if (memoryConsumptionForTask(taskAttemptId) <= 0) {
    +        memoryConsumptionForTask.remove(taskAttemptId)
    +      }
    +      releaseExecutionMemory(numBytes)
    +    }
    +    notifyAll() // Notify waiters in tryToAcquire that memory has been freed
    --- End diff --
    
    Fixed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148490409
  
    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 pull request: [SPARK-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148238013
  
      [Test build #43753 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43753/consoleFull) for   PR 9127 at commit [`25ba4b5`](https://github.com/apache/spark/commit/25ba4b54b0a88ed7f6db75a2f1d4a9b55b98b294).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148440512
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150371690
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150402697
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148847433
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43862/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150690783
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150399101
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42906899
  
    --- Diff: core/src/main/scala/org/apache/spark/memory/MemoryManager.scala ---
    @@ -155,4 +274,44 @@ private[spark] abstract class MemoryManager extends Logging {
         _storageMemoryUsed
       }
     
    +  /**
    +   * Returns the execution memory consumption, in bytes, for the given task.
    +   */
    +  private[memory] def getExecutionMemoryUsageForTask(taskAttemptId: Long): Long = synchronized {
    +    memoryConsumptionForTask.getOrElse(taskAttemptId, 0L)
    +  }
    +
    +  // -- Methods related to Tungsten managed memory -------------------------------------------------
    --- End diff --
    
    Fixed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150481136
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44202/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148877947
  
    Merged build finished. Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150380317
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44173/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150410602
  
    **[Test build #44194 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44194/consoleFull)** for PR 9127 at commit [`f9240e9`](https://github.com/apache/spark/commit/f9240e9b4dd3b0f96d4e70f4a62e2c3fbf1cb723).


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148876672
  
     Merged build triggered.


---
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-10984] Simplify *MemoryManager class st...

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

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


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148846216
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/43858/
    Test FAILed.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#discussion_r42894944
  
    --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala ---
    @@ -49,18 +48,25 @@ import org.apache.spark.executor.ShuffleWriteMetrics
      * writes. This may lead to a performance regression compared to the normal case of using the
      * non-spilling AppendOnlyMap.
      */
    -@DeveloperApi
    --- End diff --
    
    wow, wait, is this intentional?


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150400019
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150406319
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150488618
  
     Merged build triggered.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150484982
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-148237683
  
    Merged build started.


---
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-10984] [WIP] Simplify *MemoryManager cl...

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

    https://github.com/apache/spark/pull/9127#issuecomment-150667335
  
    The high level refactoring looks good. Once you make it pass tests and address the remaining comments (all of which are minor) I will merge this. Thanks for all your work on this @JoshRosen.


---
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