HorizonNet commented on a change in pull request #1062: HBASE-23705 Add
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368309982
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
##########
@@ -387,4 +409,23 @@ public Comparator getSimpleComparator() {
public Comparator getSimpleComparator() {
return new BBKVComparator(this);
}
+
+ /**
+ * Utility method that makes a guess at comparator to use based off passed
tableName.
+ * Use in extreme when no comparator specified.
+ * @return CellComparator to use going off the <code>tableName</code> passed.
+ */
+ public static CellComparator getCellComparator(TableName tableName) {
+ return getCellComparator(tableName.toBytes());
+ }
+
+ /**
+ * Utility method that makes a guess at comparator to use based off passed
tableName.
+ * Use in extreme when no comparator specified.
+ * @return CellComparator to use going off the <code>tableName</code> passed.
Review comment:
NIT: Use `{@code tableName}` instead.
----------------------------------------------------------------
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