use of com.hubspot.singularity.executor.task.LocalDownloadServiceFetcher in project Singularity by HubSpot.
the class SingularityExecutorRunner method main.
public static void main(String... args) {
final long start = System.currentTimeMillis();
try {
final Injector injector = Guice.createInjector(Stage.PRODUCTION, new SingularityRunnerBaseModule(SingularityExecutorConfiguration.class, ImmutableSet.<Class<? extends BaseRunnerConfiguration>>of(SingularityS3Configuration.class)), new SingularityExecutorModule());
final SingularityExecutorRunner executorRunner = injector.getInstance(SingularityExecutorRunner.class);
final LocalDownloadServiceFetcher downloadServiceFetcher = injector.getInstance(LocalDownloadServiceFetcher.class);
downloadServiceFetcher.start();
final Protos.Status driverStatus = executorRunner.run();
LOG.info("Executor finished after {} with status: {}", JavaUtils.duration(start), driverStatus);
downloadServiceFetcher.stop();
stopLog();
System.exit(driverStatus == Protos.Status.DRIVER_STOPPED ? 0 : 1);
} catch (Throwable t) {
LOG.error("Finished after {} with error", JavaUtils.duration(start), t);
stopLog();
System.exit(1);
}
}
Aggregations