Class DndScriptExecutor

java.lang.Object
com.illumon.iris.db.tables.remotequery.client.DndScriptExecutor

public class DndScriptExecutor extends Object
Requests DnD worker creation via dispatcher and executes a script on said worker startup. For programmatic access to DnD worker process info id on failure, handle DndScriptExecutor.DndScriptExecutionFailure. Borrows code from DhcInDhe/README.md for remotely starting a DnD worker.
  • Constructor Details

    • DndScriptExecutor

      public DndScriptExecutor()
  • Method Details

    • main

      @Deprecated public static void main(String[] args) throws Exception
      Deprecated.
      Standalone program deprecated b/c it's not robustly tested. API methods are.
      Throws:
      Exception
    • sendRequest

      public static String sendRequest(String host, String workerKind, String scriptLanguage, String startupScript, int requestTimeout, int maxHeapSizeMb) throws IOException
      See DndScriptExecutor description.
      Parameters:
      host - dispatcher host to request worker from
      workerKind - name of desired WorkerKind
      scriptLanguage - language to execute startupScript
      startupScript - string of startup script to execute
      requestTimeout - timeout for dispatcher request in ms
      maxHeapSizeMb - max heap size for requested worker in mb
      Returns:
      process info id of requested DnD worker
      Throws:
      IOException - on dispatcher connection failure
    • sendRequest

      public static String sendRequest(String host, String workerKind, String scriptLanguage, File file, int requestTimeout, int maxHeapSizeMb) throws IOException
      Throws:
      IOException