You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2023/04/21 17:35:59 UTC

[GitHub] [accumulo] dlmarion commented on a diff in pull request #3328: WIP - add RowRange object

dlmarion commented on code in PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#discussion_r1174016449


##########
core/src/main/java/org/apache/accumulo/core/data/RowRange.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.data;
+
+import org.apache.hadoop.io.Text;
+
+public class RowRange {
+  final private Text startRow;
+  final private boolean startInclusive;
+  final private Text endRow;
+  final private boolean endInclusive;
+
+  public RowRange(Text startRow, Text endRow) {

Review Comment:
   I think we also want a no-arg constructor like in `Range` to convey +/- infinity and with that the `isInfiniteKey` methods



##########
core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java:
##########
@@ -181,4 +180,9 @@ public static Text findMax(Scanner scanner, Text start, boolean is, Text end, bo
 
     return _findMax(scanner, start, is, end, ie);
   }
+
+  public static Text findMax(Scanner scanner, RowRange rowRange) {

Review Comment:
   I think you just want this one `findMax` method that uses the RowRange parameter.



##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -1560,6 +1562,15 @@ public Text getMaxRow(String tableName, Authorizations auths, Text startRow,
     return FindMax.findMax(scanner, startRow, startInclusive, endRow, endInclusive);
   }
 
+  @Override
+  public Text getMaxRow(String tableName, Authorizations auths, RowRange rowRange)

Review Comment:
   The other getMaxRow method should call this getMaxRow method, creating a RowRange from the args.



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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org