Configuration conf = super.getConf(); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();
public void mountCgroups(List<String> cgroupKVs, String hierarchy) throws IOException { try { PrivilegedOperation mountCGroupsOp = new PrivilegedOperation( PrivilegedOperation.OperationType.MOUNT_CGROUPS, hierarchy); Configuration conf = super.getConf(); mountCGroupsOp.appendArgs(cgroupKVs); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor(); privilegedOperationExecutor.executePrivilegedOperation(mountCGroupsOp, false); } catch (PrivilegedOperationException e) { int exitCode = e.getExitCode(); LOG.warn("Exception in LinuxContainerExecutor mountCgroups ", e); throw new IOException("Problem mounting cgroups " + cgroupKVs + "; exit code = " + exitCode + " and output: " + e.getOutput(), e); } } }
Configuration conf = super.getConf(); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();
PrivilegedOperation.OperationType.CHECK_SETUP); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();
/** * Mount a CGROUPS controller at the requested mount point and create * a hierarchy for the NodeManager to manage. * * @param cgroupKVs a key-value pair of the form * {@code controller=mount-path} * @param hierarchy the top directory of the hierarchy for the NodeManager * @throws IOException if there is a problem mounting the CGROUPS */ public void mountCgroups(List<String> cgroupKVs, String hierarchy) throws IOException { try { PrivilegedOperation mountCGroupsOp = new PrivilegedOperation( PrivilegedOperation.OperationType.MOUNT_CGROUPS, hierarchy); Configuration conf = super.getConf(); mountCGroupsOp.appendArgs(cgroupKVs); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor(); privilegedOperationExecutor.executePrivilegedOperation(mountCGroupsOp, false); } catch (PrivilegedOperationException e) { int exitCode = e.getExitCode(); LOG.warn("Exception in LinuxContainerExecutor mountCgroups ", e); throw new IOException("Problem mounting cgroups " + cgroupKVs + "; exit code = " + exitCode + " and output: " + e.getOutput(), e); } }
PrivilegedOperation.OperationType.CHECK_SETUP); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();
Configuration conf = super.getConf(); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();
Configuration conf = super.getConf(); PrivilegedOperationExecutor privilegedOperationExecutor = getPrivilegedOperationExecutor();