Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/20372
to look at the new patch set (#3).
Change subject: IMPALA-12156: Support High Availability for Statestore
......................................................................
IMPALA-12156: Support High Availability for Statestore
To support statestore HA, we allow two statestored instances in an
Active-Passive HA pair to be added to an Impala cluster. We add the
preemptive behavior for statestored. When HA is enabled, the preemptive
behavior allows the statestored with the higher priority to become
active and the paired statestored becomes standby. The active
statestored acts as the owner of Impala cluster and provides statestore
service for the cluster members.
To enable catalog HA for a cluster, two statestoreds in the HA pair and
all subscribers must be started with starting flag
"enable_statestored_ha".
- Define new service for Statestore HA.
- Negotiate role for HA with peer statestore instance on startup.
- Create HA monitor thread:
active statestored send heartbeat to standby statestored.
standby statestored monitor peer's connection states
- Standby statestored send heartbeat to subscribers with request
for connection state between active statestore and subscribers.
Standby statestored save the connection state as failure detecer.
- When standby statestored loss connection with active statestore,
check the connection states for active statestore, and take over
active role if majority of subscribers lose connections with active
statestore.
- New active statestored send RPC notification to all subscribers
for new active statestored and active catalogd elected by new
active staetstored.
- New active statestored start to send heartbeat to its peer when it
receive handshake from its peer.
- Subscriber register to two statestoreds.
- Subscriber report connection state for in-active statestore.
- Subscriber switch to new active statstore, refuse topic update
from standby statestored.
Testings:
- Added end-to-end unit tests.
- TODO: pass core tests
Change-Id: Ibd2c814bbad5c04c1d50c2edaa5b910c82a6fd87
---
M be/generated-sources/gen-cpp/CMakeLists.txt
M be/src/catalog/catalog-server.cc
M be/src/common/global-flags.cc
M be/src/runtime/exec-env.cc
M be/src/runtime/exec-env.h
M be/src/scheduling/admissiond-env.cc
M be/src/statestore/statestore-service-client-wrapper.h
M be/src/statestore/statestore-subscriber-catalog.cc
M be/src/statestore/statestore-subscriber-catalog.h
M be/src/statestore/statestore-subscriber-client-wrapper.h
M be/src/statestore/statestore-subscriber.cc
M be/src/statestore/statestore-subscriber.h
M be/src/statestore/statestore-test.cc
M be/src/statestore/statestore.cc
M be/src/statestore/statestore.h
M be/src/statestore/statestored-main.cc
M bin/start-impala-cluster.py
M common/thrift/StatestoreService.thrift
M common/thrift/metrics.json
M tests/common/impala_cluster.py
M tests/common/impala_service.py
A tests/custom_cluster/test_statestored_ha.py
22 files changed, 2,086 insertions(+), 106 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/20372/3
--
To view, visit http://gerrit.cloudera.org:8080/20372
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibd2c814bbad5c04c1d50c2edaa5b910c82a6fd87
Gerrit-Change-Number: 20372
Gerrit-PatchSet: 3
Gerrit-Owner: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>