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");
}