Package co.cask.tigon.sql.manager

Examples of co.cask.tigon.sql.manager.ExternalProgramExecutor$RTSGarbageCollector


  public void generateBinaries() throws Exception {
    Location rootTmpDir = Locations.getParent(Locations.getParent(dir));
    Location shell = new LocalLocationFactory(new File("/")).create("/").append("bin").append("sh");

    ExternalProgramExecutor copyGSEXIT = new ExternalProgramExecutor("Copy GSEXIT", dir, shell, "-c",
                                                                     "cp ../../bin/gsexit ./GSEXIT");
    copyGSEXIT.startAndWait();
    LOG.info("Copying GSEXIT: {}", copyGSEXIT);
    Services.getCompletionFuture(copyGSEXIT).get(20, TimeUnit.SECONDS);
    if (copyGSEXIT.getExitCode() != 0) {
      throw new RuntimeException("Stream Engine Binary Failed - GSEXIT copy failed");
    }
    ExternalProgramExecutor executorService = new ExternalProgramExecutor(
      "GENBINS", dir, shell, "-c",
      "../../bin/translate_fta -h localhost -c -S -M -C . packet_schema.txt " + Constants.GSQL_FILE);
    LOG.info("Starting GENBINS : {}", executorService);
    executorService.startAndWait();
    Services.getCompletionFuture(executorService).get(20, TimeUnit.SECONDS);
    if (executorService.getExitCode() != 0) {
      throw new RuntimeException("Stream Engine Binary BUILD Failed");
    }
    ExternalProgramExecutor makeService = new ExternalProgramExecutor(
      "GENBINS", dir, shell, "-c", "make");
    LOG.info("Starting MAKE : {}", executorService);
    makeService.startAndWait();
    Services.getCompletionFuture(makeService).get(20, TimeUnit.SECONDS);
    if (makeService.getExitCode() != 0) {
      throw new RuntimeException("Stream Engine Binary MAKE Failed");
    }
  }
View Full Code Here

TOP

Related Classes of co.cask.tigon.sql.manager.ExternalProgramExecutor$RTSGarbageCollector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.