protected void validateFiles(HashSet<String> groundTruth, ArrayList<IndexComponentFileReference> validFiles, FilenameFilter filter, TreeIndexFactory<? extends ITreeIndex> treeFactory, IBufferCache bufferCache) throws HyracksDataException { ArrayList<IndexComponentFileReference> tmpAllInvListsFiles = new ArrayList<>(); cleanupAndGetValidFilesInternal(filter, treeFactory, tmpAllInvListsFiles, bufferCache); for (IndexComponentFileReference cmpFileName : tmpAllInvListsFiles) { if (groundTruth.contains(cmpFileName.getSequence())) { validFiles.add(cmpFileName); } else { delete(bufferCache, cmpFileName.getFullPath()); } } }
/** * Gets a component sequence based on its unique timestamp. * e.g. a component file 1_3_b * will return a component sequence 1_3 * * @param componentFile any component file * @return The component sequence */ public static String getComponentSequence(String componentFile) { final ResourceReference ref = ResourceReference.of(componentFile); return IndexComponentFileReference.of(ref.getName()).getSequence(); }
HashSet<String> deletedKeysBTreeFilesSet = new HashSet<>(); for (IndexComponentFileReference cmpFileName : allDeletedKeysBTreeFiles) { deletedKeysBTreeFilesSet.add(cmpFileName.getSequence());
HashSet<String> btreeFilesSet = new HashSet<>(); for (IndexComponentFileReference cmpFileName : allBTreeFiles) { btreeFilesSet.add(cmpFileName.getSequence());
HashSet<String> btreeFilesSet = new HashSet<>(); for (IndexComponentFileReference cmpFileName : allBTreeFiles) { btreeFilesSet.add(cmpFileName.getSequence());