keith-turner commented on a change in pull request #2342:
URL: https://github.com/apache/accumulo/pull/2342#discussion_r745647289



##########
File path: 
test/src/main/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java
##########
@@ -218,4 +219,30 @@ private static FateStatus getFateStatus(ClientContext 
context, AccumuloCluster c
       throw new RuntimeException(e);
     }
   }
+
+  static long checkFlushId(AccumuloClient c, String tableName, long 
prevFlushID) throws Exception {
+    try (Scanner scanner = c.createScanner(MetadataTable.NAME, 
Authorizations.EMPTY)) {
+      String tableId = c.tableOperations().tableIdMap().get(tableName);
+      scanner.setRange(new Range(new Text(tableId + ";"), true, new 
Text(tableId + "<"), true));
+      scanner.fetchColumnFamily(TabletsSection.ServerColumnFamily.NAME);
+      TabletsSection.ServerColumnFamily.FLUSH_COLUMN.fetch(scanner);
+
+      long flushId = -1L;
+      for (Entry<Key,Value> entry : scanner) {
+        Key key = entry.getKey();
+        String val = entry.getValue().toString();
+
+        if (key.getColumnQualifierData().toString().equals(FLUSH_QUAL)) {
+          flushId = Long.parseLong(val);

Review comment:
       If there are multiple tablets in a table, then those tablets could 
possible have diff flush ids (they probably should not).  The code seems like 
it take the flush id of the last tablet.  Should it check that all tablet flush 
ids are the same?  




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