/** * Difference phase where the GC candidates are identified. * * @param fs the garbage collector file state * @throws IOException * Signals that an I/O exception has occurred. */ private void difference(GarbageCollectorFileState fs) throws IOException { LOG.debug("Starting difference phase of the garbage collector"); FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getMarkedRefs(), fs.getAvailableRefs(), transformer); int candidates = FileIOUtils.writeStrings(iter, fs.getGcCandidates(), true); LOG.debug("Found candidates - " + candidates); LOG.debug("Ending difference phase of the garbage collector"); }
/** * Difference phase where the GC candidates are identified. * * @param fs the garbage collector file state * @throws IOException * Signals that an I/O exception has occurred. */ private void difference(GarbageCollectorFileState fs) throws IOException { LOG.debug("Starting difference phase of the garbage collector"); FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getMarkedRefs(), fs.getAvailableRefs(), transformer); int candidates = FileIOUtils.writeStrings(iter, fs.getGcCandidates(), true); LOG.debug("Found candidates - " + candidates); LOG.debug("Ending difference phase of the garbage collector"); }
/** * Difference phase where the GC candidates are identified. * * @param fs the garbage collector file state * @throws IOException * Signals that an I/O exception has occurred. */ private void difference(GarbageCollectorFileState fs) throws IOException { LOG.debug("Starting difference phase of the garbage collector"); FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getMarkedRefs(), fs.getAvailableRefs(), transformer); int candidates = FileIOUtils.writeStrings(iter, fs.getGcCandidates(), true); LOG.debug("Found candidates - " + candidates); LOG.debug("Ending difference phase of the garbage collector"); }
FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getAvailableRefs(), fs.getMarkedRefs(),
FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getAvailableRefs(), fs.getMarkedRefs(),
FileLineDifferenceIterator iter = new FileLineDifferenceIterator( fs.getAvailableRefs(), fs.getMarkedRefs(),
FileLineDifferenceIterator iterator = null; try { iterator = new FileLineDifferenceIterator(recs, getBlobRecordsFile(), null); writeStrings(iterator, temp, false); } finally {
FileLineDifferenceIterator iterator = null; try { iterator = new FileLineDifferenceIterator(recs, getBlobRecordsFile(), null); writeStrings(iterator, temp, false); } finally {
try { toBeRemovedIterator = new FileLineDifferenceIterator(recs, delFile, null); writeStrings(toBeRemovedIterator, toBeRemoved, false); removeIterator = new FileLineDifferenceIterator(toBeRemoved, delFile, null); writeStrings(removeIterator, removed, false); } finally {
FileLineDifferenceIterator iterator = null; try { iterator = new FileLineDifferenceIterator(recs, getBlobRecordsFile(), null); writeStrings(iterator, temp, false); } finally {
try { toBeRemovedIterator = new FileLineDifferenceIterator(recs, delFile, null); writeStrings(toBeRemovedIterator, toBeRemoved, false); removeIterator = new FileLineDifferenceIterator(toBeRemoved, delFile, null); writeStrings(removeIterator, removed, false); } finally {
try { toBeRemovedIterator = new FileLineDifferenceIterator(recs, delFile, null); writeStrings(toBeRemovedIterator, toBeRemoved, false); removeIterator = new FileLineDifferenceIterator(toBeRemoved, delFile, null); writeStrings(removeIterator, removed, false); } finally {
private static Iterator<String> createItr(String marked, String all) throws IOException { return new FileLineDifferenceIterator(lineItr(marked), lineItr(all)); }
private static void assertTransformed(String marked, String all, List<String> diff) throws IOException { Iterator<String> itr = new FileLineDifferenceIterator(lineItr(marked), lineItr(all), new Function<String, String>() { @Nullable @Override public String apply(@Nullable String input) { if (input != null) { return input.split(":")[0]; } return null; } }); assertThat("marked: " + marked + " all: " + all, ImmutableList.copyOf(itr), is(diff)); } }
/** * Return any ids not existing in the deletions being tracked from the ids in file parameter. * * @param recs the file to search for ids existing in the deletions here * @return */ public Iterator<String> filter(File recs) throws IOException { return new FileLineDifferenceIterator(delFile, recs, transformer); } }
/** * Return any ids not existing in the deletions being tracked from the ids in file parameter. * * @param recs the file to search for ids existing in the deletions here * @return */ public Iterator<String> filter(File recs) throws IOException { return new FileLineDifferenceIterator(delFile, recs, transformer); } }
/** * Return any ids not existing in the deletions being tracked from the ids in file parameter. * * @param recs the file to search for ids existing in the deletions here * @return */ public Iterator<String> filter(File recs) throws IOException { return new FileLineDifferenceIterator(delFile, recs, transformer); } }