public Path getLocalPathForRead(String pathStr) throws IOException { return getPathToRead(pathStr, getLocalDirsForRead()); }
private File locatePidFile(String appIdStr, String containerIdStr) { String pidSubpath= getPidFileSubpath(appIdStr, containerIdStr); for (String dir : getContext().getLocalDirsHandler(). getLocalDirsForRead()) { File pidFile = new File(dir, pidSubpath); if (pidFile.exists()) { return pidFile; } } return null; } }
private File locatePidFile(String appIdStr, String containerIdStr) { String pidSubpath= getPidFileSubpath(appIdStr, containerIdStr); for (String dir : getContext().getLocalDirsHandler(). getLocalDirsForRead()) { File pidFile = new File(dir, pidSubpath); if (pidFile.exists()) { return pidFile; } } return null; } }
/** * Check if the rsrc is Localized on a good dir. * * @param rsrc * @return */ @VisibleForTesting boolean checkLocalResource(LocalizedResource rsrc) { List<String> localDirs = dirsHandler.getLocalDirsForRead(); for (String dir : localDirs) { if (isParent(rsrc.getLocalPath().toUri().getPath(), dir)) { return true; } else { continue; } } return false; }
/** * Check if the rsrc is Localized on a good dir. * * @param rsrc * @return */ @VisibleForTesting boolean checkLocalResource(LocalizedResource rsrc) { List<String> localDirs = dirsHandler.getLocalDirsForRead(); for (String dir : localDirs) { if (isParent(rsrc.getLocalPath().toUri().getPath(), dir)) { return true; } else { continue; } } return false; }
private File locatePidFile(String appIdStr, String containerIdStr) { String pidSubpath= getPidFileSubpath(appIdStr, containerIdStr); for (String dir : getContext().getLocalDirsHandler(). getLocalDirsForRead()) { File pidFile = new File(dir, pidSubpath); if (pidFile.exists()) { return pidFile; } } return null; } }
private File locatePidFile(String appIdStr, String containerIdStr) { String pidSubpath= getPidFileSubpath(appIdStr, containerIdStr); for (String dir : getContext().getLocalDirsHandler(). getLocalDirsForRead()) { File pidFile = new File(dir, pidSubpath); if (pidFile.exists()) { return pidFile; } } return null; } }
private File locatePidFile(String appIdStr, String containerIdStr) { String pidSubpath= getPidFileSubpath(appIdStr, containerIdStr); for (String dir : getContext().getLocalDirsHandler(). getLocalDirsForRead()) { File pidFile = new File(dir, pidSubpath); if (pidFile.exists()) { return pidFile; } } return null; } }
List<String> localDirsForRead = dirsHandler.getLocalDirsForRead(); List<String> logDirs = dirsHandler.getLogDirs(); List<String> filecacheDirs = getNMFilecacheDirs(localDirsForRead);