@Override public Path getLocalPathForWrite(String path, long size) throws IOException { return dirhandlerService.getLocalPathForWrite(path, size, false); } }
@Override public Path getLocalPathForWrite(String path) throws IOException { return dirhandlerService.getLocalPathForWrite(path); }
String cmdDirPath = nmContext.getLocalDirsHandler().getLocalPathForWrite( ResourceLocalizationService.NM_PRIVATE_DIR + Path.SEPARATOR + appId + Path.SEPARATOR + filePrefix + Path.SEPARATOR).toString();
List<String> logDirs = dirsHandler.getLogDirs(); Path classpathJarPrivateDir = dirsHandler.getLocalPathForWrite( ResourceLocalizationService.NM_PRIVATE_DIR); createUserLocalDirs(localDirs, user);
List<String> logDirs = dirsHandler.getLogDirs(); Path classpathJarPrivateDir = dirsHandler.getLocalPathForWrite( ResourceLocalizationService.NM_PRIVATE_DIR); createUserLocalDirs(localDirs, user);
List<String> logDirs = dirsHandler.getLogDirs(); Path classpathJarPrivateDir = dirsHandler.getLocalPathForWrite( ResourceLocalizationService.NM_PRIVATE_DIR); createUserLocalDirs(localDirs, user);
List<String> logDirs = dirsHandler.getLogDirs(); Path classpathJarPrivateDir = dirsHandler.getLocalPathForWrite( ResourceLocalizationService.NM_PRIVATE_DIR); createUserLocalDirs(localDirs, user, userFolder);
private Path deriveContainerWorkDir() throws IOException { final String containerWorkDirPath = ContainerLocalizer.USERCACHE + Path.SEPARATOR + container.getUser() + Path.SEPARATOR + ContainerLocalizer.APPCACHE + Path.SEPARATOR + app.getAppId().toString() + Path.SEPARATOR + container.getContainerId().toString(); final Path containerWorkDir = dirsHandler.getLocalPathForWrite( containerWorkDirPath, LocalDirAllocator.SIZE_UNKNOWN, false); return containerWorkDir; }
dirsHandler.getLocalPathForWrite( NM_PRIVATE_DIR + Path.SEPARATOR + String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT,
dirsHandler.getLocalPathForWrite( NM_PRIVATE_DIR + Path.SEPARATOR + String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT,
try { Path publicRootPath = dirsHandler.getLocalPathForWrite("." + Path.SEPARATOR + ContainerLocalizer.FILECACHE, ContainerLocalizer.getEstimatedSize(resource), true);
dirsHandler.getLocalPathForWrite( NM_PRIVATE_DIR + Path.SEPARATOR + String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT,
dirsHandler.getLocalPathForWrite( NM_PRIVATE_DIR + Path.SEPARATOR + String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT,
try { Path publicRootPath = dirsHandler.getLocalPathForWrite("." + Path.SEPARATOR + ContainerLocalizer.FILECACHE, ContainerLocalizer.getEstimatedSize(resource), true);
try { Path publicRootPath = dirsHandler.getLocalPathForWrite("." + Path.SEPARATOR + ContainerLocalizer.FILECACHE, ContainerLocalizer.getEstimatedSize(resource), true);
try { Path publicRootPath = dirsHandler.getLocalPathForWrite("." + Path.SEPARATOR + ContainerLocalizer.FILECACHE, ContainerLocalizer.getEstimatedSize(resource), true);
private Path getPathForLocalization(LocalResource rsrc, LocalResourcesTracker tracker) throws IOException, URISyntaxException { String user = context.getUser(); ApplicationId appId = context.getContainerId().getApplicationAttemptId().getApplicationId(); LocalResourceVisibility vis = rsrc.getVisibility(); String cacheDirectory = null; if (vis == LocalResourceVisibility.PRIVATE) {// PRIVATE Only cacheDirectory = getUserFileCachePath(user); } else {// APPLICATION ONLY cacheDirectory = getAppFileCachePath(user, appId.toString()); } Path dirPath = dirsHandler.getLocalPathForWrite(cacheDirectory, ContainerLocalizer.getEstimatedSize(rsrc), false); return tracker.getPathForLocalization(new LocalResourceRequest(rsrc), dirPath, delService); }
private Path getPathForLocalization(LocalResource rsrc, LocalResourcesTracker tracker) throws IOException, URISyntaxException { String user = context.getUser(); ApplicationId appId = context.getContainerId().getApplicationAttemptId().getApplicationId(); LocalResourceVisibility vis = rsrc.getVisibility(); String cacheDirectory = null; if (vis == LocalResourceVisibility.PRIVATE) {// PRIVATE Only cacheDirectory = getUserFileCachePath(user); } else {// APPLICATION ONLY cacheDirectory = getAppFileCachePath(user, appId.toString()); } Path dirPath = dirsHandler.getLocalPathForWrite(cacheDirectory, ContainerLocalizer.getEstimatedSize(rsrc), false); return tracker.getPathForLocalization(new LocalResourceRequest(rsrc), dirPath, delService); }
private Path getPathForLocalization(LocalResource rsrc, LocalResourcesTracker tracker) throws IOException, URISyntaxException { String user = context.getUser(); String userFolder = context.getUserFolder(); ApplicationId appId = context.getContainerId().getApplicationAttemptId().getApplicationId(); LocalResourceVisibility vis = rsrc.getVisibility(); String cacheDirectory = null; if (vis == LocalResourceVisibility.PRIVATE) {// PRIVATE Only cacheDirectory = getUserFileCachePath(userFolder); } else {// APPLICATION ONLY cacheDirectory = getAppFileCachePath(userFolder, appId.toString()); } Path dirPath = dirsHandler.getLocalPathForWrite(cacheDirectory, ContainerLocalizer.getEstimatedSize(rsrc), false); return tracker.getPathForLocalization(new LocalResourceRequest(rsrc), dirPath, delService); }
private Path getPathForLocalization(LocalResource rsrc) throws IOException, URISyntaxException { String user = context.getUser(); ApplicationId appId = context.getContainerId().getApplicationAttemptId().getApplicationId(); LocalResourceVisibility vis = rsrc.getVisibility(); LocalResourcesTracker tracker = getLocalResourcesTracker(vis, user, appId); String cacheDirectory = null; if (vis == LocalResourceVisibility.PRIVATE) {// PRIVATE Only cacheDirectory = getUserFileCachePath(user); } else {// APPLICATION ONLY cacheDirectory = getAppFileCachePath(user, appId.toString()); } Path dirPath = dirsHandler.getLocalPathForWrite(cacheDirectory, ContainerLocalizer.getEstimatedSize(rsrc), false); return tracker.getPathForLocalization(new LocalResourceRequest(rsrc), dirPath, delService); }