z3n3r commented on a change in pull request #2445:
URL: https://github.com/apache/hbase/pull/2445#discussion_r506775224



##########
File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
##########
@@ -300,8 +300,12 @@ public static CellComparator getCellComparator(TableName 
tableName) {
    * @return CellComparator to use going off the {@code tableName} passed.
    */
   public static CellComparator getCellComparator(byte [] tableName) {
-    // FYI, TableName.toBytes does not create an array; just returns existing 
array pointer.
-    return Bytes.equals(tableName, TableName.META_TABLE_NAME.toBytes())?
-      MetaCellComparator.META_COMPARATOR: CellComparatorImpl.COMPARATOR;
+    if (Bytes.equals(tableName, TableName.ROOT_TABLE_NAME.toBytes())) {
+      return RootCellComparator.ROOT_COMPARATOR;
+    }
+    if (Bytes.equals(tableName, TableName.META_TABLE_NAME.toBytes())) {
+      return MetaCellComparator.META_COMPARATOR;
+    }
+    return CellComparatorImpl.COMPARATOR;

Review comment:
       yes will consolidate.




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


Reply via email to