You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2016/11/16 01:32:58 UTC
[jira] [Commented] (SPARK-18462) SparkListenerDriverAccumUpdates
event does not deserialize properly in history server
[ https://issues.apache.org/jira/browse/SPARK-18462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15668990#comment-15668990 ]
Josh Rosen commented on SPARK-18462:
------------------------------------
{code}
[info] - roundtripping SparkListenerDriverAccumUpdates through JsonProtocol (SPARK-18462) *** FAILED *** (547 milliseconds)
[info] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
[info] at scala.runtime.BoxesRunTime.unboxToLong(BoxesRunTime.java:105)
[info] at scala.Tuple2._1$mcJ$sp(Tuple2.scala:20)
[info] at org.apache.spark.sql.execution.ui.SQLListenerSuite$$anonfun$8$$anonfun$apply$mcV$sp$28.apply(SQLListenerSuite.scala:429)
[info] at org.apache.spark.sql.execution.ui.SQLListenerSuite$$anonfun$8$$anonfun$apply$mcV$sp$28.apply(SQLListenerSuite.scala:429)
[info] at scala.collection.immutable.List.foreach(List.scala:381)
[info] at org.apache.spark.sql.execution.ui.SQLListenerSuite$$anonfun$8.apply$mcV$sp(SQLListenerSuite.scala:429)
[info] at org.apache.spark.sql.execution.ui.SQLListenerSuite$$anonfun$8.apply(SQLListenerSuite.scala:420)
[info] at org.apache.spark.sql.execution.ui.SQLListenerSuite$$anonfun$8.apply(SQLListenerSuite.scala:420)
{code}
> SparkListenerDriverAccumUpdates event does not deserialize properly in history server
> -------------------------------------------------------------------------------------
>
> Key: SPARK-18462
> URL: https://issues.apache.org/jira/browse/SPARK-18462
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.0.0
> Reporter: Josh Rosen
> Assignee: Josh Rosen
>
> The following test fails with a ClassCastException due to oddities in how Jackson object mapping works, breaking the SQL tab in the history server:
> {code}
> +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
> @@ -19,6 +19,7 @@ package org.apache.spark.sql.execution.ui
> import java.util.Properties
> +import org.json4s.jackson.JsonMethods._
> import org.mockito.Mockito.mock
> import org.apache.spark._
> @@ -35,7 +36,7 @@ import org.apache.spark.sql.execution.{LeafExecNode, QueryExecution, SparkPlanIn
> import org.apache.spark.sql.execution.metric.{SQLMetric, SQLMetrics}
> import org.apache.spark.sql.test.SharedSQLContext
> import org.apache.spark.ui.SparkUI
> -import org.apache.spark.util.{AccumulatorMetadata, LongAccumulator}
> +import org.apache.spark.util.{AccumulatorMetadata, JsonProtocol, LongAccumulator}
> class SQLListenerSuite extends SparkFunSuite with SharedSQLContext {
> @@ -416,6 +417,20 @@ class SQLListenerSuite extends SparkFunSuite with SharedSQLContext {
> assert(driverUpdates(physicalPlan.longMetric("dummy").id) == expectedAccumValue)
> }
> + test("roundtripping SparkListenerDriverAccumUpdates through JsonProtocol") {
> + val event = SparkListenerDriverAccumUpdates(1L, Seq((2L, 3L)))
> + val actualJsonString = compact(render(JsonProtocol.sparkEventToJson(event)))
> + val newEvent = JsonProtocol.sparkEventFromJson(parse(actualJsonString))
> + newEvent match {
> + case SparkListenerDriverAccumUpdates(executionId, accums) =>
> + assert(executionId == 1L)
> + accums.foreach { case (a, b) =>
> + assert(a == 2L)
> + assert(b == 3L)
> + }
> + }
> + }
> +
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org