Source:
public void delete(long waitTime) { synchronized (this) { if (deleted) throw new IllegalStateException("Double delete"); deleted = true; } long t1 = System.currentTimeMillis(); while (activeIters.size() > 0 && System.currentTimeMillis() - t1 < waitTime) { sleepUninterruptibly(50, TimeUnit.MILLISECONDS); } if (activeIters.size() > 0) { try { Configuration conf = this.context.getHadoopConf(); FileSystem fs = FileSystem.getLocal(conf); String tmpFile = memDumpDir + "/memDump" + UUID.randomUUID() + "." + RFile.EXTENSION; Configuration newConf = new Configuration(conf); newConf.setInt("io.seqfile.compress.blocksize", 100000); AccumuloConfiguration aconf = context.getConfiguration(); if (getOrCreateSampler() != null) { aconf = createSampleConfig(aconf); } FileSKVWriter out = new RFileOperations().newWriterBuilder() .forFile(tmpFile, fs, newConf, context.getCryptoService()).withTableConfiguration(aconf) .build(); InterruptibleIterator iter = map.skvIterator(null); HashSet<ByteSequence> allfams = new HashSet<>(); for (Entry<String,Set<ByteSequence>> entry : lggroups.entrySet()) { allfams.addAll(entry.getValue()); out.startNewLocalityGroup(entry.getKey(), entry.getValue()); iter.seek(new Range(), entry.getValue(), true); dumpLocalityGroup(out, iter); } out.startDefaultLocalityGroup(); iter.seek(new Range(), allfams, false); dumpLocalityGroup(out, iter); out.close(); log.debug("Created mem dump file {}", tmpFile); memDumpFile = tmpFile; synchronized (activeIters) { for (MemoryIterator mi : activeIters) { mi.switchNow(); } } fs.delete(new Path(memDumpFile), true); } catch (IOException ioe) { log.error("Failed to create mem dump file", ioe); while (activeIters.size() > 0) { sleepUninterruptibly(100, TimeUnit.MILLISECONDS); } } } SimpleMap tmpMap = map; synchronized (this) { map = null; } tmpMap.delete(); }

Target:
public void delete(long waitTime) { synchronized (this) { if (deleted) throw new IllegalStateException("Double delete"); deleted = true; } long t1 = System.currentTimeMillis(); while (activeIters.size() > 0 && System.currentTimeMillis() - t1 < waitTime) { sleepUninterruptibly(50, TimeUnit.MILLISECONDS); } if (activeIters.size() > 0) { try { Configuration conf = context.getHadoopConf(); FileSystem fs = FileSystem.getLocal(conf); String tmpFile = memDumpDir + "/memDump" + UUID.randomUUID() + "." + RFile.EXTENSION; Configuration newConf = new Configuration(conf); newConf.setInt("io.seqfile.compress.blocksize", 100000); AccumuloConfiguration aconf = context.getConfiguration(); if (getOrCreateSampler() != null) { aconf = createSampleConfig(aconf); } FileSKVWriter out = new RFileOperations().newWriterBuilder() .forFile(tmpFile, fs, newConf, context.getCryptoService()).withTableConfiguration(aconf) .build(); InterruptibleIterator iter = map.skvIterator(null); HashSet<ByteSequence> allfams = new HashSet<>(); for (Entry<String,Set<ByteSequence>> entry : lggroups.entrySet()) { allfams.addAll(entry.getValue()); out.startNewLocalityGroup(entry.getKey(), entry.getValue()); iter.seek(new Range(), entry.getValue(), true); dumpLocalityGroup(out, iter); } out.startDefaultLocalityGroup(); iter.seek(new Range(), allfams, false); dumpLocalityGroup(out, iter); out.close(); log.debug("Created mem dump file {}", tmpFile); memDumpFile = tmpFile; synchronized (activeIters) { for (MemoryIterator mi : activeIters) { mi.switchNow(); } } fs.delete(new Path(memDumpFile), true); } catch (IOException ioe) { log.error("Failed to create mem dump file", ioe); while (activeIters.size() > 0) { sleepUninterruptibly(100, TimeUnit.MILLISECONDS); } } } SimpleMap tmpMap = map; synchronized (this) { map = null; } tmpMap.delete(); }