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 2022/12/17 00:31:00 UTC

[GitHub] [spark] gengliangwang opened a new pull request, #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummary

gengliangwang opened a new pull request, #39100:
URL: https://github.com/apache/spark/pull/39100

   ### What changes were proposed in this pull request?
   Add Protobuf serializer for ExecutorStageSummary
   
   ### Why are the changes needed?
   Support fast and compact serialization/deserialization for ExecutorStageSummary over RocksDB.
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   New UT


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] gengliangwang commented on pull request #39100: [SPARK-41427][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on PR #39100:
URL: https://github.com/apache/spark/pull/39100#issuecomment-1358848179

   Merging to master


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] LuciferYang commented on a diff in pull request #39100: [SPARK-41427][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #39100:
URL: https://github.com/apache/spark/pull/39100#discussion_r1053000909


##########
core/src/main/scala/org/apache/spark/status/protobuf/ExecutorMetricsSerializer.scala:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.status.protobuf
+
+import org.apache.spark.executor.ExecutorMetrics
+import org.apache.spark.metrics.ExecutorMetricType
+
+object ExecutorMetricsSerializer {
+  def serialize(e: ExecutorMetrics): StoreTypes.ExecutorMetrics = {
+    val builder = StoreTypes.ExecutorMetrics.newBuilder()
+    ExecutorMetricType.metricToOffset.foreach { case (metric, _) =>
+      builder.putMetrics(metric, e.getMetricValue(metric))
+      metric -> e.getMetricValue(metric)

Review Comment:
   @gengliangwang 
   line 27 already `putMetrics(metric, e.getMetricValue(metric))`,
   
   What is the purpose of line 28 (`metric -> e.getMetricValue(metric)` )? I didn't understand it. Could you explain? Thanks.
   
   



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] techaddict commented on pull request #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummary

Posted by GitBox <gi...@apache.org>.
techaddict commented on PR #39100:
URL: https://github.com/apache/spark/pull/39100#issuecomment-1356054846

   @gengliangwang is this not for https://issues.apache.org/jira/browse/SPARK-41427 ?
   This one looks like PR for `ExecutorStageSummaryWrapper` where as issue [SPARK-41422] was for `ExecutorSummaryWrapper`


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] gengliangwang commented on a diff in pull request #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummary

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on code in PR #39100:
URL: https://github.com/apache/spark/pull/39100#discussion_r1051265349


##########
core/src/main/scala/org/apache/spark/status/protobuf/ExecutorMetricsSerializer.scala:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.status.protobuf
+
+import org.apache.spark.executor.ExecutorMetrics
+import org.apache.spark.metrics.ExecutorMetricType
+
+object ExecutorMetricsSerializer {
+  def serialize(e: ExecutorMetrics): StoreTypes.ExecutorMetrics = {

Review Comment:
   This follows ExecutorMetricsJsonSerializer



##########
core/src/main/scala/org/apache/spark/status/protobuf/ExecutorMetricsSerializer.scala:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.status.protobuf
+
+import org.apache.spark.executor.ExecutorMetrics
+import org.apache.spark.metrics.ExecutorMetricType
+
+object ExecutorMetricsSerializer {
+  def serialize(e: ExecutorMetrics): StoreTypes.ExecutorMetrics = {
+    val builder = StoreTypes.ExecutorMetrics.newBuilder()
+    ExecutorMetricType.metricToOffset.foreach { case (metric, _) =>
+      builder.putMetrics(metric, e.getMetricValue(metric))
+      metric -> e.getMetricValue(metric)
+    }
+    builder.build()
+  }
+
+  def deserialize(binary: StoreTypes.ExecutorMetrics): ExecutorMetrics = {

Review Comment:
   This follows ExecutorMetricsJsonDeserializer



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] LuciferYang commented on pull request #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on PR #39100:
URL: https://github.com/apache/spark/pull/39100#issuecomment-1357591375

   hmm.. is this should be SPARK-41427?


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] gengliangwang closed pull request #39100: [SPARK-41427][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #39100: [SPARK-41427][UI] Protobuf serializer for ExecutorStageSummaryWrapper
URL: https://github.com/apache/spark/pull/39100


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] LuciferYang commented on a diff in pull request #39100: [SPARK-41427][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on code in PR #39100:
URL: https://github.com/apache/spark/pull/39100#discussion_r1053012476


##########
core/src/main/scala/org/apache/spark/status/protobuf/ExecutorMetricsSerializer.scala:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.status.protobuf
+
+import org.apache.spark.executor.ExecutorMetrics
+import org.apache.spark.metrics.ExecutorMetricType
+
+object ExecutorMetricsSerializer {
+  def serialize(e: ExecutorMetrics): StoreTypes.ExecutorMetrics = {
+    val builder = StoreTypes.ExecutorMetrics.newBuilder()
+    ExecutorMetricType.metricToOffset.foreach { case (metric, _) =>
+      builder.putMetrics(metric, e.getMetricValue(metric))
+      metric -> e.getMetricValue(metric)

Review Comment:
   I guess it's redundant, so I give https://github.com/apache/spark/pull/39135 to delete line 28, if not, please correct me
   
   



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] gengliangwang commented on pull request #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummaryWrapper

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on PR #39100:
URL: https://github.com/apache/spark/pull/39100#issuecomment-1356109099

   @techaddict Yes it is for ExecutorStageSummaryWrapper. I just updated the title.


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [spark] gengliangwang commented on pull request #39100: [SPARK-41422][UI] Protobuf serializer for ExecutorStageSummary

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on PR #39100:
URL: https://github.com/apache/spark/pull/39100#issuecomment-1355874010

   cc @techaddict


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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