You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/08/15 02:18:15 UTC

[GitHub] [hbase] openinx commented on a change in pull request #493: HBASE-22833 MultiRowRangeFilter should provide a method for creating…

openinx commented on a change in pull request #493: HBASE-22833 MultiRowRangeFilter should provide a method for creating…
URL: https://github.com/apache/hbase/pull/493#discussion_r314153710
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java
 ##########
 @@ -71,6 +72,22 @@ public MultiRowRangeFilter(List<RowRange> list) {
     this.ranges = new RangeIteration(rangeList);
   }
 
+  /**
+   * @param rowKeyPrefixes the array of byte array
+   */
+  public MultiRowRangeFilter(byte[][] rowKeyPrefixes) {
+    this(createRangeListFromRowKeyPrefixes(rowKeyPrefixes));
+  }
+
+  private static List<RowRange> createRangeListFromRowKeyPrefixes(byte[][] rowKeyPrefixes) {
+    List<RowRange> list = new ArrayList<>();
+    for (byte[] rowKeyPrefix: rowKeyPrefixes) {
 
 Review comment:
   Do we need some arguments check here ? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services