class Replica extends HiveEndpoint {

  public void cleanupReplicaTableIfRequired(
      String replicaDatabaseName,
      String replicaTableName,
      DataManipulator dataManipulator)
    throws Exception {
    if (replicationMode == FULL_OVERWRITE) {
      LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table.");
      try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) {
        DropTableService dropTableService = new DropTableService();
        dropTableService.dropTableAndData(client, replicaDatabaseName, replicaTableName, dataManipulator);
      }
    }
  }

    Replica(
      ReplicaCatalog replicaCatalog,
      HiveConf replicaHiveConf,
      Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier,
      ReplicaTableFactory replicaTableFactory,
      HousekeepingListener housekeepingListener,
      ReplicaCatalogListener replicaCatalogListener,
      TableReplication tableReplication,
      AlterTableService alterTableService);
  @VisibleForTesting  Replica(
      ReplicaCatalog replicaCatalog,
      HiveConf replicaHiveConf,
      Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier,
      ReplicaTableFactory replicaTableFactory,
      HousekeepingListener housekeepingListener,
      ReplicaCatalogListener replicaCatalogListener,
      TableReplication tableReplication,
      AlterTableService alterTableService,
      int partitionBatchSize);

}