keith-turner commented on code in PR #4260:
URL: https://github.com/apache/accumulo/pull/4260#discussion_r1489667323


##########
test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java:
##########
@@ -189,12 +187,26 @@ private void runSplitRecoveryTest(ServerContext context, 
int failPoint, String m
 
   private static Map<Long,List<ReferencedTabletFile>> 
getBulkFilesLoaded(ServerContext context,
       KeyExtent extent) {
-    Map<Long,List<ReferencedTabletFile>> bulkFiles = new HashMap<>();
 
-    context.getAmple().readTablet(extent).getLoaded().forEach((path, txid) -> 
bulkFiles
-        .computeIfAbsent(txid, k -> new 
ArrayList<>()).add(path.getTabletFile()));
+    // Ample is not used here because it does not recognize some of the old 
columns that this
+    // upgrade code is dealing with.
+    try (Scanner scanner =
+        context.createScanner(AccumuloTable.METADATA.tableName(), 
Authorizations.EMPTY)) {
+      scanner.setRange(extent.toMetaRange());
+
+      Map<Long,List<ReferencedTabletFile>> bulkFiles = new HashMap<>();
+      for (var entry : scanner) {
+        if 
(entry.getKey().getColumnFamily().equals(BulkFileColumnFamily.NAME)) {
+          var path = new 
StoredTabletFile(entry.getKey().getColumnQualifier().toString());
+          var txid = BulkFileColumnFamily.getBulkLoadTid(entry.getValue());
+          bulkFiles.computeIfAbsent(txid, k -> new 
ArrayList<>()).add(path.getTabletFile());
+        }
+      }

Review Comment:
   [These 
columns](https://github.com/apache/accumulo/blob/5d12597b4dedb60524775d0411405bafc3ee86ce/core/src/main/java/org/apache/accumulo/core/metadata/schema/MetadataSchema.java#L427-L433)
 are handled on upgrade by the code this class is testing.  If Ample sees those 
columns it 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to