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


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -2145,4 +2150,38 @@ public void setTabletHostingGoal(String tableName, Range 
range, TabletHostingGoa
     }
   }
 
+  @Override
+  public Stream<HostingGoalForTablet> getTabletHostingGoal(final String 
tableName,
+      final Range range) throws TableNotFoundException {
+    EXISTING_TABLE_NAME.validate(tableName);
+
+    List<HostingGoalForTablet> hostingInfo = new ArrayList<>();
+
+    final Text scanRangeStart = (range.getStartKey() == null) ? null : 
range.getStartKey().getRow();
+    TableId tableId = context.getTableId(tableName);
+
+    try (TabletsMetadata m =
+        
context.getAmple().readTablets().forTable(tableId).overlapping(scanRangeStart, 
true, null)
+            .fetch(HOSTING_GOAL, PREV_ROW).checkConsistency().build()) {
+
+      for (TabletMetadata tm : m) {
+        final KeyExtent tabletExtent = tm.getExtent();
+        if (scanRangeStart != null && tm.getEndRow() != null
+            && tm.getEndRow().compareTo(scanRangeStart) < 0) {
+          // the end row of this tablet is before the start row, skip it

Review Comment:
   the comment says to skip this tablet, but then throws an exception.



-- 
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-unsubscr...@accumulo.apache.org

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

Reply via email to