Tabnine Logo
DefaultContainerExecutor.getConf
Code IndexAdd Tabnine to your IDE (free)

How to use
getConf
method
in
org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor

Best Java code snippets using org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.getConf (Showing top 12 results out of 315)

origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

/**
 * Return the default container log directory permissions.
 *
 * @return the default container log directory permissions
 */
@VisibleForTesting
public String getLogDirPermissions() {
 if (this.logDirPermissions==null) {
  this.logDirPermissions = getConf().get(
    YarnConfiguration.NM_DEFAULT_CONTAINER_EXECUTOR_LOG_DIRS_PERMISSIONS,
    YarnConfiguration.NM_DEFAULT_CONTAINER_EXECUTOR_LOG_DIRS_PERMISSIONS_DEFAULT);
 }
 return this.logDirPermissions;
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-nodemanager

protected CommandExecutor buildCommandExecutor(String wrapperScriptPath, 
  String containerIdStr, String user, Path pidFile, Resource resource,
  File wordDir, Map<String, String> environment)
    throws IOException {
 
 String[] command = getRunCommand(wrapperScriptPath,
   containerIdStr, user, pidFile, this.getConf(), resource);
  LOG.info("launchContainer: " + Arrays.toString(command));
  return new ShellCommandExecutor(
    command,
    wordDir,
    environment,
    0L,
    false);
}
origin: ch.cern.hadoop/hadoop-yarn-server-nodemanager

protected CommandExecutor buildCommandExecutor(String wrapperScriptPath, 
  String containerIdStr, String user, Path pidFile, Resource resource,
  File wordDir, Map<String, String> environment)
    throws IOException {
 
 String[] command = getRunCommand(wrapperScriptPath,
   containerIdStr, user, pidFile, this.getConf(), resource);
  LOG.info("launchContainer: " + Arrays.toString(command));
  return new ShellCommandExecutor(
    command,
    wordDir,
    environment,
    0L,
    false);
}
origin: io.hops/hadoop-yarn-server-nodemanager

protected CommandExecutor buildCommandExecutor(String wrapperScriptPath, 
  String containerIdStr, String user, Path pidFile, Resource resource,
  File wordDir, Map<String, String> environment)
    throws IOException {
 
 String[] command = getRunCommand(wrapperScriptPath,
   containerIdStr, user, pidFile, this.getConf(), resource);
  LOG.info("launchContainer: " + Arrays.toString(command));
  return new ShellCommandExecutor(
    command,
    wordDir,
    environment,
    0L,
    false);
}
origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

/**
 * Create a new {@link ShellCommandExecutor} using the parameters.
 *
 * @param wrapperScriptPath the path to the script to execute
 * @param containerIdStr the container ID
 * @param user the application owner's username
 * @param pidFile the path to the container's PID file
 * @param resource this parameter controls memory and CPU limits.
 * @param workDir If not-null, specifies the directory which should be set
 * as the current working directory for the command. If null,
 * the current working directory is not modified.
 * @param environment the container environment
 * @return the new {@link ShellCommandExecutor}
 * @see ShellCommandExecutor
 */
protected CommandExecutor buildCommandExecutor(String wrapperScriptPath, 
  String containerIdStr, String user, Path pidFile, Resource resource,
  File workDir, Map<String, String> environment) {
 
 String[] command = getRunCommand(wrapperScriptPath,
   containerIdStr, user, pidFile, this.getConf(), resource);
  LOG.info("launchContainer: " + Arrays.toString(command));
  return new ShellCommandExecutor(
    command,
    workDir,
    environment,
    0L,
    false);
}
origin: io.hops/hadoop-yarn-server-nodemanager

@Private
@VisibleForTesting
protected ContainerLocalizer createContainerLocalizer(String user,
  String appId, String locId, List<String> localDirs,
  FileContext localizerFc, String userFolder) throws IOException {
 ContainerLocalizer localizer =
   new ContainerLocalizer(localizerFc, user, appId, locId,
     getPaths(localDirs),
     RecordFactoryProvider.getRecordFactory(getConf()), userFolder);
 return localizer;
}
origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

/**
 * Create a new {@link ContainerLocalizer} instance.
 *
 * @param user the user who owns the job for which the localization is being
 * run
 * @param appId the ID of the application for which the localization is being
 * run
 * @param locId the ID of the container for which the localization is being
 * run
 * @param localDirs a list of directories to use as destinations for the
 * localization
 * @param localizerFc the {@link FileContext} to use when localizing files
 * @return the new {@link ContainerLocalizer} instance
 * @throws IOException if {@code user} or {@code locId} is {@code null} or if
 * the container localizer has an initialization failure
 */
@Private
@VisibleForTesting
protected ContainerLocalizer createContainerLocalizer(String user,
  String appId, String locId, List<String> localDirs,
  FileContext localizerFc) throws IOException {
 ContainerLocalizer localizer =
   new ContainerLocalizer(localizerFc, user, appId, locId,
     getPaths(localDirs),
     RecordFactoryProvider.getRecordFactory(getConf()));
 return localizer;
}
origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

localDirs, super.getConf());
origin: ch.cern.hadoop/hadoop-yarn-server-nodemanager

@Override
public void startLocalizer(Path nmPrivateContainerTokensPath,
  InetSocketAddress nmAddr, String user, String appId, String locId,
  LocalDirsHandlerService dirsHandler)
  throws IOException, InterruptedException {
 List<String> localDirs = dirsHandler.getLocalDirs();
 List<String> logDirs = dirsHandler.getLogDirs();
 
 createUserLocalDirs(localDirs, user);
 createUserCacheDirs(localDirs, user);
 createAppDirs(localDirs, user, appId);
 createAppLogDirs(appId, logDirs, user);
 // randomly choose the local directory
 Path appStorageDir = getWorkingDir(localDirs, user, appId);
 String tokenFn = String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT, locId);
 Path tokenDst = new Path(appStorageDir, tokenFn);
 copyFile(nmPrivateContainerTokensPath, tokenDst, user);
 LOG.info("Copying from " + nmPrivateContainerTokensPath + " to " + tokenDst);
 FileContext localizerFc = FileContext.getFileContext(
   lfs.getDefaultFileSystem(), getConf());
 localizerFc.setUMask(lfs.getUMask());
 localizerFc.setWorkingDirectory(appStorageDir);
 LOG.info("Localizer CWD set to " + appStorageDir + " = " 
   + localizerFc.getWorkingDirectory());
 ContainerLocalizer localizer =
   new ContainerLocalizer(localizerFc, user, appId, locId, 
     getPaths(localDirs), RecordFactoryProvider.getRecordFactory(getConf()));
 // TODO: DO it over RPC for maintaining similarity?
 localizer.runLocalization(nmAddr);
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-nodemanager

@Override
public void startLocalizer(Path nmPrivateContainerTokensPath,
  InetSocketAddress nmAddr, String user, String appId, String locId,
  LocalDirsHandlerService dirsHandler)
  throws IOException, InterruptedException {
 List<String> localDirs = dirsHandler.getLocalDirs();
 List<String> logDirs = dirsHandler.getLogDirs();
 
 createUserLocalDirs(localDirs, user);
 createUserCacheDirs(localDirs, user);
 createAppDirs(localDirs, user, appId);
 createAppLogDirs(appId, logDirs, user);
 // randomly choose the local directory
 Path appStorageDir = getWorkingDir(localDirs, user, appId);
 String tokenFn = String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT, locId);
 Path tokenDst = new Path(appStorageDir, tokenFn);
 copyFile(nmPrivateContainerTokensPath, tokenDst, user);
 LOG.info("Copying from " + nmPrivateContainerTokensPath + " to " + tokenDst);
 FileContext localizerFc = FileContext.getFileContext(
   lfs.getDefaultFileSystem(), getConf());
 localizerFc.setUMask(lfs.getUMask());
 localizerFc.setWorkingDirectory(appStorageDir);
 LOG.info("Localizer CWD set to " + appStorageDir + " = " 
   + localizerFc.getWorkingDirectory());
 ContainerLocalizer localizer =
   new ContainerLocalizer(localizerFc, user, appId, locId, 
     getPaths(localDirs), RecordFactoryProvider.getRecordFactory(getConf()));
 // TODO: DO it over RPC for maintaining similarity?
 localizer.runLocalization(nmAddr);
}
origin: org.apache.hadoop/hadoop-yarn-server-nodemanager

  FileContext.getFileContext(lfs.getDefaultFileSystem(), getConf());
localizerFc.setUMask(lfs.getUMask());
localizerFc.setWorkingDirectory(appStorageDir);
origin: io.hops/hadoop-yarn-server-nodemanager

  lfs.getDefaultFileSystem(), getConf());
localizerFc.setUMask(lfs.getUMask());
localizerFc.setWorkingDirectory(appStorageDir);
org.apache.hadoop.yarn.server.nodemanagerDefaultContainerExecutorgetConf

Popular methods of DefaultContainerExecutor

  • buildCommandExecutor
    Create a new ShellCommandExecutor using the parameters.
  • containerIsAlive
    Returns true if the process with the specified pid is alive.
  • copyFile
    Copy a file using the #lfs FileContext.
  • createAppDirs
    Initialize the local directories for a particular user. * $local.dir/usercache/$user/appcache/$a
  • createAppLogDirs
    Create application log directories on all disks.
  • createContainerLogDirs
    Create application log directories on all disks.
  • createDir
    Use the #lfs FileContext to create the target directory.
  • createUserCacheDirs
    Initialize the local cache directories for a particular user. * $local.dir/usercache/$user *
  • createUserLocalDirs
    Initialize the local directories for a particular user. * * $local.dir/usercache/$user
  • getAppcacheDir
  • getApplicationDir
  • getDiskFreeSpace
  • getApplicationDir,
  • getDiskFreeSpace,
  • getFileCacheDir,
  • getLocalWrapperScriptBuilder,
  • getPaths,
  • getPidFilePath,
  • getRunCommand,
  • getUserCacheDir,
  • getWorkingDir

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BoxLayout (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now