@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, ApplicationMasterMain.class, TwillContainerMain.class, OptionSpec.class); } });
/** * Returns the reserved non-heap memory size in MB for the application master. */ public int getAMReservedMemory() { return getReservedMemory(config, Configs.Keys.YARN_AM_RESERVED_MEMORY_MB, Configs.Defaults.YARN_AM_RESERVED_MEMORY_MB); }
/** * Returns the path prefix for creating sequential message node for the remote service. */ private String getMessagePrefix() { return getZKPath("messages/msg"); }
@Override public RunId apply(String input) { return RunIds.fromString(input); } };
@Override protected final void startUp() { doStartUp(); // Watch for instance node existence. actOnExists(getInstancePath(), new Runnable() { @Override public void run() { watchInstanceNode(); } }); }
/** * Returns the minimum heap ratio for the application master. */ public double getAMMinHeapRatio() { return getMinHeapRatio(config, Configs.Defaults.HEAP_RESERVED_MIN_RATIO); }
@Override public void onSuccess(NodeData result) { if (shouldProcessZKEvent()) { instanceNodeUpdated(result); } }
@Override public void run() { watchInstanceNode(); } });
/** * Stops and frees any currently allocated resources. */ public void stop() { elections.shutdown(); } }
@Override protected Executor executor(State state) { return AbstractExecutionServiceController.this.executor(state); } }
/** * Returns true if ZK events needs to be processed. */ private boolean shouldProcessZKEvent() { State state = state(); return (state == State.NEW || state == State.STARTING || state == State.RUNNING); }
@Override public void onRunning(final Runnable runnable, Executor executor) { addListener(new ServiceListenerAdapter() { @Override public void running() { runnable.run(); } }, executor); }
@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, classes); } });
@Override public RunId apply(String input) { return RunIds.fromString(input); } };
/** * Returns the reserved non-heap memory size in MB for the application master. */ public int getAMReservedMemory() { return getReservedMemory(config, Configs.Keys.YARN_AM_RESERVED_MEMORY_MB, Configs.Defaults.YARN_AM_RESERVED_MEMORY_MB); }
@Override public void onSuccess(NodeData result) { if (shouldProcessZKEvent()) { instanceNodeUpdated(result); } }
@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, ApplicationMasterMain.class, TwillContainerMain.class, OptionSpec.class); } });
@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, classes); } });
@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, classes); } });
@Override public void load(String name, Location targetLocation) throws IOException { bundler.createBundle(targetLocation, classes); } });