[ 
https://issues.apache.org/jira/browse/IMPALA-12155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735763#comment-17735763
 ] 

ASF subversion and git services commented on IMPALA-12155:
----------------------------------------------------------

Commit 819db8fa4667e06d1a56fe08baddfbc26983d389 in impala's branch 
refs/heads/master from wzhou-code
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=819db8fa4 ]

IMPALA-12155: Support High Availability for CatalogD

To support catalog HA, we allow two catalogd instances in an Active-
Passive HA pair to be added to an Impala cluster.
We add the preemptive behavior for catalogd. When enabled, the
preemptive behavior allows the catalogd with the higher priority to
become active and the paired catalogd becomes standby. The active
catalogd acts as the source of metadata and provides catalog service
for the Impala cluster.

To enable catalog HA for a cluster, two catalogds in the HA pair and
statestore must be started with starting flag "enable_catalogd_ha".

The catalogd in an Active-Passive HA pair can be assigned an instance
priority value to indicate a preference for which catalogd should assume
the active role. The registration ID which is assigned by statestore can
be used as instance priority value. The lower numerical value in
registration ID corresponds to a higher priority. The catalogd with the
higher priority is designated as active, the other catalogd is
designated as standby. Only the active catalogd propagates the
IMPALA_CATALOG_TOPIC to the cluster. This guarantees only one writer for
the IMPALA_CATALOG_TOPIC in a Impala cluster.

The statestore which is the registration center of an Impala cluster
assigns the roles for the catalogd in the HA pair after both catalogds
register to statestore. When statestore detects the active catalogd is
not healthy, it fails over catalog service to standby catalogd. When
failover occurs, statestore sends notifications with the address of
active catalogd to all coordinators and catalogd in the cluster. The
events are logged in the statestore and catalogd logs. When the catalogd
with the higher priority recovers from a failure, statestore does not
resume it as active to avoid flip-flop between the two catalogd.

To make a specific catalogd in the HA pair as active instance, the
catalogd must be started with starting flag "force_catalogd_active" so
that the catalogd will be assigned with active role when it registers
to statestore. This allows administrator to manually perform catalog
service failover.

Added option "--enable_catalogd_ha" in bin/start-impala-cluster.py.
If the option is specified when running the script, the script will
create an Impala cluster with two catalogd instances in HA pair.

Testing:
 - Passed the core tests.
 - Added unit-test for auto failover and manual failover.

Change-Id: I68ce7e57014e2a01133aede7853a212d90688ddd
Reviewed-on: http://gerrit.cloudera.org:8080/19914
Reviewed-by: Xiang Yang <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Tamas Mate <[email protected]>


> Support Impala CatalogD HA
> --------------------------
>
>                 Key: IMPALA-12155
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12155
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Wenzhe Zhou
>            Assignee: Wenzhe Zhou
>            Priority: Critical
>             Fix For: Impala 4.3.0
>
>
> To support catalog HA, we need to have two CatalogD in HA pair, and add the 
> preemptive behavior for Catalogd. When CatalogD HA is enabled, the preemptive 
> behavior allows the CatalogD with the higher priority to become active and 
> the paired CatalogD becomes standby. The active CatalogD acts as the source 
> of metadata and provides catalog service for the Impala cluster. When active 
> CatalogD is not healthy, the standby CatalogD will take over catalog service.
> Preemption is disabled on the CatalogD when it is not running as HA pair.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to