[ https://issues.apache.org/jira/browse/HDFS-15161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17035447#comment-17035447 ]
Hudson commented on HDFS-15161: ------------------------------- SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #17947 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/17947/]) HDFS-15161. When evictableMmapped or evictable size is zero, do not (ayushsaxena: rev f09710bbb8e56d066f9d7a2e70a41ed82d5aa781) * (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/shortcircuit/ShortCircuitCache.java > When evictableMmapped or evictable size is zero, do not throw > NoSuchElementException in ShortCircuitCache#close() > ------------------------------------------------------------------------------------------------------------------ > > Key: HDFS-15161 > URL: https://issues.apache.org/jira/browse/HDFS-15161 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Lisheng Sun > Assignee: Lisheng Sun > Priority: Major > Fix For: 3.3.0, 2.9.3, 3.1.4, 3.2.2, 2.10.1 > > Attachments: HDFS-15161.001.patch, HDFS-15161.002.patch > > > detail see HDFS-14541 > {code:java} > /** > * 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(); > } > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org