Class InternalClusterInfoService

  • All Implemented Interfaces:
    ClusterInfoService, ClusterStateListener, LocalNodeMasterListener

    public class InternalClusterInfoService
    extends java.lang.Object
    implements ClusterInfoService, LocalNodeMasterListener, ClusterStateListener
    InternalClusterInfoService provides the ClusterInfoService interface, routinely updated on a timer. The timer can be dynamically changed by setting the 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.
    • Field Detail


        public static final Setting<TimeValue> INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL_SETTING

        public static final Setting<TimeValue> INTERNAL_CLUSTER_INFO_TIMEOUT_SETTING
    • Method Detail

      • executorName

        public java.lang.String executorName()
        Description copied from interface: LocalNodeMasterListener
        The name of the executor that the implementation of the callbacks of this lister should be executed on. The thread that is responsible for managing instances of this lister is the same thread handling the cluster state events. If the work done is the callbacks above is inexpensive, this value may be SAME (indicating that the callbacks 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 separate more appropriate executor (eg. GENERIC or MANAGEMENT).
        Specified by:
        executorName in interface LocalNodeMasterListener
        The name of the executor that will run the callbacks of this listener.
      • updateNodeStats

        protected java.util.concurrent.CountDownLatch updateNodeStats​(ActionListener<NodesStatsResponse> listener)
        Retrieve the latest nodes stats, calling the listener when complete
        a latch that can be used to wait for the nodes stats to complete if desired
      • updateIndicesStats

        protected java.util.concurrent.CountDownLatch updateIndicesStats​(ActionListener<IndicesStatsResponse> listener)
        Retrieve the latest indices stats, calling the listener when complete
        a latch that can be used to wait for the indices stats to complete if desired
      • refresh

        public final ClusterInfo refresh()
        Refreshes the ClusterInfo in a blocking fashion