Class Emulator

java.lang.Object
com.google.cloud.bigtable.emulator.v2.Emulator

@BetaApi("Surface for Bigtable emulator is not yet stable") public class Emulator extends Object
Wraps the Bigtable emulator in a java api and decorates it with grpc channel builders.

This class will use the golang binaries embedded in this jar to launch the emulator as an external process and redirect its output to a Logger.

  • Method Details

    • createFromPath

      public static Emulator createFromPath(Path path)
    • createBundled

      public static Emulator createBundled() throws IOException
      Create a new instance of emulator. The emulator will use the bundled binaries in this jar. Please note that the emulator is created in a stopped state, please use start() after creating it.
      Throws:
      IOException
    • start

      public void start() throws IOException, TimeoutException, InterruptedException
      Starts the emulator process and waits for it to be ready.
      Throws:
      IOException
      TimeoutException
      InterruptedException
    • stop

      public void stop()
      Stops the emulator process.
    • getPort

      public int getPort()
    • getDataChannel

      public io.grpc.ManagedChannel getDataChannel()
    • getAdminChannel

      public io.grpc.ManagedChannel getAdminChannel()