BELUGA BEHR commented on HDFS-13167:

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._


> 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

To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to