You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/11 02:04:50 UTC
[18/32] hive git commit: HIVE-20103: WM: Only Aggregate DAG counters
if at least one is used (Gopal V, reviewed by Prasanth Jayachandran)
HIVE-20103: WM: Only Aggregate DAG counters if at least one is used (Gopal V, reviewed by Prasanth Jayachandran)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d3bba716
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d3bba716
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d3bba716
Branch: refs/heads/master-txnstats
Commit: d3bba71666c41f13e8efb007d7cd20accde0b296
Parents: 9fb4292
Author: Gopal V <go...@apache.org>
Authored: Mon Jul 9 09:08:21 2018 -0700
Committer: Gopal V <go...@apache.org>
Committed: Mon Jul 9 09:08:21 2018 -0700
----------------------------------------------------------------------
.../ql/exec/tez/monitoring/TezJobMonitor.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/d3bba716/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java
index 98048c8..d3fe190 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java
@@ -166,17 +166,26 @@ public class TezJobMonitor {
context.checkHeartbeaterLockException();
}
- status = dagClient.getDAGStatus(EnumSet.of(StatusGetOpts.GET_COUNTERS), checkInterval);
- TezCounters dagCounters = status.getDAGCounters();
- vertexProgressMap = status.getVertexProgress();
wmContext = context.getWmContext();
+ EnumSet<StatusGetOpts> opts = null;
+ if (wmContext != null) {
+ Set<String> desiredCounters = wmContext.getSubscribedCounters();
+ if (desiredCounters != null && !desiredCounters.isEmpty()) {
+ opts = EnumSet.of(StatusGetOpts.GET_COUNTERS);
+ }
+ }
+
+ status = dagClient.getDAGStatus(opts, checkInterval);
+
+ vertexProgressMap = status.getVertexProgress();
List<String> vertexNames = vertexProgressMap.keySet()
.stream()
.map(k -> k.replaceAll(" ", "_"))
.collect(Collectors.toList());
- if (dagCounters != null && wmContext != null) {
+ if (wmContext != null) {
Set<String> desiredCounters = wmContext.getSubscribedCounters();
- if (desiredCounters != null && !desiredCounters.isEmpty()) {
+ TezCounters dagCounters = status.getDAGCounters();
+ if (dagCounters != null && desiredCounters != null && !desiredCounters.isEmpty()) {
Map<String, Long> currentCounters = getCounterValues(dagCounters, vertexNames, vertexProgressMap,
desiredCounters, done);
if (LOG.isDebugEnabled()) {