class AvroSerDeTransformation {

  Table apply(Table table, String avroSchemaDestination, String eventId) throws Exception {
    if (avroSchemaDestination == null) {
      return table;
    }

    avroSchemaDestination = addTrailingSlash(avroSchemaDestination);
    avroSchemaDestination += eventId;

    String avroSchemaSource = table.getParameters().get(AVRO_SCHEMA_URL_PARAMETER);
    copy(avroSchemaSource, avroSchemaDestination);

    table.putToParameters(AVRO_SCHEMA_URL_PARAMETER,
        avroSchemaDestination + "/" + getAvroSchemaFileName(avroSchemaSource));
    LOG.info("Avro SerDe transformation has been applied to table '{}'", table.getTableName());
    return table;
  }

  @Autowired  AvroSerDeTransformation(HiveConf sourceHiveConf, HiveConf replicaHiveConf);

}