QuorumPeerMain (ZooKeeper 3.4.6 API)
Date: 2014-02-20

org.apache.zookeeper.server.quorum

## Class QuorumPeerMain

- java.lang.Object
- - org.apache.zookeeper.server.quorum.QuorumPeerMain

-     public class QuorumPeerMain
      extends Object

  ## Configuration file

  When the main() method of this class is used to start the program, the first argument is used as a path to the config file, which will be used to obtain configuration information. This file is a Properties file, so keys and values are separated by equals (=) and the key/value pairs are separated by new lines. The following is a general summary of keys used in the configuration file. For full details on this see the documentation in docs/index.html
  1. dataDir - The directory where the ZooKeeper data is stored.
  2. dataLogDir - The directory where the ZooKeeper transaction log is stored.
  3. clientPort - The port used to communicate with clients.
  4. tickTime - The duration of a tick in milliseconds. This is the basic unit of time in ZooKeeper.
  5. initLimit - The maximum number of ticks that a follower will wait to initially synchronize with a leader.
  6. syncLimit - The maximum number of ticks that a follower will wait for a message (including heartbeats) from the leader.
  7. server.id - This is the host:port[:port] that the server with the given id will use for the quorum protocol.
  In addition to the config file. There is a file in the data directory called "myid" that contains the server id as an ASCII decimal value.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QuorumPeerMain()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] args)` To start the replicated server specify the configuration file name on the command line.
    `void` | `runFromConfig(org.apache.zookeeper.server.quorum.QuorumPeerConfig config)`

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

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

- - ### Constructor Detail

    - #### QuorumPeerMain

          public QuorumPeerMain()

  - ### Method Detail

    - #### main

          public static void main(String[] args)

      To start the replicated server specify the configuration file name on the command line.
      Parameters:
        `args` - path to the configfile

    - #### runFromConfig

          public void runFromConfig(org.apache.zookeeper.server.quorum.QuorumPeerConfig config)
                             throws IOException

      Throws:
        `IOException`

Copyright © 2014 The Apache Software Foundation