kafka-connect-hdfs
kafka-connect-hdfs copied to clipboard
HDFS sink does not support Hive ALTER TABLE CASCADE
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);
}