anoopsjohn commented on a change in pull request #1062: HBASE-23705 Add 
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368413179
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/FixedFileTrailer.java
 ##########
 @@ -624,19 +624,22 @@ private String getHBase1CompatibleName(final String 
comparator) {
     return comparatorKlass;
   }
 
-  public static CellComparator createComparator(
-      String comparatorClassName) throws IOException {
+  static CellComparator createComparator(String comparatorClassName) throws 
IOException {
+    if 
(comparatorClassName.equals(CellComparatorImpl.COMPARATOR.getClass().getName()))
 {
+      return CellComparatorImpl.COMPARATOR;
+    } else if (comparatorClassName.equals(
+        CellComparatorImpl.META_COMPARATOR.getClass().getName())) {
+      return CellComparatorImpl.META_COMPARATOR;
+    }
 
 Review comment:
   With out this also (with below way of get class based on the name) it will 
work? U just added a short circuit here? Or u fixing some issue here with below 
getComparatorClass(comparatorClassName)?

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


With regards,
Apache Git Services

Reply via email to