amahussein commented on a change in pull request #2985:
URL: https://github.com/apache/hadoop/pull/2985#discussion_r629486718



##########
File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/src/test/java/org/apache/hadoop/yarn/server/timelineservice/reader/TestTimelineReaderWebServicesHBaseStorage.java
##########
@@ -262,20 +263,24 @@ private static void loadData() throws Exception {
     event54.setTimestamp(cTime);
     entity5.addEvent(event54);
     Map<String, Set<String>> isRelatedTo1 = new HashMap<String, Set<String>>();
-    isRelatedTo1.put("type2",
-        Sets.newHashSet("entity21", "entity22", "entity23", "entity24"));
-    isRelatedTo1.put("type4", Sets.newHashSet("entity41", "entity42"));
-    isRelatedTo1.put("type1", Sets.newHashSet("entity14", "entity15"));
-    isRelatedTo1.put("type3",
-        Sets.newHashSet("entity31", "entity35", "entity32", "entity33"));
+    isRelatedTo1.put("type2", new HashSet<>(Arrays.asList("entity21", 
"entity22",
+        "entity23", "entity24")));
+    isRelatedTo1.put("type4", new HashSet<>(Arrays.asList("entity41",
+        "entity42")));
+    isRelatedTo1.put("type1", new HashSet<>(Arrays.asList("entity14",
+        "entity15")));
+    isRelatedTo1.put("type3", new HashSet<>(Arrays.asList("entity31",
+        "entity35", "entity32", "entity33")));

Review comment:
       > why not use the Sets.newHashSet(E element...) method here?
   I am confused a little bit. Isn't the purpose of that PR is to remove the 
usage of `guava.Sets`? If we use `Sets.newHashSet(E element...)`, isn't this 
going to be guava usage or do I miss something?




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