public class TribeService extends AbstractLifecycleComponent
The processSettings(org.elasticsearch.common.settings.Settings)
method should be called before
starting the node, so it will make sure to configure this current node properly with the relevant tribe node
settings.
The tribe node settings make sure the discovery used is "local", but with no master elected. This means no
write level master node operations will work (MasterNotDiscoveredException
will be thrown), and state level metadata operations with automatically use the local flag.
The state merged from different clusters include the list of nodes, metadata, and routing table. Each node merged will have in its tribe which tribe member it came from. Each index merged will have in its settings which tribe member it came from. In case an index has already been merged from one cluster, and the same name index is discovered in another cluster, the conflict one will be discarded. This happens because we need to have the correct index name to propagate to the relevant cluster.
Modifier and Type | Class and Description |
---|---|
static interface |
TribeService.MergableCustomMetaData<T extends MetaData.Custom>
Interface to allow merging
MetaData.Custom in tribe node
When multiple Mergable Custom metadata of the same type is found (from underlying clusters), the
Custom metadata will be merged using TribeService.MergableCustomMetaData.merge(MetaData.Custom) and the result will be stored
in the tribe cluster state |
Modifier and Type | Field and Description |
---|---|
static Setting<java.util.List<java.lang.String>> |
BLOCKS_METADATA_INDICES_SETTING |
static Setting<java.lang.Boolean> |
BLOCKS_METADATA_SETTING |
static Setting<java.util.List<java.lang.String>> |
BLOCKS_READ_INDICES_SETTING |
static Setting<java.util.List<java.lang.String>> |
BLOCKS_WRITE_INDICES_SETTING |
static Setting<java.lang.Boolean> |
BLOCKS_WRITE_SETTING |
static Setting<java.lang.String> |
ON_CONFLICT_SETTING |
static ClusterBlock |
TRIBE_METADATA_BLOCK |
static Setting<java.lang.String> |
TRIBE_NAME_SETTING |
static java.util.Set<java.lang.String> |
TRIBE_SETTING_KEYS |
static ClusterBlock |
TRIBE_WRITE_BLOCK |
lifecycle
deprecationLogger, logger, settings
Constructor and Description |
---|
TribeService(Settings settings,
ClusterService clusterService,
java.lang.String tribeNodeId,
NamedWriteableRegistry namedWriteableRegistry,
java.util.function.Function<Settings,Node> clientNodeBuilder) |
Modifier and Type | Method and Description |
---|---|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
static Settings |
processSettings(Settings settings) |
void |
startNodes() |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
logDeprecatedSetting, logRemovedSetting, nodeName
public static final ClusterBlock TRIBE_METADATA_BLOCK
public static final ClusterBlock TRIBE_WRITE_BLOCK
public static final Setting<java.lang.String> TRIBE_NAME_SETTING
public static final Setting<java.lang.String> ON_CONFLICT_SETTING
public static final Setting<java.lang.Boolean> BLOCKS_METADATA_SETTING
public static final Setting<java.lang.Boolean> BLOCKS_WRITE_SETTING
public static final Setting<java.util.List<java.lang.String>> BLOCKS_WRITE_INDICES_SETTING
public static final Setting<java.util.List<java.lang.String>> BLOCKS_READ_INDICES_SETTING
public static final Setting<java.util.List<java.lang.String>> BLOCKS_METADATA_INDICES_SETTING
public static final java.util.Set<java.lang.String> TRIBE_SETTING_KEYS
public TribeService(Settings settings, ClusterService clusterService, java.lang.String tribeNodeId, NamedWriteableRegistry namedWriteableRegistry, java.util.function.Function<Settings,Node> clientNodeBuilder)
protected void doStart()
doStart
in class AbstractLifecycleComponent
public void startNodes()
protected void doStop()
doStop
in class AbstractLifecycleComponent
protected void doClose()
doClose
in class AbstractLifecycleComponent