public abstract class RemoteClusterAware extends AbstractComponent
Modifier and Type | Field and Description |
---|---|
protected ClusterNameExpressionResolver |
clusterNameResolver |
static java.lang.String |
LOCAL_CLUSTER_GROUP_KEY |
static char |
REMOTE_CLUSTER_INDEX_SEPARATOR |
static Setting.AffixSetting<java.util.List<java.net.InetSocketAddress>> |
REMOTE_CLUSTERS_SEEDS
A list of initial seed nodes to discover eligible nodes from the remote cluster
|
deprecationLogger, logger, settings
Modifier | Constructor and Description |
---|---|
protected |
RemoteClusterAware(Settings settings)
Creates a new
RemoteClusterAware instance |
Modifier and Type | Method and Description |
---|---|
protected static java.util.Map<java.lang.String,java.util.List<DiscoveryNode>> |
buildRemoteClustersSeeds(Settings settings) |
static java.lang.String |
buildRemoteIndexName(java.lang.String clusterAlias,
java.lang.String indexName) |
protected abstract java.util.Set<java.lang.String> |
getRemoteClusterNames() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
groupClusterIndices(java.lang.String[] requestIndices,
java.util.function.Predicate<java.lang.String> indexExists)
Groups indices per cluster by splitting remote cluster-alias, index-name pairs on
REMOTE_CLUSTER_INDEX_SEPARATOR . |
void |
listenForUpdates(ClusterSettings clusterSettings)
Registers this instance to listen to updates on the cluster settings.
|
protected abstract void |
updateRemoteCluster(java.lang.String clusterAlias,
java.util.List<java.net.InetSocketAddress> addresses)
Subclasses must implement this to receive information about updated cluster aliases.
|
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Setting.AffixSetting<java.util.List<java.net.InetSocketAddress>> REMOTE_CLUSTERS_SEEDS
public static final char REMOTE_CLUSTER_INDEX_SEPARATOR
public static final java.lang.String LOCAL_CLUSTER_GROUP_KEY
protected final ClusterNameExpressionResolver clusterNameResolver
protected RemoteClusterAware(Settings settings)
RemoteClusterAware
instancesettings
- the nodes level settingsprotected static java.util.Map<java.lang.String,java.util.List<DiscoveryNode>> buildRemoteClustersSeeds(Settings settings)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> groupClusterIndices(java.lang.String[] requestIndices, java.util.function.Predicate<java.lang.String> indexExists)
REMOTE_CLUSTER_INDEX_SEPARATOR
. All
indices per cluster are collected as a list in the returned map keyed by the cluster alias. Local indices are grouped under
LOCAL_CLUSTER_GROUP_KEY
. The returned map is mutable.requestIndices
- the indices in the search request to filterindexExists
- a predicate that can test if a certain index or alias exists in the local clusterprotected abstract java.util.Set<java.lang.String> getRemoteClusterNames()
protected abstract void updateRemoteCluster(java.lang.String clusterAlias, java.util.List<java.net.InetSocketAddress> addresses)
public void listenForUpdates(ClusterSettings clusterSettings)
public static java.lang.String buildRemoteIndexName(java.lang.String clusterAlias, java.lang.String indexName)