hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1646833 - /hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java
Date Fri, 19 Dec 2014 19:17:37 GMT
Author: xuefu
Date: Fri Dec 19 19:17:36 2014
New Revision: 1646833

URL: http://svn.apache.org/r1646833
Log:
HIVE-9088: Spark counter serialization error in spark.log [Spark Branch] (Chengxiang via Xuefu)

Modified:
    hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java

Modified: hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java?rev=1646833&r1=1646832&r2=1646833&view=diff
==============================================================================
--- hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java (original)
+++ hive/branches/spark/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkTask.java Fri
Dec 19 19:17:36 2014
@@ -376,14 +376,15 @@ public class SparkTask extends Task<Spar
     List<String> hiveCounters = new LinkedList<String>();
     counters.put(groupName, hiveCounters);
     hiveCounters.add(Operator.HIVECOUNTERCREATEDFILES);
+    // MapOperator is out of SparkWork, SparkMapRecordHandler use it to bridge
+    // Spark transformation and Hive operators in SparkWork.
+    for (MapOperator.Counter counter : MapOperator.Counter.values()) {
+      hiveCounters.add(counter.toString());
+    }
     SparkWork sparkWork = this.getWork();
     for (BaseWork work : sparkWork.getAllWork()) {
       for (Operator operator : work.getAllOperators()) {
-        if (operator instanceof MapOperator) {
-          for (MapOperator.Counter counter : MapOperator.Counter.values()) {
-            hiveCounters.add(counter.toString());
-          }
-        } else if (operator instanceof FileSinkOperator) {
+        if (operator instanceof FileSinkOperator) {
           for (FileSinkOperator.Counter counter : FileSinkOperator.Counter.values()) {
             hiveCounters.add(counter.toString());
           }



Mime
View raw message