[
https://issues.apache.org/jira/browse/HIVE-30282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raghav Aggarwal updated HIVE-30282:
-----------------------------------
Description:
To display Tez job progress in beeline, TezJobMonitor polls
dagClient.getDAGStatus() every hive.tez.dag.status.check.interval (default
500ms) and constructs a new TezProgressMonitor on each update.
[https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java#L634-L643]
In TezProgressMonitor constructs, it loops over all vertices and calls
dagClient.getVertexStatus() — invoking a separate RPC call to the Tez AM for
every vertex after 500ms.
* So (No. of Vertex getVertexStatus() + 1 getDAGStatus()) call in each poll
i.e V + 1 calls.
* DAGStatus.getVertexProgress() already get the vertex state , and only reads
the fetched VertexStatus when dagState == KILLED.
* The comment here confirms this was meant to be avoided on every refresh
[https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezProgressMonitor.java#L255-L257]
h3. Fix
* Add a check in TezProgressMonitor's constructor i.e. if (status.getState()
== KILLED) then only call getVertexStatus() to maintain the existing behaviour
but elimination expensive AM RPC call for other state.
was:
To display Tez job progress in beeline, TezJobMonitor polls
dagClient.getDAGStatus() every hive.tez.dag.status.check.interval (default
500ms) and constructs a new TezProgressMonitor on each update.
[https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java#L634-L643]
In TezProgressMonitor constructs, it loops over all vertices and calls
dagClient.getVertexStatus() — invoking a separate RPC call to the Tez AM for
every vertex after 500ms.
* So (No. of Vertex + 1 getDAGStatus()) call in each poll.
* DAGStatus.getVertexProgress() already get the vertex state , and only reads
the fetched VertexStatus when dagState == KILLED.
* The comment here confirms this was meant to be avoided on every refresh
[https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezProgressMonitor.java#L255-L257]
h3. Fix
* Add a check in TezProgressMonitor's constructor i.e. if (status.getState()
== KILLED) then only call getVertexStatus() to maintain the existing behaviour
but elimination expensive AM RPC call for other state.
> Eliminate per-vertex getVertexStatus() AM RPCs on every progress poll unless
> DAG is killed
> ------------------------------------------------------------------------------------------
>
> Key: HIVE-30282
> URL: https://issues.apache.org/jira/browse/HIVE-30282
> Project: Hive
> Issue Type: Improvement
> Components: Tez
> Reporter: Raghav Aggarwal
> Assignee: Raghav Aggarwal
> Priority: Major
>
> To display Tez job progress in beeline, TezJobMonitor polls
> dagClient.getDAGStatus() every hive.tez.dag.status.check.interval (default
> 500ms) and constructs a new TezProgressMonitor on each update.
> [https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java#L634-L643]
>
> In TezProgressMonitor constructs, it loops over all vertices and calls
> dagClient.getVertexStatus() — invoking a separate RPC call to the Tez AM for
> every vertex after 500ms.
> * So (No. of Vertex getVertexStatus() + 1 getDAGStatus()) call in each poll
> i.e V + 1 calls.
> * DAGStatus.getVertexProgress() already get the vertex state , and only
> reads the fetched VertexStatus when dagState == KILLED.
> * The comment here confirms this was meant to be avoided on every refresh
> [https://github.com/apache/hive/blob/c56c3f5924c8fba851318087766ba380ed836d06/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezProgressMonitor.java#L255-L257]
>
> h3. Fix
> * Add a check in TezProgressMonitor's constructor i.e. if
> (status.getState() == KILLED) then only call getVertexStatus() to maintain
> the existing behaviour but elimination expensive AM RPC call for other state.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)