You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/06/06 08:53:52 UTC

[GitHub] [hadoop] aajisaka commented on a diff in pull request #4365: HADOOP-18266. Using HashSet/ TreeSet Constructor for hadoop-common

aajisaka commented on code in PR #4365:
URL: https://github.com/apache/hadoop/pull/4365#discussion_r889951385


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java:
##########
@@ -1442,7 +1441,7 @@ public static void destroyAllShellProcesses() {
    */
   public static Set<Shell> getAllShells() {
     synchronized (CHILD_SHELLS) {
-      return new HashSet<>(CHILD_SHELLS.keySet());
+      return CHILD_SHELLS.keySet();

Review Comment:
   I think the diff changes the behavior. Would you revert the change?
   - Before: The method returns `HashSet`
   - After: The method returns `SynchronizedSet` because `CHILD_SHELLS` is `SynchronizedMap`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org