public class InternalClusterInfoService extends AbstractComponent implements ClusterInfoService, LocalNodeMasterListener, ClusterStateListener
cluster.info.update.interval setting (defaulting
to 30 seconds). The InternalClusterInfoService only runs on the master node.
Listens for changes in the number of data nodes and immediately submits a
ClusterInfoUpdateJob if a node has been added.
Every time the timer runs, gathers information about the disk usage and
shard sizes across the cluster.| 修飾子とタイプ | クラスと説明 |
|---|---|
class |
InternalClusterInfoService.SubmitReschedulingClusterInfoUpdatedJob
Class used to submit
maybeRefresh() on the
InternalClusterInfoService threadpool, these jobs will
reschedule themselves by placing a new instance of this class onto the
scheduled threadpool. |
ClusterInfoService.Listener| 修飾子とタイプ | フィールドと説明 |
|---|---|
static String |
INTERNAL_CLUSTER_INFO_TIMEOUT |
static String |
INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL |
deprecationLogger, logger, settings| コンストラクタと説明 |
|---|
InternalClusterInfoService(Settings settings,
NodeSettingsService nodeSettingsService,
TransportNodesStatsAction transportNodesStatsAction,
TransportIndicesStatsAction transportIndicesStatsAction,
ClusterService clusterService,
ThreadPool threadPool) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addListener(ClusterInfoService.Listener listener)
Add a listener that will be called every time new information is gathered
|
void |
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.
|
String |
executorName()
The name of the executor that the implementation of the callbacks of this lister should be executed on.
|
ClusterInfo |
getClusterInfo()
The latest cluster information
|
void |
offMaster()
Called when the local node used to be the master, a new master was elected and it's no longer the local node.
|
void |
onMaster()
Called when local node is elected to be the master
|
ClusterInfo |
refresh()
Refreshes the ClusterInfo in a blocking fashion
|
protected CountDownLatch |
updateIndicesStats(ActionListener<IndicesStatsResponse> listener)
Retrieve the latest indices stats, calling the listener when complete
|
protected CountDownLatch |
updateNodeStats(ActionListener<NodesStatsResponse> listener)
Retrieve the latest nodes stats, calling the listener when complete
|
logDeprecatedSetting, logRemovedSetting, nodeNamepublic static final String INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL
@Inject public InternalClusterInfoService(Settings settings, NodeSettingsService nodeSettingsService, TransportNodesStatsAction transportNodesStatsAction, TransportIndicesStatsAction transportIndicesStatsAction, ClusterService clusterService, ThreadPool threadPool)
public void onMaster()
LocalNodeMasterListeneronMaster インタフェース内 LocalNodeMasterListenerpublic void offMaster()
LocalNodeMasterListeneroffMaster インタフェース内 LocalNodeMasterListenerpublic String executorName()
LocalNodeMasterListenerSAME
(indicating that the callbaks will run on the same thread as the cluster state events are fired with). On the other hand,
if the logic in the callbacks are heavier and take longer to process (or perhaps involve blocking due to IO operations),
prefer to execute them on a separte more appropriate executor (eg. GENERIC
or MANAGEMENT).executorName インタフェース内 LocalNodeMasterListenerpublic void clusterChanged(ClusterChangedEvent event)
ClusterStateListenerclusterChanged インタフェース内 ClusterStateListenerpublic ClusterInfo getClusterInfo()
ClusterInfoServicegetClusterInfo インタフェース内 ClusterInfoServicepublic void addListener(ClusterInfoService.Listener listener)
ClusterInfoServiceaddListener インタフェース内 ClusterInfoServiceprotected CountDownLatch updateNodeStats(ActionListener<NodesStatsResponse> listener)
protected CountDownLatch updateIndicesStats(ActionListener<IndicesStatsResponse> listener)
public final ClusterInfo refresh()
Copyright © 2009–2016. All rights reserved.