Henry Robinson has uploaded a new patch set (#6).

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, PushPullSink, 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 PushPullSink
* Add coordination to PFE to allow coordinator to observe lifecycle
* Allow movable types to be used in BlockingQueue
* Make FragmentMgr a singleton
* Removed dead code from Coordinator::Wait()
* Decoupled QES output exprs from PFE's LLVM module by introducing
  temporary RuntimeState.
* Remove special-case limit-based teardown of coordinator fragment, and
  supporting functions in PlanFragmentExecutor.

Not yet done:

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

Some effort has been made to limit the impact on Coordinator to
alleviate the effect of conflicts.

TODO in future patches:

* Move output expr evaluation into PushPullSink
* Clean up fragment profile initialisation in coordinator.

Testing:

EE tests fail predictably in test_tpcds_queries (although memtracker
tests may be implicated). Not yet reproducible locally. Patch submitted
for review to address core logic changes.

Change-Id: Ibb0064ec2f085fa3a5598ea80894fb489a01e4df
---
M be/src/exec/CMakeLists.txt
M be/src/exec/data-sink.cc
A be/src/exec/push-pull-sink.cc
A be/src/exec/push-pull-sink.h
M be/src/runtime/coordinator.cc
M be/src/runtime/coordinator.h
M be/src/runtime/exec-env.cc
M be/src/runtime/exec-env.h
M be/src/runtime/plan-fragment-executor.cc
M be/src/runtime/plan-fragment-executor.h
M be/src/scheduling/simple-scheduler.cc
M be/src/service/fragment-exec-state.h
M be/src/service/fragment-mgr.cc
M be/src/service/impala-internal-service.h
M be/src/service/impala-server.cc
M be/src/testutil/in-process-servers.cc
M be/src/util/blocking-queue-test.cc
M be/src/util/blocking-queue.h
M common/thrift/DataSinks.thrift
M fe/src/main/java/com/cloudera/impala/analysis/QueryStmt.java
M fe/src/main/java/com/cloudera/impala/planner/Planner.java
M fe/src/main/java/com/cloudera/impala/planner/PlannerContext.java
A fe/src/main/java/com/cloudera/impala/planner/PushPullSink.java
M tests/hs2/test_json_endpoints.py
24 files changed, 552 insertions(+), 277 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/4402/6
-- 
To view, visit http://gerrit.cloudera.org:8080/4402
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibb0064ec2f085fa3a5598ea80894fb489a01e4df
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <he...@cloudera.com>

Reply via email to