class DestructiveReplica {

  public void dropTable() throws TException {
    try {
      try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) {
        if (!client.tableExists(databaseName, tableName)) {
          return;
        }
        dropAndDeletePartitions(client, Predicates.<String> alwaysTrue());
        Table table = client.getTable(databaseName, tableName);
        log.info("Dropping replica table: " + databaseName + "." + tableName);
        client.dropTable(databaseName, tableName, DELETE_DATA, IGNORE_UNKNOWN);
        Path oldLocation = locationAsPath(table);
        String oldEventId = table.getParameters().get(REPLICATION_EVENT.parameterName());
        cleanupLocationManager.addCleanupLocation(oldEventId, oldLocation);
      }
    } finally {
      cleanupLocationManager.scheduleLocations();
    }
  }

  public  DestructiveReplica(
      Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier,
      CleanupLocationManager cleanupLocationManager,
      TableReplication tableReplication);

}