org.apache.mesos.state
Class ZooKeeperState

java.lang.Object
  extended by org.apache.mesos.state.AbstractState
      extended by org.apache.mesos.state.ZooKeeperState
All Implemented Interfaces:
State

public class ZooKeeperState
extends AbstractState

Implementation of State that uses ZooKeeper to store variables/values. Note that this means the values associated with variables can not be more than 1 MB (actually slightly less since we store some bookkeeping information).


Constructor Summary
ZooKeeperState(String servers, long timeout, TimeUnit unit, String znode)
          Constructs a new instance of ZooKeeperState.
ZooKeeperState(String servers, long timeout, TimeUnit unit, String znode, String scheme, byte[] credentials)
          Constructs a new instance of ZooKeeperState.
 
Method Summary
protected  void initialize(String servers, long timeout, TimeUnit unit, String znode)
           
protected  void initialize(String servers, long timeout, TimeUnit unit, String znode, String scheme, byte[] credentials)
           
 
Methods inherited from class org.apache.mesos.state.AbstractState
expunge, fetch, finalize, names, store
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooKeeperState

public ZooKeeperState(String servers,
                      long timeout,
                      TimeUnit unit,
                      String znode)
Constructs a new instance of ZooKeeperState.

Parameters:
servers - List of ZooKeeper servers, e.g., 'ip1:port1,ip2:port2'.
timeout - ZooKeeper session timeout.
unit - Unit for session timeout.
znode - Path to znode where "state" should be rooted.

ZooKeeperState

public ZooKeeperState(String servers,
                      long timeout,
                      TimeUnit unit,
                      String znode,
                      String scheme,
                      byte[] credentials)
Constructs a new instance of ZooKeeperState.

Parameters:
servers - List of ZooKeeper servers (e.g., 'ip1:port1,ip2:port2').
timeout - ZooKeeper session timeout.
unit - Unit for session timeout.
znode - Path to znode where "state" should be rooted.
scheme - Authentication scheme (e.g., "digest").
scheme - Authentication credentials (e.g., "user:pass").
Method Detail

initialize

protected void initialize(String servers,
                          long timeout,
                          TimeUnit unit,
                          String znode)

initialize

protected void initialize(String servers,
                          long timeout,
                          TimeUnit unit,
                          String znode,
                          String scheme,
                          byte[] credentials)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.