public void toJson(TwillRuntimeSpecification spec, File file) throws IOException { try (Writer writer = Files.newWriter(file, Charsets.UTF_8)) { toJson(spec, writer); } }
public void toJson(TwillRuntimeSpecification spec, File file) throws IOException { try (Writer writer = Files.newWriter(file, Charsets.UTF_8)) { toJson(spec, writer); } }
null, logLevels, maxRetries, configMap, runnableConfigs); TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec, writer); LOG.debug("Done {}", targetFile); return twillRuntimeSpec;
null, logLevels, maxRetries, configMap, runnableConfigs); TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec, writer); LOG.debug("Done {}", targetFile); return twillRuntimeSpec;
TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec));
TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec));
config.get(YarnConfiguration.RM_SCHEDULER_ADDRESS), logLevels, maxRetries, configMap, runnableConfigs); TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec, writer); LOG.debug("Done {}", targetFile); return twillRuntimeSpec;
config.get(YarnConfiguration.RM_SCHEDULER_ADDRESS), logLevels, maxRetries, configMap, runnableConfigs); TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec, writer); LOG.debug("Done {}", targetFile); return twillRuntimeSpec;
@Override protected void doStart() throws Exception { LOG.info("Start application master with spec: {}", TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec)); // initialize the event handler, if it fails, it will fail the application. eventHandler.initialize(new BasicEventHandlerContext(twillRuntimeSpec)); // call event handler started. eventHandler.started(); instanceChangeExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("instanceChanger")); // Creates ZK path for runnable. It's ok if the path already exists. // That's for the case when the AM get killed and restarted ZKOperations.ignoreError( zkClient.create("/" + runId.getId() + "/runnables", null, CreateMode.PERSISTENT), KeeperException.NodeExistsException.class, null) .get(); runningContainers.addWatcher(Constants.DISCOVERY_PATH_PREFIX); runnableContainerRequests = initContainerRequests(); }
@Override protected void doStart() throws Exception { LOG.info("Start application master with spec: {}", TwillRuntimeSpecificationAdapter.create().toJson(twillRuntimeSpec)); // initialize the event handler, if it fails, it will fail the application. eventHandler.initialize(new BasicEventHandlerContext(twillRuntimeSpec)); // call event handler started. eventHandler.started(); instanceChangeExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("instanceChanger")); // Creates ZK path for runnable. It's ok if the path already exists. // That's for the case when the AM get killed and restarted ZKOperations.ignoreError( zkClient.create("/" + runId.getId() + "/runnables", null, CreateMode.PERSISTENT), KeeperException.NodeExistsException.class, null) .get(); runningContainers.addWatcher(Constants.DISCOVERY_PATH_PREFIX); runnableContainerRequests = initContainerRequests(); }