public Set<String> getCurrentUpLoadedFileMeta() { Set<String> info = new HashSet<String>(); for (File file : this.uploadedFiles) { info.add(getLogFileMetaData(file)); } return info; }
public Set<String> getCurrentUpLoadedFileMeta() { Set<String> info = new HashSet<String>(); for (File file : this.uploadedFiles) { info.add(getLogFileMetaData(file)); } return info; }
public Set<String> getCurrentUpLoadedFileMeta() { Set<String> info = new HashSet<String>(); for (File file : this.uploadedFiles) { info.add(getLogFileMetaData(file)); } return info; }
new HashSet<File>(Arrays.asList(filesList)); for (File logFile : candidates) { this.allExistingFileMeta.add(getLogFileMetaData(logFile));
private Set<File> getPendingLogFilesToUpload(File containerLogDir) { Set<File> candidates = new HashSet<File>(Arrays.asList(containerLogDir.listFiles())); for (File logFile : candidates) { this.allExistingFileMeta.add(getLogFileMetaData(logFile)); } if (this.logAggregationContext != null && candidates.size() > 0) { filterFiles( this.appFinished ? this.logAggregationContext.getIncludePattern() : this.logAggregationContext.getRolledLogsIncludePattern(), candidates, false); filterFiles( this.appFinished ? this.logAggregationContext.getExcludePattern() : this.logAggregationContext.getRolledLogsExcludePattern(), candidates, true); Iterable<File> mask = Iterables.filter(candidates, new Predicate<File>() { @Override public boolean apply(File next) { return !alreadyUploadedLogFiles .contains(getLogFileMetaData(next)); } }); candidates = Sets.newHashSet(mask); } return candidates; }
private Set<File> getPendingLogFilesToUpload(File containerLogDir) { Set<File> candidates = new HashSet<File>(Arrays.asList(containerLogDir.listFiles())); for (File logFile : candidates) { this.allExistingFileMeta.add(getLogFileMetaData(logFile)); } if (this.logAggregationContext != null && candidates.size() > 0) { filterFiles( this.appFinished ? this.logAggregationContext.getIncludePattern() : this.logAggregationContext.getRolledLogsIncludePattern(), candidates, false); filterFiles( this.appFinished ? this.logAggregationContext.getExcludePattern() : this.logAggregationContext.getRolledLogsExcludePattern(), candidates, true); Iterable<File> mask = Iterables.filter(candidates, new Predicate<File>() { @Override public boolean apply(File next) { return !alreadyUploadedLogFiles .contains(getLogFileMetaData(next)); } }); candidates = Sets.newHashSet(mask); } return candidates; }