ctubbsii commented on code in PR #5878:
URL: https://github.com/apache/accumulo/pull/5878#discussion_r2342421068


##########
test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java:
##########
@@ -93,22 +92,19 @@ public static int countRFiles(AccumuloClient c, String 
tableName) throws Excepti
     }
   }
 
-  public static List<String> getRFilePaths(AccumuloClient c, String tableName) 
throws Exception {
-    return getStoredTabletFiles(c, 
tableName).stream().map(StoredTabletFile::getMetadataPath)
-        .collect(Collectors.toList());
+  public static List<String> getRFilePaths(ServerContext context, 
AccumuloClient client,
+      String tableName) {
+    return getStoredTabletFiles(context, client, tableName).stream()

Review Comment:
   ```suggestion
     public static List<String> getRFilePaths(ServerContext context, String 
tableName) {
       return getStoredTabletFiles(context, tableName).stream()
   ```



##########
test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java:
##########
@@ -93,22 +92,19 @@ public static int countRFiles(AccumuloClient c, String 
tableName) throws Excepti
     }
   }
 
-  public static List<String> getRFilePaths(AccumuloClient c, String tableName) 
throws Exception {
-    return getStoredTabletFiles(c, 
tableName).stream().map(StoredTabletFile::getMetadataPath)
-        .collect(Collectors.toList());
+  public static List<String> getRFilePaths(ServerContext context, 
AccumuloClient client,
+      String tableName) {
+    return getStoredTabletFiles(context, client, tableName).stream()
+        .map(StoredTabletFile::getMetadataPath).collect(Collectors.toList());
   }
 
-  public static List<StoredTabletFile> getStoredTabletFiles(AccumuloClient c, 
String tableName)
-      throws Exception {
-    List<StoredTabletFile> files = new ArrayList<>();
-    try (Scanner scanner =
-        c.createScanner(SystemTables.METADATA.tableName(), 
Authorizations.EMPTY)) {
-      TableId tableId = 
TableId.of(c.tableOperations().tableIdMap().get(tableName));
-      scanner.setRange(TabletsSection.getRange(tableId));
-      scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
-      scanner.forEach(entry -> 
files.add(StoredTabletFile.of(entry.getKey().getColumnQualifier())));
+  public static Set<StoredTabletFile> getStoredTabletFiles(ServerContext 
context,
+      AccumuloClient client, String tableName) {
+    TableId tableId = 
TableId.of(client.tableOperations().tableIdMap().get(tableName));

Review Comment:
   ```suggestion
     public static Set<StoredTabletFile> getStoredTabletFiles(ServerContext 
context,
         String tableName) {
       TableId tableId = 
TableId.of(context.tableOperations().tableIdMap().get(tableName));
   ```



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