Class TransformServiceLauncher


  • public class TransformServiceLauncher
    extends java.lang.Object
    A utility that can be used to manage a Beam Transform Service.

    Can be either used programatically or as an executable jar.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TransformServiceLauncher forProject​(@Nullable java.lang.String projectName, int port, @Nullable java.lang.String pythonRequirementsFile)
      Initializes a client for managing transform service instances.
      static void main​(java.lang.String[] args)  
      void setBeamVersion​(java.lang.String beamVersion)
      Specifies the Beam version to get containers for the transform service.
      void shutdown()  
      void start()  
      void status()  
      void waitTillUp​(int timeout)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setBeamVersion

        public void setBeamVersion​(java.lang.String beamVersion)
        Specifies the Beam version to get containers for the transform service.

        Could be a release Beam version with containers in Docker Hub or an unreleased Beam version for which containers are available locally.

        Parameters:
        beamVersion - a Beam version to get containers from.
      • forProject

        public static TransformServiceLauncher forProject​(@Nullable java.lang.String projectName,
                                                          int port,
                                                          @Nullable java.lang.String pythonRequirementsFile)
                                                   throws java.io.IOException
        Initializes a client for managing transform service instances.
        Parameters:
        projectName - project name for the transform service.
        port - port exposed by the transform service.
        pythonRequirementsFile - a requirements file with extra dependencies for the Python expansion services.
        Returns:
        an initialized client for managing the transform service.
        Throws:
        java.io.IOException
      • start

        public void start()
                   throws java.io.IOException,
                          java.util.concurrent.TimeoutException
        Throws:
        java.io.IOException
        java.util.concurrent.TimeoutException
      • shutdown

        public void shutdown()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • status

        public void status()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • waitTillUp

        public void waitTillUp​(int timeout)
                        throws java.io.IOException,
                               java.util.concurrent.TimeoutException
        Throws:
        java.io.IOException
        java.util.concurrent.TimeoutException
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                java.util.concurrent.TimeoutException
        Throws:
        java.io.IOException
        java.util.concurrent.TimeoutException