[
https://issues.apache.org/jira/browse/KYLIN-4925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347465#comment-17347465
]
ASF GitHub Bot commented on KYLIN-4925:
---------------------------------------
zzcclp commented on a change in pull request #1601:
URL: https://github.com/apache/kylin/pull/1601#discussion_r635085054
##########
File path:
kylin-spark-project/kylin-spark-common/src/main/spark31/org/apache/spark/sql/hive/utils/QueryMetricUtils.scala
##########
@@ -0,0 +1,96 @@
+/*
+ * 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.sql.hive.utils
+
+import org.apache.spark.internal.Logging
+import org.apache.spark.sql.execution.adaptive.{AdaptiveSparkPlanExec,
ShuffleQueryStageExec}
+import org.apache.spark.sql.execution.{FileSourceScanExec,
KylinFileSourceScanExec, SparkPlan}
+import org.apache.spark.sql.hive.execution.HiveTableScanExec
+
+import scala.collection.JavaConverters.seqAsJavaListConverter
+
+object QueryMetricUtils extends Logging {
+ def collectScanMetrics(plan: SparkPlan): (java.util.List[java.lang.Long],
java.util.List[java.lang.Long],
+ java.util.List[java.lang.Long], java.util.List[java.lang.Long],
java.util.List[java.lang.Long]) = {
+ try {
+ val metrics = plan.collect {
+ case exec: KylinFileSourceScanExec =>
+ //(exec.metrics.apply("numOutputRows").value,
exec.metrics.apply("readBytes").value)
+ (exec.metrics.apply("numOutputRows").value,
exec.metrics.apply("numFiles").value,
+ exec.metrics.apply("metadataTime").value,
exec.metrics.apply("scanTime").value, -1l)
Review comment:
Use the new metric 'filesSize' added by Spark 3 to set the value of the
last metric, now is -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:
[email protected]
> Use Spark 3 as build and query engine for Kylin 4
> -------------------------------------------------
>
> Key: KYLIN-4925
> URL: https://issues.apache.org/jira/browse/KYLIN-4925
> Project: Kylin
> Issue Type: New Feature
> Components: Job Engine, Query Engine
> Reporter: Congling Xia
> Assignee: Congling Xia
> Priority: Major
> Fix For: v4.0.0-GA
>
>
> Spark 3 provides much more developed AQE framework, DPP and the increased
> support for GPUs and Kubernetes. The perspectives of performance increase are
> very promising.
> Currently, we try to run Kylin 4.0 with Spark 3.0 as build & query engine.
> We'd like to share the code changes here.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)