@ Override public void start ( ) throws AtlasException { if ( ! HAConfiguration . isHAEnabled ( configuration ) ) { LOG . info ( "HA is not enabled, no need to start leader election service" ) ; return ; } cacheActiveStateChangeHandlers ( ) ; serverId = AtlasServerIdSelector . selectServerId ( configuration ) ; joinElection ( ) ; }
Join leader election on starting up .