ContainerExecutor implements Configurable { public abstract boolean reapContainer(ContainerReapContext ctx) throws IOException;  @Override void setConf(Configuration conf); @Override Configuration getConf(); abstract void init(Context nmContext); void start(); void stop(); Path localizeClasspathJar(Path jarPath, Path target, String owner); abstract void startLocalizer(LocalizerStartContext ctx); void prepareContainer(ContainerPrepareContext ctx); abstract int launchContainer(ContainerStartContext ctx); abstract int relaunchContainer(ContainerStartContext ctx); abstract boolean signalContainer(ContainerSignalContext ctx); abstract boolean reapContainer(ContainerReapContext ctx); abstract IOStreamPair execContainer(ContainerExecContext ctx); abstract void deleteAsUser(DeletionAsUserContext ctx); abstract void symLink(String target, String symlink); abstract boolean isContainerAlive(ContainerLivenessContext ctx); Map<String, LocalResource> getLocalResources(Container container); abstract void updateYarnSysFS(Context ctx, String user,
      String appId, String spec); int reacquireContainer(ContainerReacquisitionContext ctx); void writeLaunchEnv(OutputStream out, Map<String, String> environment,
      Map<Path, List<String>> resources, List<String> command, Path logDir,
      String user, LinkedHashSet<String> nmVars); @VisibleForTesting void writeLaunchEnv(OutputStream out, Map<String, String> environment,
      Map<Path, List<String>> resources, List<String> command, Path logDir,
      String user, String outFilename, LinkedHashSet<String> nmVars); void activateContainer(ContainerId containerId, Path pidFilePath); String[] getIpAndHost(Container container); static String[] getLocalIpAndHost(Container container); void deactivateContainer(ContainerId containerId); void pauseContainer(Container container); void resumeContainer(Container container); void cleanupBeforeRelaunch(Container container); String getProcessId(ContainerId containerID); String getExposedPorts(Container container); static final String TOKEN_FILE_NAME_FMT; static final FsPermission TASK_LAUNCH_SCRIPT_PERMISSION; static final String DIRECTORY_CONTENTS; }
@Test public void testReapContainer() throws Exception { Container container = mock(Container.class); ContainerReapContext.Builder builder = new ContainerReapContext.Builder(); builder.setContainer(container).setUser("foo"); assertTrue(containerExecutor.reapContainer(builder.build())); }