opts.tableName = tableName;
TestIngest.ingest(c, opts, new BatchWriterOpts());
to.flush(tableName, null, null, true);
VerifyIngest.Opts vopts = new VerifyIngest.Opts();
vopts.tableName = tableName;
VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
String id = to.tableIdMap().get(tableName);
Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
s.setRange(new KeyExtent(new Text(id), null, null).toMetadataRange());
s.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
assertTrue(FunctionalTestUtils.count(s) > 0);
FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
assertTrue(fs.listStatus(new Path(rootPath() + "/accumulo/tables/" + id)).length > 0);
to.delete(tableName);
assertEquals(0, FunctionalTestUtils.count(s));
try {
assertEquals(0, fs.listStatus(new Path(rootPath() + "/accumulo/tables/" + id)).length);
} catch (FileNotFoundException ex) {
// that's fine, too
}
assertNull(to.tableIdMap().get(tableName));
to.create(tableName);
TestIngest.ingest(c, opts, new BatchWriterOpts());
VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
to.delete(tableName);
}