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

Identify Table Location Missing HDFS Schema #55

Open
wenclr opened this issue Jul 23, 2024 · 1 comment
Open

Identify Table Location Missing HDFS Schema #55

wenclr opened this issue Jul 23, 2024 · 1 comment

Comments

@wenclr
Copy link

wenclr commented Jul 23, 2024

Some Hive tables in CDH5 clusters with absolute path, such as "/user/hive/warehouse/mytable", in the location property would got "Validate Hive Metastore Schema" error while upgrading to CDP7.1.7.

https://my.cloudera.com/knowledge/Failed-to-Validate-Hive-Metastore-Schema?id=76056
The message "Error: missing location scheme" is a warning that the table/partition location has been created without specifying the scheme of the location, like s3a://mybucket or hdfs://nameservice1. To make it unambiguous, it is advised to fix these locations to include the missing prefix ("hdfs://nameservice1" - cluster specific for example, if the table is on hdfs).

Following SQL would fix individual tables during the upgrading process. But ideally, we'd like to use hive-sre tool to identify and fix these before kicking off the upgrade to reduce the downtime.
ALTER TABLE table_name SET LOCATION 'hdfs://nameservice1/user/hive/warehouse/mytable';

@wenclr
Copy link
Author

wenclr commented Jul 24, 2024

I think this is similar to #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant