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

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

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

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: 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: org.apache.hadoop/hadoop-yarn-server-nodemanager

createAppDirs(localDirs, user, appId);
createAppLogDirs(appId, logDirs, user);
origin: io.hops/hadoop-yarn-server-nodemanager

createAppDirs(localDirs, user, appId, userFolder);
createAppLogDirs(appId, logDirs, user, userFolder);
org.apache.hadoop.yarn.server.nodemanagerDefaultContainerExecutorcreateAppDirs

Javadoc

Initialize the local directories for a particular user.
  • $local.dir/usercache/$user/appcache/$appid

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.
  • 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
  • getConf
  • getDiskFreeSpace
  • getConf,
  • getDiskFreeSpace,
  • getFileCacheDir,
  • getLocalWrapperScriptBuilder,
  • getPaths,
  • getPidFilePath,
  • getRunCommand,
  • getUserCacheDir,
  • getWorkingDir

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Permission (java.security)
    Legacy security code; do not use.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top PhpStorm plugins
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