This is an automated email from the ASF dual-hosted git repository.

krathbun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 2d5a5ac388 Fixed a FunctionalTestUtils method (#5878)
2d5a5ac388 is described below

commit 2d5a5ac3884938d81605230e595953c415cb958d
Author: Kevin Rathbun <[email protected]>
AuthorDate: Fri Sep 12 09:58:51 2025 -0400

    Fixed a FunctionalTestUtils method (#5878)
    
    * Fixed a FunctionalTestUtils method
    
    Improves usage of FunctionalTestUtils.getStoredTabletFiles(). Was 
previously always scanning the METADATA table for stored tablet files of the 
provided table. This doesn't work if we want the stored tablet files of the 
METADATA table or the ROOT table, in which case we should be scanning the ROOT 
table or the root tablet metadata (in ZK), respectively. Used Ample to achieve 
this.
    
    * removed the problematic FunctionalTestUtil method instead
    
    Since it is currently unused, removed instead to be added later with fixes 
if needed
---
 .../test/functional/FunctionalTestUtils.java       | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
 
b/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
index 9f7e2df223..deba28adf2 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
@@ -31,10 +31,8 @@ import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.OptionalLong;
@@ -45,7 +43,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.Collectors;
 
 import org.apache.accumulo.cluster.AccumuloCluster;
 import org.apache.accumulo.core.client.AccumuloClient;
@@ -63,7 +60,6 @@ import org.apache.accumulo.core.fate.FateInstanceType;
 import org.apache.accumulo.core.fate.ReadOnlyFateStore;
 import org.apache.accumulo.core.fate.user.UserFateStore;
 import org.apache.accumulo.core.fate.zookeeper.MetaFateStore;
-import org.apache.accumulo.core.metadata.StoredTabletFile;
 import org.apache.accumulo.core.metadata.SystemTables;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily;
@@ -93,24 +89,6 @@ public class FunctionalTestUtils {
     }
   }
 
-  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<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())));
-    }
-    return files;
-  }
-
   static void checkRFiles(AccumuloClient c, String tableName, int minTablets, 
int maxTablets,
       int minRFiles, int maxRFiles) throws Exception {
     try (Scanner scanner =

Reply via email to