org.apache.solr.cloud

## Class Overseer

- java.lang.Object
- - org.apache.solr.cloud.Overseer

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class Overseer
      extends Object
      implements Closeable

  Cluster leader. Responsible for processing state updates, node assignments, creating/deleting collections, shards, replicas and setting various properties.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Overseer.FailedOp`
    `static class` | `Overseer.Stat`
    `static class` | `Overseer.Stats` Used to hold statistics about overseer operations.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `NUM_RESPONSES_TO_STORE`
    `static String` | `QUEUE_OPERATION`
    `static int` | `STATE_UPDATE_DELAY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Overseer(ShardHandler shardHandler, UpdateShardHandler updateShardHandler, String adminPath, ZkStateReader reader, ZkController zkController, CloudConfig config)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `static DistributedQueue` | `getStateUpdateQueue(SolrZkClient zkClient)` Get queue that can be used to send messages to Overseer.
    `Overseer.Stats` | `getStats()`
    `org.apache.solr.cloud.Overseer.OverseerThread` | `getUpdaterThread()` For tests.
    `ZkStateReader` | `getZkStateReader()`
    `static boolean` | `isLegacy(ZkStateReader stateReader)`
    `void` | `start(String id)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### QUEUE_OPERATION

          public static final String QUEUE_OPERATION

      See Also:
        Constant Field Values

    - #### STATE_UPDATE_DELAY

          public static final int STATE_UPDATE_DELAY

      See Also:
        Constant Field Values

    - #### NUM_RESPONSES_TO_STORE

          public static final int NUM_RESPONSES_TO_STORE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Overseer

          public Overseer(ShardHandler shardHandler,
                          UpdateShardHandler updateShardHandler,
                          String adminPath,
                          ZkStateReader reader,
                          ZkController zkController,
                          CloudConfig config)
                   throws org.apache.zookeeper.KeeperException,
                          InterruptedException

      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

  - ### Method Detail

    - #### start

          public void start(String id)

    - #### getStats

          public Overseer.Stats getStats()

    - #### getUpdaterThread

          public org.apache.solr.cloud.Overseer.OverseerThread getUpdaterThread()

      For tests.
      Returns:
        state updater thread
      NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

    - #### close

          public void close()

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`

    - #### getStateUpdateQueue

          public static DistributedQueue getStateUpdateQueue(SolrZkClient zkClient)

      Get queue that can be used to send messages to Overseer.

      Any and all modifications to the cluster state must be sent to the overseer via this queue. The complete list of overseer actions supported by this queue are documented inside the `OverseerAction` enum.

      Performance statistics on the returned queue are not tracked by the Overseer Stats API, see `CollectionParams.CollectionAction.OVERSEERSTATUS`. Therefore, this method should be used only by clients for writing to the overseer queue.

      This method will create the /overseer znode in ZooKeeper if it does not exist already.

      Parameters:
        `zkClient` - the `SolrZkClient` to be used for reading/writing to the queue
      Returns:
        a `DistributedQueue` object

    - #### isLegacy

          public static boolean isLegacy(ZkStateReader stateReader)

    - #### getZkStateReader

          public ZkStateReader getZkStateReader()

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.