use of org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOADED in project accumulo by apache.
the class BulkNewIT method verifyMetadata.
private void verifyMetadata(AccumuloClient client, String tableName, Map<String, Set<String>> expectedHashes) {
Set<String> endRowsSeen = new HashSet<>();
String id = client.tableOperations().tableIdMap().get(tableName);
try (TabletsMetadata tablets = TabletsMetadata.builder(client).forTable(TableId.of(id)).fetch(FILES, LOADED, PREV_ROW).build()) {
for (TabletMetadata tablet : tablets) {
assertTrue(tablet.getLoaded().isEmpty());
Set<String> fileHashes = tablet.getFiles().stream().map(f -> hash(f.getMetaUpdateDelete())).collect(Collectors.toSet());
String endRow = tablet.getEndRow() == null ? "null" : tablet.getEndRow().toString();
assertEquals(expectedHashes.get(endRow), fileHashes);
endRowsSeen.add(endRow);
}
assertEquals(expectedHashes.keySet(), endRowsSeen);
}
}
Aggregations