tasanuma commented on a change in pull request #3031:
URL: https://github.com/apache/hadoop/pull/3031#discussion_r638399025



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorageRetentionManager.java
##########
@@ -192,7 +191,7 @@ private long getImageTxIdToRetain(
       return 0L;
     }
 
-    TreeSet<Long> imageTxIds = Sets.newTreeSet(Collections.reverseOrder());
+    TreeSet<Long> imageTxIds = new TreeSet<>(Collections.reverseOrder());

Review comment:
       Note: It is recommended to use the TreeSet constructor directly.
   
https://github.com/google/guava/blob/v30.1.1/guava/src/com/google/common/collect/Sets.java#L399-L403




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to