You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/16 21:45:24 UTC

[GitHub] [spark] squito commented on a change in pull request #23767: [SPARK-26329][CORE] Faster polling of executor memory metrics.

squito commented on a change in pull request #23767: [SPARK-26329][CORE] Faster polling of executor memory metrics.
URL: https://github.com/apache/spark/pull/23767#discussion_r304125444
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala
 ##########
 @@ -600,8 +611,16 @@ private[spark] object JsonProtocolSuite extends Assertions {
             assert(stageAttemptId1 === stageAttemptId2)
             assertSeqEquals[AccumulableInfo](updates1, updates2, (a, b) => a.equals(b))
           })
-        assertOptionEquals(e1.executorUpdates, e2.executorUpdates,
-        (e1: ExecutorMetrics, e2: ExecutorMetrics) => assertEquals(e1, e2))
+        assertSeqEquals[((Int, Int), ExecutorMetrics)](
+          e1.executorUpdates.toSeq.sortWith((x, y) => lexOrder(x._1, y._1)),
+          e2.executorUpdates.toSeq.sortWith((x, y) => lexOrder(x._1, y._1)),
 
 Review comment:
   scala provides a default ordering on tuples, which is the same as your `lexOrder`, so I think you can get rid of that and this becomes  `.sortBy(_._1)`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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