[GitHub] spark pull request #23181: [SPARK-26219][CORE] Executor summary should get u...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/23181 --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #23181: [SPARK-26219][CORE] Executor summary should get u...
Github user shahidki31 commented on a diff in the pull request: https://github.com/apache/spark/pull/23181#discussion_r237959492 --- Diff: core/src/test/scala/org/apache/spark/status/AppStatusListenerSuite.scala --- @@ -1274,47 +1274,69 @@ class AppStatusListenerSuite extends SparkFunSuite with BeforeAndAfter { } test("SPARK-25451: total tasks in the executor summary should match total stage tasks") { -val testConf = conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) -val listener = new AppStatusListener(store, testConf, true) +val isLiveSeq = Seq(true, false) -val stage = new StageInfo(1, 0, "stage", 4, Nil, Nil, "details") -listener.onJobStart(SparkListenerJobStart(1, time, Seq(stage), null)) -listener.onStageSubmitted(SparkListenerStageSubmitted(stage, new Properties())) +isLiveSeq.foreach { live: Boolean => + val testConf = if (live) { +conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) --- End diff -- Done --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #23181: [SPARK-26219][CORE] Executor summary should get u...
Github user shahidki31 commented on a diff in the pull request: https://github.com/apache/spark/pull/23181#discussion_r237959457 --- Diff: core/src/test/scala/org/apache/spark/status/AppStatusListenerSuite.scala --- @@ -1274,47 +1274,69 @@ class AppStatusListenerSuite extends SparkFunSuite with BeforeAndAfter { } test("SPARK-25451: total tasks in the executor summary should match total stage tasks") { -val testConf = conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) -val listener = new AppStatusListener(store, testConf, true) +val isLiveSeq = Seq(true, false) -val stage = new StageInfo(1, 0, "stage", 4, Nil, Nil, "details") -listener.onJobStart(SparkListenerJobStart(1, time, Seq(stage), null)) -listener.onStageSubmitted(SparkListenerStageSubmitted(stage, new Properties())) +isLiveSeq.foreach { live: Boolean => --- End diff -- Thanks. Updated. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #23181: [SPARK-26219][CORE] Executor summary should get u...
Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/23181#discussion_r237952522 --- Diff: core/src/test/scala/org/apache/spark/status/AppStatusListenerSuite.scala --- @@ -1274,47 +1274,69 @@ class AppStatusListenerSuite extends SparkFunSuite with BeforeAndAfter { } test("SPARK-25451: total tasks in the executor summary should match total stage tasks") { -val testConf = conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) -val listener = new AppStatusListener(store, testConf, true) +val isLiveSeq = Seq(true, false) -val stage = new StageInfo(1, 0, "stage", 4, Nil, Nil, "details") -listener.onJobStart(SparkListenerJobStart(1, time, Seq(stage), null)) -listener.onStageSubmitted(SparkListenerStageSubmitted(stage, new Properties())) +isLiveSeq.foreach { live: Boolean => + val testConf = if (live) { +conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) --- End diff -- nit: `clone()` --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #23181: [SPARK-26219][CORE] Executor summary should get u...
Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/23181#discussion_r237952479 --- Diff: core/src/test/scala/org/apache/spark/status/AppStatusListenerSuite.scala --- @@ -1274,47 +1274,69 @@ class AppStatusListenerSuite extends SparkFunSuite with BeforeAndAfter { } test("SPARK-25451: total tasks in the executor summary should match total stage tasks") { -val testConf = conf.clone.set(LIVE_ENTITY_UPDATE_PERIOD, Long.MaxValue) -val listener = new AppStatusListener(store, testConf, true) +val isLiveSeq = Seq(true, false) -val stage = new StageInfo(1, 0, "stage", 4, Nil, Nil, "details") -listener.onJobStart(SparkListenerJobStart(1, time, Seq(stage), null)) -listener.onStageSubmitted(SparkListenerStageSubmitted(stage, new Properties())) +isLiveSeq.foreach { live: Boolean => --- End diff -- When doing things like this I prefer to invert the logic. ``` Seq(true, false).foreach { live => test(s"blah blah blah (live = $live)") { } } ``` --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org