diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java index 25dd970a9b1..4002ccb8161 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java @@ -285,6 +285,7 @@ public int execute() { } } } + updateNumRows(); } catch (Exception e) { LOG.error("Failed to execute tez graph.", e); setException(e); @@ -325,6 +326,16 @@ public int execute() { return rc; } + private void updateNumRows() { + if (counters != null) { + TezCounter counter = counters.findCounter( + conf.getVar(HiveConf.ConfVars.HIVECOUNTERGROUP), FileSinkOperator.TOTAL_TABLE_ROWS_WRITTEN); + if (counter != null) { + queryState.setNumModifiedRows(counter.getValue()); + } + } + } + private String getUserNameForGroups(SessionState ss) { // This should be removed when authenticator and the 2-username mess is cleaned up. if (ss.getAuthenticator() != null) {