com.datastax.spark.connector.embedded

EmbeddedZookeeper

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 any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EmbeddedZookeeper(connectString: String = ...)

    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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

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

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

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

    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
  10. def clone(): AnyRef

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

    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
  12. val connectString: String

    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.

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

    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
  14. def createTempDir: File

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

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

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

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

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

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

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

    Definition Classes
    AnyRef → Any
  22. val factory: NIOServerCnxnFactory

  23. def finalize(): Unit

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

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

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

    Definition Classes
    EmbeddedIO
  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. val ip: String

  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. def isRunning: Boolean

  31. def isSymlink(file: File): Boolean

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

    Definition Classes
    EmbeddedIO
  33. val logDir: File

  34. def mkdir(dir: File): File

    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
  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def now: FiniteDuration

    Obtain current time (System.nanoTime) as Duration.

    Obtain current time (System.nanoTime) as Duration.

    Definition Classes
    Assertions
  39. val port: Int

  40. def registerShutdownDeleteDir(file: File): Unit

    Definition Classes
    EmbeddedIO
  41. def remainingOr(duration: FiniteDuration): FiniteDuration

    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
  42. def remainingOrDefault: FiniteDuration

    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.

    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
  43. val server: ZooKeeperServer

  44. def shutdown(): Unit

  45. val shutdownDeletePaths: HashSet[String]

    Definition Classes
    EmbeddedIO
  46. val snapshotDir: File

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

    Definition Classes
    AnyRef
  48. def toString(): String

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

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

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

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

    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
  53. def [B](y: B): (EmbeddedZookeeper, B)

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

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (embeddedZookeeper: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (embeddedZookeeper: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: EmbeddedZookeeper

    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to ArrowAssoc[EmbeddedZookeeper] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (embeddedZookeeper: ArrowAssoc[EmbeddedZookeeper]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: EmbeddedZookeeper

    Implicit information
    This member is added by an implicit conversion from EmbeddedZookeeper to Ensuring[EmbeddedZookeeper] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (embeddedZookeeper: Ensuring[EmbeddedZookeeper]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

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 StringAdd

Inherited by implicit conversion any2stringfmt from EmbeddedZookeeper to StringFormat

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

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

Ungrouped