Class

com.datastax.spark.connector.embedded

EmbeddedZookeeper

Related Doc: package embedded

Permalink

class EmbeddedZookeeper extends Embedded

Implements a simple standalone ZooKeeperServer. To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.

Session establishment is asynchronous. This constructor will initiate connection to the server and return immediately - potentially (usually) before the session is fully established. The watcher argument specifies the watcher that will be notified of any changes in state. This notification can come at any point before or after the constructor call has returned.

The instantiated ZooKeeper client object will pick an arbitrary server from the connectString and attempt to connect to it. If establishment of the connection fails, another server in the connect string will be tried (the order is non-deterministic, as we random shuffle the list), until a connection is established. The client will continue attempts until the session is explicitly closed.

Linear Supertypes
Embedded, Assertions, Serializable, Serializable, EmbeddedIO, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EmbeddedZookeeper
  2. Embedded
  3. Assertions
  4. Serializable
  5. Serializable
  6. EmbeddedIO
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EmbeddedZookeeper(connectString: String = ZookeeperConnectionString)

    Permalink

    connectString

    comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If the optional chroot suffix is used the example would look like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" where the client would be rooted at "/app/a" and all paths would be relative to this root - ie getting/setting/etc... "/foo/bar" would result in operations being run on "/app/a/foo/bar" (from the server perspective). Default: the local IP and default port: 2180.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to any2stringadd[EmbeddedZookeeper] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (EmbeddedZookeeper, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to ArrowAssoc[EmbeddedZookeeper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def awaitCond(p: ⇒ Boolean, max: Duration = 3.seconds, interval: Duration = 100.millis, message: String = ""): Unit

    Permalink

    Await until the given condition evaluates to true or the timeout expires, whichever comes first.

    Await until the given condition evaluates to true or the timeout expires, whichever comes first. If no timeout is given, take it from the innermost enclosing within block.

    Definition Classes
    Assertions
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def closeAfterUse[T, C <: AnyRef { def close(): Unit }](closeable: C)(code: (C) ⇒ T): T

    Permalink

    Automatically closes resource after use.

    Automatically closes resource after use. Handy for closing streams, files, sessions etc. Similar to try-with-resources in Java 7.

    Definition Classes
    EmbeddedIO
  10. val connectString: String

    Permalink

    comma separated host:port pairs, each corresponding to a zk server.

    comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If the optional chroot suffix is used the example would look like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" where the client would be rooted at "/app/a" and all paths would be relative to this root - ie getting/setting/etc... "/foo/bar" would result in operations being run on "/app/a/foo/bar" (from the server perspective). Default: the local IP and default port: 2180.

  11. def copyTextFileWithVariableSubstitution(source: InputStream, target: OutputStream, map: (String) ⇒ String): Unit

    Permalink

    Copies a text file substituting every occurrence of $ {VARIABLE} with a value from the given map

    Copies a text file substituting every occurrence of $ {VARIABLE} with a value from the given map

    Definition Classes
    EmbeddedIO
  12. def createTempDir: File

    Permalink
    Definition Classes
    EmbeddedIO
  13. def deleteRecursively(file: File): Unit

    Permalink
    Definition Classes
    EmbeddedIO
  14. def ensuring(cond: (EmbeddedZookeeper) ⇒ Boolean, msg: ⇒ Any): EmbeddedZookeeper

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (EmbeddedZookeeper) ⇒ Boolean): EmbeddedZookeeper

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): EmbeddedZookeeper

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): EmbeddedZookeeper

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. val factory: NIOServerCnxnFactory

    Permalink
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to StringFormat[EmbeddedZookeeper] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def hasRootAsShutdownDeleteDir(file: File): Boolean

    Permalink
    Definition Classes
    EmbeddedIO
  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. val ip: String

    Permalink
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def isRunning: Boolean

    Permalink
  29. def isSymlink(file: File): Boolean

    Permalink
    Definition Classes
    EmbeddedIO
  30. def listFilesSafely(file: File): Seq[File]

    Permalink
    Definition Classes
    EmbeddedIO
  31. val logDir: File

    Permalink
  32. def mkdir(dir: File): File

    Permalink

    Makes a new directory or throws an IOException if it cannot be made

    Makes a new directory or throws an IOException if it cannot be made

    Definition Classes
    EmbeddedIO
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. def now: FiniteDuration

    Permalink

    Obtain current time (System.nanoTime) as Duration.

    Obtain current time (System.nanoTime) as Duration.

    Definition Classes
    Assertions
  37. val port: Int

    Permalink
  38. def registerShutdownDeleteDir(file: File): Unit

    Permalink
    Definition Classes
    EmbeddedIO
  39. def remainingOr(duration: FiniteDuration): FiniteDuration

    Permalink

    Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.

    Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.

    Definition Classes
    Assertions
  40. def remainingOrDefault: FiniteDuration

    Permalink

    Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.test.single-expect-default").

    Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.test.single-expect-default").

    Definition Classes
    Assertions
  41. val server: ZooKeeperServer

    Permalink
  42. def shutdown(): Unit

    Permalink
  43. val shutdownDeletePaths: HashSet[String]

    Permalink
    Definition Classes
    EmbeddedIO
  44. val snapshotDir: File

    Permalink
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def waitForPortOpen(host: InetAddress, port: Int, timeout: Long): Boolean

    Permalink

    Waits until a port at the given address is open or timeout passes.

    Waits until a port at the given address is open or timeout passes.

    returns

    true if managed to connect to the port, false if timeout happened first

    Definition Classes
    EmbeddedIO
  51. def [B](y: B): (EmbeddedZookeeper, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to ArrowAssoc[EmbeddedZookeeper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Embedded

Inherited from Assertions

Inherited from Serializable

Inherited from Serializable

Inherited from EmbeddedIO

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from EmbeddedZookeeper to any2stringadd[EmbeddedZookeeper]

Inherited by implicit conversion StringFormat from EmbeddedZookeeper to StringFormat[EmbeddedZookeeper]

Inherited by implicit conversion Ensuring from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper]

Inherited by implicit conversion ArrowAssoc from EmbeddedZookeeper to ArrowAssoc[EmbeddedZookeeper]

Ungrouped