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 2016/11/03 01:24:39 UTC

[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

GitHub user JoshRosen opened a pull request:

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

    [SPARK-18236] Reduce duplicate objects in Spark UI and HistoryServer

    ## What changes were proposed in this pull request?
    
    When profiling heap dumps from the HistoryServer and live Spark web UIs, I found a large amount of memory being wasted on duplicated objects and strings. This patch's changes remove most of this duplication, resulting in over 40% memory savings for some benchmarks.
    
    - **Task metrics** (6441f0624dfcda9c7193a64bfb416a145b5aabdf): previously, every `TaskUIData` object would have its own instances of `InputMetricsUIData`, `OutputMetricsUIData`, `ShuffleReadMetrics`, and `ShuffleWriteMetrics`, but for many tasks these metrics are irrelevant because they're all zero. This patch changes how we construct these metrics in order to re-use a single immutable "empty" value for the cases where these metrics are empty.
    - **TaskInfo.accumulables** (ade86db901127bf13c0e0bdc3f09c933a093bb76): Previously, every `TaskInfo` object had its own empty `ListBuffer` for holding updates from named accumulators. Tasks which didn't use named accumulators still paid for the cost of allocating and storing this empty buffer. To avoid this overhead, I changed the `val` with a mutable buffer into a `var` which holds an immutable Scala list, allowing tasks which do not have named accumulator updates to share the same singleton `Nil` object.
    - **String.intern() in JSONProtocol** (7e05630e9a78c455db8c8c499f0590c864624e05): in the HistoryServer, executor hostnames and ids are deserialized from JSON, leading to massive duplication of these string objects. By calling `String.intern()` on the deserialized values, we can remove all of this duplication. Since Spark now requires Java 7+ we don't have to worry about string interning exhausting the permgen (see http://java-performance.info/string-intern-in-java-6-7-8/).
    
    ## How was this patch tested?
    
    I ran 
    
    ```
    sc.parallelize(1 to 100000, 100000).count()
    ```
    
    in `spark-shell` with event logging enabled, then loaded that event log in the HistoryServer, performed a full GC, and took a heap dump. According to YourKit, the changes in this patch reduced memory consumption by roughly 28 megabytes (or 770k Java objects):
    
    ![image](https://cloud.githubusercontent.com/assets/50748/19953276/4f3a28aa-a129-11e6-93df-d7fa91396f66.png)
    
    Here's a table illustrating the drop in objects due to deduplication (the drop is <100k for some objects because some events were dropped from the listener bus; this is a separate, existing bug that I'll address separately after CPU-profiling):
    
    ![image](https://cloud.githubusercontent.com/assets/50748/19953290/6a271290-a129-11e6-93ad-b825f1448886.png)


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

    $ git pull https://github.com/JoshRosen/spark spark-ui-memory-usage

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

    https://github.com/apache/spark/pull/15743.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 #15743
    
----
commit 6441f0624dfcda9c7193a64bfb416a145b5aabdf
Author: Josh Rosen <jo...@databricks.com>
Date:   2016-11-02T21:00:16Z

    Re-use same instance for empty metrics UI data objects.

commit ade86db901127bf13c0e0bdc3f09c933a093bb76
Author: Josh Rosen <jo...@databricks.com>
Date:   2016-11-03T00:12:09Z

    Change TaskInfo.accumulables into an immutable List.

commit 7e05630e9a78c455db8c8c499f0590c864624e05
Author: Josh Rosen <jo...@databricks.com>
Date:   2016-11-03T00:27:06Z

    Intern hostname and executor id strings in blockManagerId and taskInfo JSON protocol.

----


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68292 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68292/consoleFull)** for PR 15743 at commit [`9662163`](https://github.com/apache/spark/commit/96621633534e84eb8e9a33c4e7afbec62b776430).
     * 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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86312868
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala ---
    @@ -197,8 +196,32 @@ private[spark] object UIData {
           shuffleWriteMetrics: ShuffleWriteMetricsUIData)
     
       case class InputMetricsUIData(bytesRead: Long, recordsRead: Long)
    +  object InputMetricsUIData {
    +    def apply(metrics: InputMetrics): InputMetricsUIData = {
    +      if (metrics.bytesRead == 0 && metrics.recordsRead == 0) {
    +        EMPTY
    +      } else {
    +        new InputMetricsUIData(
    +          bytesRead = metrics.bytesRead,
    +          recordsRead = metrics.recordsRead)
    +      }
    +    }
    +    val EMPTY = InputMetricsUIData(0, 0)
    +  }
     
       case class OutputMetricsUIData(bytesWritten: Long, recordsWritten: Long)
    +  object OutputMetricsUIData {
    +    def apply(metrics: OutputMetrics): OutputMetricsUIData = {
    +      if (metrics.bytesWritten == 0 && metrics.recordsWritten == 0) {
    --- End diff --
    
    I assume the else block is more common ?
    If yes, would be good to invert the condition.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68041/
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86604523
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala ---
    @@ -54,7 +54,12 @@ class TaskInfo(
        * accumulable to be updated multiple times in a single task or for two accumulables with the
        * same name but different IDs to exist in a task.
        */
    -  val accumulables = ListBuffer[AccumulableInfo]()
    +  lazy val accumulables: ListBuffer[AccumulableInfo] = ListBuffer(_accumulables: _*)
    --- End diff --
    
    Meh, kind of a toss-up. My original patch broke compatibility and I did this in 4c867f10ff5d8d80c7e8d44b4702785c0a017b64 to restore binary compatibility, but it risks changing semantics. I think I'll just revert 4c867f10ff5d8d80c7e8d44b4702785c0a017b64 and add the minor compatibility break to a lesser-used `@DeveloperAPI`.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68292 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68292/consoleFull)** for PR 15743 at commit [`9662163`](https://github.com/apache/spark/commit/96621633534e84eb8e9a33c4e7afbec62b776430).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86406738
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -1089,7 +1089,7 @@ class DAGScheduler(
             // To avoid UI cruft, ignore cases where value wasn't updated
             if (acc.name.isDefined && !updates.isZero) {
               stage.latestInfo.accumulables(id) = acc.toInfo(None, Some(acc.value))
    -          event.taskInfo.accumulables += acc.toInfo(Some(updates.value), Some(acc.value))
    +          event.taskInfo.accumulables ::= acc.toInfo(Some(updates.value), Some(acc.value))
    --- End diff --
    
    Something I was a bit unsure of but want to revisit now:
    
    It looks like the loop 
    
    ```
     for (accumulableInfo <- info.accumulables) {
            stageData.accumulables(accumulableInfo.id) = accumulableInfo
          }
    ```
    
    in `JobProgressListener.onTaskEnd()` may assume that accumulator updates are appended to the list so that the newest update for a particular accumulator appears last, but _prepending_ here will change that. I don't think that this behavior is covered by any existing unit tests, though. Instead of using a list here, I might want to use an immutable `Queue`. Let me go ahead and make this change 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68086/
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68290/
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86312418
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -1089,7 +1089,7 @@ class DAGScheduler(
             // To avoid UI cruft, ignore cases where value wasn't updated
             if (acc.name.isDefined && !updates.isZero) {
               stage.latestInfo.accumulables(id) = acc.toInfo(None, Some(acc.value))
    -          event.taskInfo.accumulables += acc.toInfo(Some(updates.value), Some(acc.value))
    +          event.taskInfo.accumulables ::= acc.toInfo(Some(updates.value), Some(acc.value))
    --- End diff --
    
    This should be equivalent, no ?
    ListBuffer.+= does essentially :: on last


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68041 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68041/consoleFull)** for PR 15743 at commit [`738cb5a`](https://github.com/apache/spark/commit/738cb5a43bce8b7e49035f3935104db23a6541c6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68086 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68086/consoleFull)** for PR 15743 at commit [`4c867f1`](https://github.com/apache/spark/commit/4c867f10ff5d8d80c7e8d44b4702785c0a017b64).
     * 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86435578
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala ---
    @@ -54,7 +52,7 @@ class TaskInfo(
        * accumulable to be updated multiple times in a single task or for two accumulables with the
        * same name but different IDs to exist in a task.
        */
    -  val accumulables = ListBuffer[AccumulableInfo]()
    --- End diff --
    
    In order to maintain binary compatibility, I could rewrite this to be a `lazy val` that returns a `ListBuffer` formed from the "real" `accumulables` which can remain private. I might go ahead and do that just to avoid any chance of incompatibility-related problems, although I don't anticipate this being an issue in practice.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Aside: if this and other processes see a lot of memory used by duplicate strings then maybe we should recommend trying -XX+UseStringDeduplication for a related and automatic win. 


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68290 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68290/consoleFull)** for PR 15743 at commit [`4c7067e`](https://github.com/apache/spark/commit/4c7067e740a35a5cd3ee8fa1ff2b23289110917a).


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86310825
  
    --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
    @@ -885,8 +885,8 @@ private[spark] object JsonProtocol {
         if (json == JNothing) {
           return null
         }
    -    val executorId = (json \ "Executor ID").extract[String]
    -    val host = (json \ "Host").extract[String]
    +    val executorId = (json \ "Executor ID").extract[String].intern()
    +    val host = (json \ "Host").extract[String].intern()
    --- End diff --
    
    In general intern'ing can be dangerous.
    I dont expect issues with host, but executorId (for long running jobs) can essentially OOM 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

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


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86842160
  
    --- Diff: project/MimaExcludes.scala ---
    @@ -86,7 +86,10 @@ object MimaExcludes {
           // [SPARK-18034] Upgrade to MiMa 0.1.11 to fix flakiness.
           ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.aggregationDepth"),
           ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.getAggregationDepth"),
    -      ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.org$apache$spark$ml$param$shared$HasAggregationDepth$_setter_$aggregationDepth_=")
    +      ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.org$apache$spark$ml$param$shared$HasAggregationDepth$_setter_$aggregationDepth_="),
    +
    +      // [SPARK-18236] Reduce duplicate objects in Spark UI and HistoryServer
    +      ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.scheduler.TaskInfo.accumulables")
    --- End diff --
    
    Yep, that's intentional; we removed the logic for excluding that annotation in #11751. The rationale is discussed in https://issues.apache.org/jira/browse/SPARK-13920:
    
    > Our MIMA binary compatibility checks currently ignore APIs which are marked as `@Experimental`or `@DeveloperApi`, but I don't think this makes sense. Even if those annotations _reserve_ the right to break binary compatibility, we should still avoid compatibility breaks whenever possible and should be informed explicitly when compatibility breaks.



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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68082/
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68095 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68095/consoleFull)** for PR 15743 at commit [`4c867f1`](https://github.com/apache/spark/commit/4c867f10ff5d8d80c7e8d44b4702785c0a017b64).


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86582778
  
    --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
    @@ -885,8 +885,8 @@ private[spark] object JsonProtocol {
         if (json == JNothing) {
           return null
         }
    -    val executorId = (json \ "Executor ID").extract[String]
    -    val host = (json \ "Host").extract[String]
    +    val executorId = (json \ "Executor ID").extract[String].intern()
    +    val host = (json \ "Host").extract[String].intern()
    --- End diff --
    
    From reading http://java-performance.info/string-intern-in-java-6-7-8/ it seems significantly safer in Java 7 (I also had the impression from tribal lore that `intern()` had been a bad idea in older JVMs) but not necessarily great for performance if you're going to intern hundreds of thousands of strings. But if this is a pretty targeted use for a hotspot, seems 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68075/
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68075 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68075/consoleFull)** for PR 15743 at commit [`f8aee5d`](https://github.com/apache/spark/commit/f8aee5ddf0a01d4ce5133a460e5c6c3cd6e3cefd).
     * 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68038/
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Alright, just pushed an update which re-introduces the binary compatibility break but chooses to expose a nicer + narrower public interface.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

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


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86840684
  
    --- Diff: project/MimaExcludes.scala ---
    @@ -86,7 +86,10 @@ object MimaExcludes {
           // [SPARK-18034] Upgrade to MiMa 0.1.11 to fix flakiness.
           ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.aggregationDepth"),
           ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.getAggregationDepth"),
    -      ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.org$apache$spark$ml$param$shared$HasAggregationDepth$_setter_$aggregationDepth_=")
    +      ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("org.apache.spark.ml.param.shared.HasAggregationDepth.org$apache$spark$ml$param$shared$HasAggregationDepth$_setter_$aggregationDepth_="),
    +
    +      // [SPARK-18236] Reduce duplicate objects in Spark UI and HistoryServer
    +      ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.scheduler.TaskInfo.accumulables")
    --- End diff --
    
    Hmm, I guess mima still fails to ignore `@DeveloperApi` changes?


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68290 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68290/consoleFull)** for PR 15743 at commit [`4c7067e`](https://github.com/apache/spark/commit/4c7067e740a35a5cd3ee8fa1ff2b23289110917a).
     * 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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86407389
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala ---
    @@ -197,8 +196,32 @@ private[spark] object UIData {
           shuffleWriteMetrics: ShuffleWriteMetricsUIData)
     
       case class InputMetricsUIData(bytesRead: Long, recordsRead: Long)
    +  object InputMetricsUIData {
    +    def apply(metrics: InputMetrics): InputMetricsUIData = {
    +      if (metrics.bytesRead == 0 && metrics.recordsRead == 0) {
    +        EMPTY
    +      } else {
    +        new InputMetricsUIData(
    +          bytesRead = metrics.bytesRead,
    +          recordsRead = metrics.recordsRead)
    +      }
    +    }
    +    val EMPTY = InputMetricsUIData(0, 0)
    --- 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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86312686
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala ---
    @@ -197,8 +196,32 @@ private[spark] object UIData {
           shuffleWriteMetrics: ShuffleWriteMetricsUIData)
     
       case class InputMetricsUIData(bytesRead: Long, recordsRead: Long)
    +  object InputMetricsUIData {
    +    def apply(metrics: InputMetrics): InputMetricsUIData = {
    +      if (metrics.bytesRead == 0 && metrics.recordsRead == 0) {
    +        EMPTY
    +      } else {
    +        new InputMetricsUIData(
    +          bytesRead = metrics.bytesRead,
    +          recordsRead = metrics.recordsRead)
    +      }
    +    }
    +    val EMPTY = InputMetricsUIData(0, 0)
    --- End diff --
    
    private ?


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

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


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68038 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68038/consoleFull)** for PR 15743 at commit [`7e05630`](https://github.com/apache/spark/commit/7e05630e9a78c455db8c8c499f0590c864624e05).
     * 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86612324
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala ---
    @@ -54,7 +54,12 @@ class TaskInfo(
        * accumulable to be updated multiple times in a single task or for two accumulables with the
        * same name but different IDs to exist in a task.
        */
    -  val accumulables = ListBuffer[AccumulableInfo]()
    +  lazy val accumulables: ListBuffer[AccumulableInfo] = ListBuffer(_accumulables: _*)
    --- End diff --
    
    Actually, though, if we're going to expose a public API for this at all then I think it should be read-only. Let me go ahead and refactor this to expose a read-only `Seq`.


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86410060
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -1089,7 +1089,7 @@ class DAGScheduler(
             // To avoid UI cruft, ignore cases where value wasn't updated
             if (acc.name.isDefined && !updates.isZero) {
               stage.latestInfo.accumulables(id) = acc.toInfo(None, Some(acc.value))
    -          event.taskInfo.accumulables += acc.toInfo(Some(updates.value), Some(acc.value))
    +          event.taskInfo.accumulables ::= acc.toInfo(Some(updates.value), Some(acc.value))
    --- End diff --
    
    Upon further inspection, however, it appears that this `updateAccumulators` method is only called once per task upon task completion or failure. The accumulator updates themselves come from `Task.collectAccumulatorUpdates()`, which is run on the executor and only produces one update per accumulator. Based on this, I'm pretty sure that we'll never get duplicates in `TaskInfo.accumulables` and therefore believe that the current code should be safe.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68086 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68086/consoleFull)** for PR 15743 at commit [`4c867f1`](https://github.com/apache/spark/commit/4c867f10ff5d8d80c7e8d44b4702785c0a017b64).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68082 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68082/consoleFull)** for PR 15743 at commit [`f8aee5d`](https://github.com/apache/spark/commit/f8aee5ddf0a01d4ce5133a460e5c6c3cd6e3cefd).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Thanks for reviewing! I'm going to merge this 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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86311221
  
    --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
    @@ -885,8 +885,8 @@ private[spark] object JsonProtocol {
         if (json == JNothing) {
           return null
         }
    -    val executorId = (json \ "Executor ID").extract[String]
    -    val host = (json \ "Host").extract[String]
    +    val executorId = (json \ "Executor ID").extract[String].intern()
    +    val host = (json \ "Host").extract[String].intern()
    --- End diff --
    
    scratch that, jdk7 improvements help.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

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


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Looks good to me, some minor queries and comments.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68095 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68095/consoleFull)** for PR 15743 at commit [`4c867f1`](https://github.com/apache/spark/commit/4c867f10ff5d8d80c7e8d44b4702785c0a017b64).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68082 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68082/consoleFull)** for PR 15743 at commit [`f8aee5d`](https://github.com/apache/spark/commit/f8aee5ddf0a01d4ce5133a460e5c6c3cd6e3cefd).
     * 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 issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

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


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68038 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68038/consoleFull)** for PR 15743 at commit [`7e05630`](https://github.com/apache/spark/commit/7e05630e9a78c455db8c8c499f0590c864624e05).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68041 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68041/consoleFull)** for PR 15743 at commit [`738cb5a`](https://github.com/apache/spark/commit/738cb5a43bce8b7e49035f3935104db23a6541c6).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    @srowen, that's a great tip about `UseStringDeduplication`; I'll give this a try in my deployment.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    **[Test build #68075 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68075/consoleFull)** for PR 15743 at commit [`f8aee5d`](https://github.com/apache/spark/commit/f8aee5ddf0a01d4ce5133a460e5c6c3cd6e3cefd).


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    Looking through the code this looks good to me, but I can only talk to the code for the first two bullets, I don't know enough about the intern function to comment on its use. This will give us some great speed ups to go with our other recent SHS updates.


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    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 #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86602786
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala ---
    @@ -54,7 +54,12 @@ class TaskInfo(
        * accumulable to be updated multiple times in a single task or for two accumulables with the
        * same name but different IDs to exist in a task.
        */
    -  val accumulables = ListBuffer[AccumulableInfo]()
    +  lazy val accumulables: ListBuffer[AccumulableInfo] = ListBuffer(_accumulables: _*)
    --- End diff --
    
    Isn't a `def` here the right thing? Otherwise, if `_accumulables` changes after this lazy val is evaluated, things will get out of sync.
    
    Or given how the semantics here now are getting pretty weird, maybe changing it to an immutable list and just breaking compatibility would be better. Then you can just return `_accumulables`.


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86841779
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala ---
    @@ -197,8 +196,32 @@ private[spark] object UIData {
           shuffleWriteMetrics: ShuffleWriteMetricsUIData)
     
       case class InputMetricsUIData(bytesRead: Long, recordsRead: Long)
    +  object InputMetricsUIData {
    +    def apply(metrics: InputMetrics): InputMetricsUIData = {
    +      if (metrics.bytesRead == 0 && metrics.recordsRead == 0) {
    +        EMPTY
    +      } else {
    +        new InputMetricsUIData(
    +          bytesRead = metrics.bytesRead,
    +          recordsRead = metrics.recordsRead)
    +      }
    +    }
    +    val EMPTY = InputMetricsUIData(0, 0)
    +  }
     
       case class OutputMetricsUIData(bytesWritten: Long, recordsWritten: Long)
    +  object OutputMetricsUIData {
    +    def apply(metrics: OutputMetrics): OutputMetricsUIData = {
    +      if (metrics.bytesWritten == 0 && metrics.recordsWritten == 0) {
    --- End diff --
    
    sounds good


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

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


[GitHub] spark issue #15743: [SPARK-18236] Reduce duplicate objects in Spark UI and H...

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

    https://github.com/apache/spark/pull/15743
  
    +1 on UseStringDeduplication ! Though jdk8 specific ....


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

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


[GitHub] spark pull request #15743: [SPARK-18236] Reduce duplicate objects in Spark U...

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

    https://github.com/apache/spark/pull/15743#discussion_r86407326
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala ---
    @@ -197,8 +196,32 @@ private[spark] object UIData {
           shuffleWriteMetrics: ShuffleWriteMetricsUIData)
     
       case class InputMetricsUIData(bytesRead: Long, recordsRead: Long)
    +  object InputMetricsUIData {
    +    def apply(metrics: InputMetrics): InputMetricsUIData = {
    +      if (metrics.bytesRead == 0 && metrics.recordsRead == 0) {
    +        EMPTY
    +      } else {
    +        new InputMetricsUIData(
    +          bytesRead = metrics.bytesRead,
    +          recordsRead = metrics.recordsRead)
    +      }
    +    }
    +    val EMPTY = InputMetricsUIData(0, 0)
    +  }
     
       case class OutputMetricsUIData(bytesWritten: Long, recordsWritten: Long)
    +  object OutputMetricsUIData {
    +    def apply(metrics: OutputMetrics): OutputMetricsUIData = {
    +      if (metrics.bytesWritten == 0 && metrics.recordsWritten == 0) {
    --- End diff --
    
    For OutputMetrics, I'd actually assume the opposite: these metrics are referring to bytes written to an external system, not bytes written to shuffle, so the majority of tasks won't have non-zero values for this metric (all but the last stage in a multi-stage job, for example).


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

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