This is an automated email from the ASF dual-hosted git repository. sivabalan pushed a commit to branch release-0.12.2-shadow in repository https://gitbox.apache.org/repos/asf/hudi.git
commit ed989b6ef4317553ff891f21ff6c7be636cf7772 Author: Nicolas Paris <[email protected]> AuthorDate: Wed Dec 7 14:00:56 2022 +0100 [HUDI-4764] AWS GlueSync turn partition already exist error into warning (#6505) --- .../java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java b/hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java index d9c4ecd96af..d0adbc9489a 100644 --- a/hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java +++ b/hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java @@ -138,8 +138,12 @@ public class AWSGlueCatalogSyncClient extends HoodieSyncClient { BatchCreatePartitionResult result = awsGlue.batchCreatePartition(request); if (CollectionUtils.nonEmpty(result.getErrors())) { - throw new HoodieGlueSyncException("Fail to add partitions to " + tableId(databaseName, tableName) + if (result.getErrors().stream().allMatch((error) -> "AlreadyExistsException".equals(error.getErrorDetail().getErrorCode()))) { + LOG.warn("Partitions already exist in glue: " + result.getErrors()); + } else { + throw new HoodieGlueSyncException("Fail to add partitions to " + tableId(databaseName, tableName) + " with error(s): " + result.getErrors()); + } } Thread.sleep(BATCH_REQUEST_SLEEP_MILLIS); }
