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

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

Best Java code snippets using org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.getWorkingDir (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

Path appStorageDir = getWorkingDir(localDirs, user, appId);
origin: io.hops/hadoop-yarn-server-nodemanager

Path appStorageDir = getWorkingDir(localDirs, user, appId, userFolder);
org.apache.hadoop.yarn.server.nodemanagerDefaultContainerExecutorgetWorkingDir

Javadoc

Return a randomly chosen application directory from a list of local storage directories. The probability of selecting a directory is proportional to its size.

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

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JList (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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