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

[GitHub] spark pull request: [SPARK-15045] Update TaskMemoryManager.java

GitHub user abhi951990 opened a pull request:

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

    [SPARK-15045] Update TaskMemoryManager.java

    ## What changes were proposed in this pull request?
    
    Removed the DeadCode as suggested.

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

    $ git pull https://github.com/abhi951990/spark master

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

    https://github.com/apache/spark/pull/12829.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 #12829
    
----
commit 06be5e9cc888064f72c49bdb467497f3d6654cc2
Author: Abhinav Gupta <ab...@gmail.com>
Date:   2016-05-02T02:53:59Z

    Update TaskMemoryManager.java
    
    Issue number SPARK-15045.
    Removed Dead-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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217078394
  
    LGTM, merging into master, 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#discussion_r62130992
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -389,12 +389,6 @@ public long cleanUpAllAllocatedMemory() {
           consumers.clear();
         }
     
    -    for (MemoryBlock page : pageTable) {
    --- End diff --
    
    Chatted with @JoshRosen , these lines are introduce by logical conflict, it could be rewritten as
    ```scala
        synchronized (this) {
          for (MemoryConsumer c: consumers) {
            if (c != null && c.getUsed() > 0) {
              // In case of failed task, it's normal to see leaked memory
              logger.warn("leak " + Utils.bytesToString(c.getUsed()) + " memory from " + c);
            }
          }
          consumers.clear();
    
          for (MemoryBlock page : pageTable) {
            if (page != null) {
              logger.warn("leak a page: " + page + " in task " + taskAttemptId);
              memoryManager.tungstenMemoryAllocator().free(page);
            }
          }
          Arrays.fill(pageTable, null);
        }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217014513
  
    @abhi951990 I don't think this is dead code. It seems to be a potential bug.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-216712583
  
    ok to 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#discussion_r62132354
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -389,12 +389,6 @@ public long cleanUpAllAllocatedMemory() {
           consumers.clear();
         }
     
    -    for (MemoryBlock page : pageTable) {
    --- End diff --
    
    that LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217025076
  
    @andrewor14  So should I only delete line 382? Or should I leave as it is?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217077812
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57835/
    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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217031668
  
    Let's see what @davies thinks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217077743
  
    **[Test build #57835 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57835/consoleFull)** for PR 12829 at commit [`ad748dd`](https://github.com/apache/spark/commit/ad748dd95174f4f7df126a1d0a5a1273540ec9a4).
     * 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-15045] Update TaskMemoryManager.java

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

    https://github.com/apache/spark/pull/12829#issuecomment-216096849
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] Update TaskMemoryManager.java

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

    https://github.com/apache/spark/pull/12829#discussion_r61731132
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -389,12 +389,6 @@ public long cleanUpAllAllocatedMemory() {
           consumers.clear();
         }
     
    -    for (MemoryBlock page : pageTable) {
    --- End diff --
    
    It's not clear this code should be removed, though I agree right now it appears to be dead code because of line 382. CC @JoshRosen since I think you added this block? should line 382 just be removed?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-216728981
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57700/
    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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-216712649
  
    **[Test build #57700 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57700/consoleFull)** for PR 12829 at commit [`06be5e9`](https://github.com/apache/spark/commit/06be5e9cc888064f72c49bdb467497f3d6654cc2).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#discussion_r62121226
  
    --- Diff: core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java ---
    @@ -389,12 +389,6 @@ public long cleanUpAllAllocatedMemory() {
           consumers.clear();
         }
     
    -    for (MemoryBlock page : pageTable) {
    --- End diff --
    
    @davies in L382 we null out the `pageTable` so this loop doesn't do anything. However, I don't think we should delete this code. Should we just remove L382? Is this a cause for memory leaks?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] Update TaskMemoryManager.java

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

    https://github.com/apache/spark/pull/12829#issuecomment-216226257
  
    @abhi951990 I think maybe it would be nicer if the title is more specific just like the title of this JIRA ticket. I think it would be even nicer if the title follows the format like others such as `[SPARK-15045][CORE] XXXX` (See https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217077811
  
    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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-216728538
  
    **[Test build #57700 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57700/consoleFull)** for PR 12829 at commit [`06be5e9`](https://github.com/apache/spark/commit/06be5e9cc888064f72c49bdb467497f3d6654cc2).
     * 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-15045] [CORE] Remove dead code in TaskM...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-217069851
  
    **[Test build #57835 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57835/consoleFull)** for PR 12829 at commit [`ad748dd`](https://github.com/apache/spark/commit/ad748dd95174f4f7df126a1d0a5a1273540ec9a4).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file 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-15045] [CORE] Remove dead code in TaskM...

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

    https://github.com/apache/spark/pull/12829#issuecomment-216728974
  
    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