Skip to content

[AMORO-1503][Common] Log successful Hive partition mutations - #4444

Open
pallavithegod wants to merge 1 commit into
apache:masterfrom
pallavithegod:fix/amoro-1503-hive-partition-logs
Open

pallavithegod wants to merge 1 commit into
apache:masterfrom
pallavithegod:fix/amoro-1503-hive-partition-logs

Conversation

@pallavithegod

Copy link
Copy Markdown

Why are the changes needed?

Close #1503.

HMSClientImpl delegates partition additions, drops, and alterations without recording the affected table, partition values, or new location. This makes it difficult to trace mixed-Hive partition changes when diagnosing metadata or data-location problems.

Log completed mutations at INFO after the metastore call returns. Failed operations do not emit success messages; a false drop result or a zero-count batch addition is also not reported as a successful change. Existing return values and exception behavior are preserved.

Brief change log

  • Record single and batch partition additions and alterations, including table identity, values, and requested locations.
  • Record successful drops with table identity and partition values.
  • Report the actual batch-add count separately from requested partition details.
  • Add coverage for successful operations, failed additions, and no-op results.

How was this patch tested?

  • Added new unit test cases that verify the changes (TestHMSPartitionLogging).
  • Verified existing unit tests pass locally (TestHiveTableTypeUtil); 10 selected tests passed in total.
  • Tested manually in local environment.

Using Java 11:

  • ./mvnw spotless:apply checkstyle:check passed.
  • ./mvnw test -pl amoro-common -am -Dtest=TestHMSPartitionLogging,TestHiveTableTypeUtil -Dsurefire.failIfNoSpecifiedTests=false passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: Add some info logs for Mixed Hive Table when create/drop partitions or alter partition location

1 participant