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

[GitHub] [accumulo] DomGarguilo opened a new pull request, #3328: WIP - add RowRange object

DomGarguilo opened a new pull request, #3328:
URL: https://github.com/apache/accumulo/pull/3328

   Closes #3308 


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


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

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on code in PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#discussion_r1176867058


##########
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:
   addressed in 49c98bd



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


[GitHub] [accumulo] cshannon commented on pull request #3328: WIP - add RowRange object

Posted by "cshannon (via GitHub)" <gi...@apache.org>.
cshannon commented on PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#issuecomment-1518267246

   > @cshannon, interesting ideas. I am planning to move these changes to target 3.1. I will also look into the other ideas as I go.
   
   Sounds good, there's no rush. I can and will keep using Range in my no-chop merge prototype for now as it would be easy to swap it out if/when a RowRange object is ready if it supported all the utility methods as I said. I can also review this too and look more at it to help out. 
   
   In theory this object should be able to be re-worked from the existing Range object and support the existing methods (even if it's just a shared interface or something and not inheritance) because supporting only rows should be simpler logic to implement than the existing object that handles an entire Key.
   


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


[GitHub] [accumulo] DomGarguilo closed pull request #3328: WIP - add RowRange object

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo closed pull request #3328: WIP - add RowRange object
URL: https://github.com/apache/accumulo/pull/3328


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


[GitHub] [accumulo] cshannon commented on pull request #3328: WIP - add RowRange object

Posted by "cshannon (via GitHub)" <gi...@apache.org>.
cshannon commented on PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#issuecomment-1518261046

   Having a RowRange object would be useful in 3.1 and not just elasticity. As part of #1327 I need to use a range for fencing off table files. Right now in my prototypes I'm just using the Range object and leaving cq/cf, etc null/empty but really we just need to fence off by rows.
   
   It would need to support some of the original methods though of Range for it to be used. There are some very useful methods in Range like [mergeOverlapping](https://github.com/cshannon/accumulo/blob/9a31c4257b54ed890f02ab9aafe6d99a9638dac6/core/src/main/java/org/apache/accumulo/core/data/Range.java#L418) and [clip](https://github.com/cshannon/accumulo/blob/9a31c4257b54ed890f02ab9aafe6d99a9638dac6/core/src/main/java/org/apache/accumulo/core/data/Range.java#L511) that would need to exist.
   
   After I talked about this with @keith-turner last week I was thinking a one approach would be to do some refactoring and move things just for rows into RowRange and then have Range extend RowRange and add CF, CQ, etc.


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


[GitHub] [accumulo] DomGarguilo commented on pull request #3328: WIP - add RowRange object

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#issuecomment-1522370926

   Superseded by #3342


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


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

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
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


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

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on code in PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#discussion_r1176909079


##########
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:
   Addressed in 3a6d615



##########
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:
   Addressed in 3a6d615



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


[GitHub] [accumulo] DomGarguilo commented on pull request #3328: WIP - add RowRange object

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on PR #3328:
URL: https://github.com/apache/accumulo/pull/3328#issuecomment-1518263272

   @cshannon, interesting ideas. I am planning to move these changes to target 3.1. I will also look into the other ideas as I go.


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