impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Robinson (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-2905: Handle coordinator fragment lifecycle like all others
Date Sat, 08 Oct 2016 00:50:12 GMT
Henry Robinson has uploaded a new patch set (#10).

Change subject: IMPALA-2905: Handle coordinator fragment lifecycle like all others

IMPALA-2905: Handle coordinator fragment lifecycle like all others

The plan-root fragment instance that runs on the coordinator should be
handled like all others: started via RPC and run asynchronously. Without
this, the fragment requires special-case code throughout the
coordinator, and does not show up in system metrics etc.

This patch adds a new sink type, PlanRootSink, to the root fragment
instance so that the coordinator can pull row batches that are pushed by
the root instance. The coordinator signals completion to the fragment
instance via closing the consumer side of the sink, whereupon the
instance is free to complete.

Since the root instance now runs asynchronously wrt to the coordinator,
we add several coordination methods to allow the coordinator to wait for
a point in the instance's execution to be hit - e.g. to wait until the
instance has been opened.

Done in this patch:

* Add PlanRootSink
* Add coordination to PFE to allow coordinator to observe lifecycle
* Make FragmentMgr a singleton
* Removed dead code from Coordinator::Wait() and elsewhere.
* Moved result output exprs out of QES and into PlanRootSink.
* Remove special-case limit-based teardown of coordinator fragment, and
  supporting functions in PlanFragmentExecutor.
* Simplified lifecycle of PlanFragmentExecutor by separating Open() into
  OpenPlan() and Exec(), the latter of which drives the sink by reading
  rows from the plan tree.
* Add child profile to PlanFragmentExecutor to measure time spent in
  each lifecycle phase.
* Removed dependency between InitExecProfiles() and starting root fragment.

Not yet done:

* Fix planner tests to reflect new sink added at root.

Change-Id: Ibb0064ec2f085fa3a5598ea80894fb489a01e4df
M be/src/exec/CMakeLists.txt
M be/src/exec/
A be/src/exec/
A be/src/exec/plan-root-sink.h
M be/src/runtime/
M be/src/runtime/coordinator.h
M be/src/runtime/
M be/src/runtime/exec-env.h
M be/src/runtime/
M be/src/runtime/plan-fragment-executor.h
M be/src/scheduling/
M be/src/scheduling/query-schedule.h
M be/src/scheduling/
M be/src/service/
M be/src/service/fragment-exec-state.h
M be/src/service/
M be/src/service/
M be/src/service/
M be/src/service/impala-internal-service.h
M be/src/service/
M be/src/service/impala-server.h
M be/src/service/
M be/src/service/query-exec-state.h
M be/src/testutil/
M common/thrift/DataSinks.thrift
M fe/src/main/java/org/apache/impala/analysis/
A fe/src/main/java/org/apache/impala/planner/
M fe/src/main/java/org/apache/impala/planner/
M fe/src/main/java/org/apache/impala/planner/
M tests/hs2/
30 files changed, 819 insertions(+), 709 deletions(-)

  git pull ssh:// refs/changes/02/4402/10
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibb0064ec2f085fa3a5598ea80894fb489a01e4df
Gerrit-PatchSet: 10
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message