@Override public Set<DataSegment> findSegments(String workingDirPath, boolean updateDescriptor) throws SegmentLoadingException { final Map<SegmentId, Pair<DataSegment, Long>> timestampedSegments = new HashMap<>(); final File workingDir = new File(workingDirPath); if (!workingDir.isDirectory()) { throw new SegmentLoadingException("Working directory [%s] didn't exist !?", workingDir); } recursiveSearchSegments(timestampedSegments, workingDir, updateDescriptor); return timestampedSegments.values().stream().map(x -> x.lhs).collect(Collectors.toSet()); }
recursiveSearchSegments(timestampedSegments, file, updateDescriptor); } else if ("descriptor.json".equals(file.getName())) { final File indexZip = new File(file.getParentFile(), "index.zip");
@Override public Set<DataSegment> findSegments(String workingDirPath, boolean updateDescriptor) throws SegmentLoadingException { final Map<String, Pair<DataSegment, Long>> timestampedSegments = new HashMap<>(); final File workingDir = new File(workingDirPath); if (!workingDir.isDirectory()) { throw new SegmentLoadingException("Working directory [%s] didn't exist !?", workingDir); } recursiveSearchSegments(timestampedSegments, workingDir, updateDescriptor); return timestampedSegments.values().stream().map(x -> x.lhs).collect(Collectors.toSet()); }
recursiveSearchSegments(timestampedSegments, file, updateDescriptor); } else if ("descriptor.json".equals(file.getName())) { final File indexZip = new File(file.getParentFile(), "index.zip");