kafka-connect-hdfs icon indicating copy to clipboard operation
kafka-connect-hdfs copied to clipboard

HDFS sink does not support Hive ALTER TABLE CASCADE

Open ericjin527 opened this issue 5 years ago • 0 comments

in both AvroUtils.java and ParquetUtils.java. the alterTable are called with only "table" parameter. we need to support "Cascade" due to table schema evolution.

  @Override
  public void alterSchema(
      String database,
      String tableName,
      Schema schema
  ) throws HiveMetaStoreException {
    Table table = hiveMetaStore.getTable(database, tableName);
    table.getParameters().put(AVRO_SCHEMA_LITERAL, avroData.fromConnectSchema(schema).toString());
    hiveMetaStore.alterTable(table);
  }

ericjin527 avatar Jun 24 '19 18:06 ericjin527