This project has retired. For details please refer to its Attic page.
Log
JavaScript is disabled on your browser.
Skip navigation links
org.apache.mesos

Class Log



  • public class Log
    extends java.lang.Object
    Provides access to a distributed append only log. The log can be read from using a Log.Reader and written to using a Log.Writer.

    Both the Reader and Writer will require a quorum which defines the ratio of active Mesos Masters that need to be available for a successful read or write. The quorum will be satisfied when the number of active Masters is greater than the given number:

    
     Quorum > (Number of Masters)/2
     

    If a read or write is executed the operation will wait until their is quorum to succeed.

    • Nested Class Summary

      Nested Classes
      Modifier and Type Class and Description
      static class Log.Entry
      Represents an opaque data entry in the Log with a Log.Position.
      static class Log.OperationFailedException
      An exception that gets thrown when an error occurs while performing a read or write operation.
      static class Log.Position
      An opaque identifier of a log entry's position within the log.
      static class Log.Reader
      Provides read access to the Log.
      static class Log.Writer
      Provides write access to the Log.
      static class Log.WriterFailedException
      An exception that gets thrown when a writer no longer has the ability to perform operations (e.g., because it was superseded by another writer).
    • Constructor Summary

      Constructors
      Constructor and Description
      Log (int quorum, java.lang.String path, java.util.Set<java.lang.String> pids)
      Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas via the set of process PIDs.
      Log (int quorum, java.lang.String path, java.lang.String servers, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String znode)
      Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas associated with the specified ZooKeeper servers, timeout, and znode (or Zookeeper name space).
      Log (int quorum, java.lang.String path, java.lang.String servers, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String znode, java.lang.String scheme, byte[] credentials)
      Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas associated with the specified ZooKeeper servers, timeout, and znode (or Zookeeper name space).
    • Method Summary

      All Methods
      Modifier and Type Method and Description
      protected void finalize ()
      protected void initialize (int quorum, java.lang.String path, java.util.Set<java.lang.String> pids)
      protected void initialize (int quorum, java.lang.String path, java.lang.String servers, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String znode)
      protected void initialize (int quorum, java.lang.String path, java.lang.String servers, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String znode, java.lang.String scheme, byte[] credentials)
      Log.Position position (byte[] identity)
      Returns a position based off of the bytes recovered from Position.identity().
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Log

        public Log(int quorum,
         java.lang.String path,
         java.util.Set<java.lang.String> pids)
        Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas via the set of process PIDs.
        Parameters:
        quorum - The quorum size.
        path - Path to the file backing this log.
        pids - PIDs of the replicas to coordinate with.
      • Log

        public Log(int quorum,
         java.lang.String path,
         java.lang.String servers,
         long timeout,
         java.util.concurrent.TimeUnit unit,
         java.lang.String znode)
        Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas associated with the specified ZooKeeper servers, timeout, and znode (or Zookeeper name space).
        Parameters:
        quorum - The quorum size.
        path - Path to the file backing this log.
        servers - List of ZooKeeper servers (e.g., 'ip1:port1,ip2:port2').
        timeout - Max number of time units to wait before a TimeoutException.
        unit - Type of time units used for the timeout, e.g. seconds, minutes, etc.
        znode - Path to znode where "state" should be rooted.
      • Log

        public Log(int quorum,
         java.lang.String path,
         java.lang.String servers,
         long timeout,
         java.util.concurrent.TimeUnit unit,
         java.lang.String znode,
         java.lang.String scheme,
         byte[] credentials)
        Creates a new replicated log that assumes the specified quorum size, is backed by a file at the specified path, and coordiantes with other replicas associated with the specified ZooKeeper servers, timeout, and znode (or Zookeeper name space).
        Parameters:
        quorum - The quorum size.
        path - Path to the file backing this log.
        servers - Zookeper servers/connection string.
        timeout - Max number of time units to wait before a TimeoutException.
        unit - Type of time units used for the timeout, e.g. seconds, minutes, etc.
        znode - The Zookeeper name space.
        scheme - Authentication scheme (e.g., "digest").
        credentials - Authentication credentials (e.g., "user:pass").
    • Method Detail

      • position

        public Log.Position position(byte[] identity)
        Returns a position based off of the bytes recovered from Position.identity().
        Parameters:
        identity - Identity, in bytes, of the position.
        Returns:
        The position.
      • initialize

        protected void initialize(int quorum,
         java.lang.String path,
         java.util.Set<java.lang.String> pids)
      • initialize

        protected void initialize(int quorum,
         java.lang.String path,
         java.lang.String servers,
         long timeout,
         java.util.concurrent.TimeUnit unit,
         java.lang.String znode)
      • initialize

        protected void initialize(int quorum,
         java.lang.String path,
         java.lang.String servers,
         long timeout,
         java.util.concurrent.TimeUnit unit,
         java.lang.String znode,
         java.lang.String scheme,
         byte[] credentials)
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /