Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28857. Fix logging for invalid partition path #5725

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Apr 1, 2025

What changes were proposed in this pull request?

Fix logging for invalid partition path.

Why are the changes needed?

The currently referenced currPath is modified before logging, which makes the warning logs meaningless.

LOG.warn("Cannot create partition spec from " + currPath + "; missing keys " + requiredKeys);
21:15:43.814 pool-1-thread-1-ScalaTest-running-InsertSuite WARN warehouse: Cannot create partition spec from file:/; missing keys [b]

Does this PR introduce any user-facing change?

Minor, the user could see the invalid partition path from logs after this change.

Is the change a dependency upgrade?

No.

How was this patch tested?

Example of logs for invalid partition path.

10:58:14.949 pool-1-thread-1-ScalaTest-running-InsertSuite WARN warehouse: Cannot create partition spec from file:/Users/chengpan/Projects/ne-spark-3.3/target/tmp/warehouse-7c577ad7-5270-430c-b93e-44f8a369aa0f/hive_table/.hive-staging_hive_2025-03-31_19-58-14_723_1019344668587200213-1/-ext-10000/c=15; missing keys [b]

@pan3793
Copy link
Member Author

pan3793 commented Apr 1, 2025

cc @zhangbutao

Copy link

sonarqubecloud bot commented Apr 1, 2025

Copy link
Contributor

@zhangbutao zhangbutao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM
Thanks for the fix.

Copy link
Contributor

@InvisibleProgrammer InvisibleProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. And thank you for using parameterized log message.

@zhangbutao zhangbutao merged commit d703ea1 into apache:master Apr 7, 2025
6 checks passed
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.

4 participants