Skip to content

Commit

Permalink
[FLINK-19706][table-runtime] Add WARN logs when hive table partition …
Browse files Browse the repository at this point in the history
…has existed before commit

This closes apache#13716
  • Loading branch information
shouweikun committed Oct 23, 2020
1 parent ae4080c commit 7b04b29
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public void setMetastore(TableMetaStore metaStore) {
@Override
public void commit(Context context) throws Exception {
LinkedHashMap<String, String> partitionSpec = context.partitionSpec();
metaStore.getPartition(partitionSpec).ifPresent(path ->
LOG.warn("The partition {} has existed before current commit," +
" the path is {}, this partition will be altered instead of being created",
partitionSpec, path));
metaStore.createOrAlterPartition(partitionSpec, context.partitionPath());
LOG.info("Committed partition {} to metastore", partitionSpec);
}
Expand Down

0 comments on commit 7b04b29

Please sign in to comment.