Source:
<code>public ImmutableCollection<HStoreFile> close() throws IOException { this.archiveLock.lock(); this.lock.writeLock().lock(); try { ImmutableCollection<HStoreFile> result = storeEngine.getStoreFileManager().clearFiles(); Collection<HStoreFile> compactedfiles = storeEngine.getStoreFileManager().clearCompactedFiles(); if (CollectionUtils.isNotEmpty(compactedfiles)) { removeCompactedfiles(compactedfiles); } if (!result.isEmpty()) { ThreadPoolExecutor storeFileCloserThreadPool = this.region .getStoreFileOpenAndCloseThreadPool("StoreFileCloser-" + this.region.getRegionInfo().getEncodedName() + "-" + this.getColumnFamilyName()); CompletionService<Void> completionService = new ExecutorCompletionService<>(storeFileCloserThreadPool); for (HStoreFile f : result) { completionService.submit(new Callable<Void>() { @Override public Void call() throws IOException { boolean evictOnClose = cacheConf != null? cacheConf.shouldEvictOnClose(): true; f.closeStoreFile(evictOnClose); return null; } }); } IOException ioe = null; try { for (int i = 0; i < result.size(); i++) { try { Future<Void> future = completionService.take(); future.get(); } catch (InterruptedException e) { if (ioe == null) { ioe = new InterruptedIOException(); ioe.initCause(e); } } catch (ExecutionException e) { if (ioe == null) { ioe = new IOException(e.getCause()); } } } } finally { storeFileCloserThreadPool.shutdownNow(); } if (ioe != null) { throw ioe; } } LOG.trace("Closed {}", this); return result; } finally { this.lock.writeLock().unlock(); this.archiveLock.unlock(); if (this.metricsStore != null) { metricsStore.close(); } if (metricsStoreWrapper != null) { Closeables.close(this.metricsStoreWrapper, true); } <START> } <END> }</code><technical_language>This do deregister stuff</technical_language>

Target:
public ImmutableCollection<HStoreFile> close() throws IOException { this.archiveLock.lock(); this.lock.writeLock().lock(); try { ImmutableCollection<HStoreFile> result = storeEngine.getStoreFileManager().clearFiles(); Collection<HStoreFile> compactedfiles = storeEngine.getStoreFileManager().clearCompactedFiles(); if (CollectionUtils.isNotEmpty(compactedfiles)) { removeCompactedfiles(compactedfiles); } if (!result.isEmpty()) { ThreadPoolExecutor storeFileCloserThreadPool = this.region .getStoreFileOpenAndCloseThreadPool("StoreFileCloser-" + this.region.getRegionInfo().getEncodedName() + "-" + this.getColumnFamilyName()); CompletionService<Void> completionService = new ExecutorCompletionService<>(storeFileCloserThreadPool); for (HStoreFile f : result) { completionService.submit(new Callable<Void>() { @Override public Void call() throws IOException { boolean evictOnClose = cacheConf != null? cacheConf.shouldEvictOnClose(): true; f.closeStoreFile(evictOnClose); return null; } }); } IOException ioe = null; try { for (int i = 0; i < result.size(); i++) { try { Future<Void> future = completionService.take(); future.get(); } catch (InterruptedException e) { if (ioe == null) { ioe = new InterruptedIOException(); ioe.initCause(e); } } catch (ExecutionException e) { if (ioe == null) { ioe = new IOException(e.getCause()); } } } } finally { storeFileCloserThreadPool.shutdownNow(); } if (ioe != null) { throw ioe; } } LOG.trace("Closed {}", this); return result; } finally { this.lock.writeLock().unlock(); this.archiveLock.unlock(); } }