private void cleanupLogDirs(FileContext fs, DeletionService del) { for (String logDir : dirsHandler.getLogDirsForCleanup()) { try { cleanupLogDir(fs, del, logDir); } catch (IOException e) { LOG.warn("failed to cleanup app log dir " + logDir, e); } } }
private void cleanupLogDirs(FileContext fs, DeletionService del) { for (String logDir : dirsHandler.getLogDirsForCleanup()) { try { cleanupLogDir(fs, del, logDir); } catch (IOException e) { LOG.warn("failed to cleanup app log dir " + logDir, e); } } }
private void doAppLogAggregationPostCleanUp() { // Remove the local app-log-dirs List<Path> localAppLogDirs = new ArrayList<Path>(); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logPath = new Path(rootLogDir, applicationId); try { // check if log dir exists lfs.getFileStatus(logPath); localAppLogDirs.add(logPath); } catch (UnsupportedFileSystemException ue) { LOG.warn("Log dir " + rootLogDir + "is an unsupported file system", ue); continue; } catch (IOException fe) { continue; } } if (localAppLogDirs.size() > 0) { this.delService.delete(this.userUgi.getShortUserName(), null, localAppLogDirs.toArray(new Path[localAppLogDirs.size()])); } }
private void doAppLogAggregationPostCleanUp() { // Remove the local app-log-dirs List<Path> localAppLogDirs = new ArrayList<Path>(); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logPath = new Path(rootLogDir, applicationId); try { // check if log dir exists lfs.getFileStatus(logPath); localAppLogDirs.add(logPath); } catch (UnsupportedFileSystemException ue) { LOG.warn("Log dir " + rootLogDir + "is an unsupported file system", ue); continue; } catch (IOException fe) { continue; } } if (localAppLogDirs.size() > 0) { this.delService.delete(this.userUgi.getShortUserName(), null, localAppLogDirs.toArray(new Path[localAppLogDirs.size()])); } }
private void doAppLogAggregationPostCleanUp() { // Remove the local app-log-dirs List<Path> localAppLogDirs = new ArrayList<Path>(); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logPath = new Path(rootLogDir, userFolder + Path.SEPARATOR + applicationId); try { // check if log dir exists lfs.getFileStatus(logPath); localAppLogDirs.add(logPath); } catch (UnsupportedFileSystemException ue) { LOG.warn("Log dir " + rootLogDir + "is an unsupported file system", ue); continue; } catch (IOException fe) { continue; } } if (localAppLogDirs.size() > 0) { this.delService.delete(this.userUgi.getShortUserName(), null, localAppLogDirs.toArray(new Path[localAppLogDirs.size()])); } }
private void doAppLogAggregationPostCleanUp() { // Remove the local app-log-dirs List<Path> localAppLogDirs = new ArrayList<Path>(); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logPath = new Path(rootLogDir, applicationId); try { // check if log dir exists lfs.getFileStatus(logPath); localAppLogDirs.add(logPath); } catch (UnsupportedFileSystemException ue) { LOG.warn("Log dir " + rootLogDir + "is an unsupported file system", ue); continue; } catch (IOException fe) { continue; } } if (localAppLogDirs.size() > 0) { List<Path> localAppLogDirsList = new ArrayList<>(); localAppLogDirsList.addAll(localAppLogDirs); DeletionTask deletionTask = new FileDeletionTask(delService, this.userUgi.getShortUserName(), null, localAppLogDirsList); this.delService.delete(deletionTask); } }
List<Path> localAppLogDirs = new ArrayList<Path>(); FileContext lfs = getLocalFileContext(getConfig()); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path userLogDir = new Path(rootLogDir, userFolder); Path logDir = new Path(userLogDir, applicationId.toString());
List<Path> localAppLogDirs = new ArrayList<Path>(); FileContext lfs = getLocalFileContext(getConfig()); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logDir = new Path(rootLogDir, applicationId.toString()); try {
List<Path> localAppLogDirs = new ArrayList<Path>(); FileContext lfs = getLocalFileContext(getConfig()); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logDir = new Path(rootLogDir, applicationId.toString()); try {
List<Path> localAppLogDirs = new ArrayList<Path>(); FileContext lfs = getLocalFileContext(getConfig()); for (String rootLogDir : dirsHandler.getLogDirsForCleanup()) { Path logDir = new Path(rootLogDir, applicationId.toString()); try {