Details
Description
detail see HDFS-14541
/** * Close the cache and free all associated resources. */ @Override public void close() { try { lock.lock(); if (closed) return; closed = true; LOG.info(this + ": closing"); maxNonMmappedEvictableLifespanMs = 0; maxEvictableMmapedSize = 0; // Close and join cacheCleaner thread. IOUtilsClient.cleanupWithLogger(LOG, cacheCleaner); // Purge all replicas. while (true) { Object eldestKey; try { eldestKey = evictable.firstKey(); } catch (NoSuchElementException e) { break; } purge((ShortCircuitReplica)evictable.get(eldestKey)); } while (true) { Object eldestKey; try { eldestKey = evictableMmapped.firstKey(); } catch (NoSuchElementException e) { break; } purge((ShortCircuitReplica)evictableMmapped.get(eldestKey)); } } finally { lock.unlock(); }
Attachments
Attachments
Issue Links
- relates to
-
HDFS-14541 When evictableMmapped or evictable size is zero, do not throw NoSuchElementException
- Resolved