[ https://issues.apache.org/jira/browse/HDFS-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16369414#comment-16369414 ]
BELUGA BEHR edited comment on HDFS-13167 at 2/19/18 6:51 PM: ------------------------------------------------------------- Hey [~elgoiri] Thank you for taking interest in my patches!! I just put a new one up... one oversight on my part is that I thought the _toRemove_ collection had the {{remove}} method called on it, making a {{Set}} more appropriate. However, there are only {{add}} calls. I changed the structure instead to an {{ArrayList}} instead of {{LinkedList}}. I also changed the {{Queue}} Collection to use the {{ArrayDeque}} structure instead of a {{LinkedList}} because _this class is likely to be faster than Stack when used as a stack, and faster than LinkedList when used as a queue._ It certainly is more memory efficient. [https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html] was (Author: belugabehr): Hey [~elgoiri] Thank you for taking interest in my patches!! I just put a new one up... one oversight on my part is that I thought the _toRemove_ collection had the {{remove}} method called on it, making a {{Set}} more appropriate. However, there are only {{add}} calls. I changed the structure instead to an {{ArrayList}} instead of {{LinkedList}}. I also changed the {{Queue}} Collection to use the {{ArrayDeque}} structure instead of a {{LinkedList}} because _this class is likely to be faster than Stack when used as a stack, and faster than LinkedList when used as a queue._ [https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html] > DatanodeAdminManager Improvements > --------------------------------- > > Key: HDFS-13167 > URL: https://issues.apache.org/jira/browse/HDFS-13167 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs > Affects Versions: 3.0.0 > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Trivial > Attachments: HDFS-13167.1.patch, HDFS-13167.2.patch > > > # Use Collection type Set instead of List for tracking nodes > # Fix logging statements that are erroneously appending variables instead of > using parameters > # Miscellaneous small improvements > As an example, the {{node}} variable is being appended to the string instead > of being passed as an argument to the {{trace}} method for variable > substitution. > {code} > LOG.trace("stopDecommission: Node {} in {}, nothing to do." + > node, node.getAdminState()); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org