You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "sbernauer (via GitHub)" <gi...@apache.org> on 2024/08/29 06:33:36 UTC
[PR] HIVE-21298: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
sbernauer opened a new pull request, #5419:
URL: https://github.com/apache/hive/pull/5419
In a94c0306f48215d96be3b842525c4341772d26f9 `MetastoreSchemaTool` was moved from `org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool` to `org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool`, but it seems like `schemaTool.sh` was not updated.
This results in a `ClassNotFoundException: org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool`
### What changes were proposed in this pull request?
Update outdated class reference to actual one.
### Why are the changes needed?
Let `schemaTool.sh` work again :)
### Does this PR introduce _any_ user-facing change?
Yes, the shell script now works. See "How was this patch tested?" for the CLI output.
### Is the change a dependency upgrade?
No
### How was this patch tested?
Before (fails)
```bash
/stackable/apache-hive-metastore-4.0.0-bin $ bin/base --service schemaTool
Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.apache.hadoop.util.RunJar.run(RunJar.java:321)
at org.apache.hadoop.util.RunJar.main(RunJar.java:241)
```
After (works)
```bash
/stackable/apache-hive-metastore-4.0.0-bin $ bin/base --service schemaTool
# [...]
Failed to parse command line.
org.apache.commons.cli.ParseException: HiveSchemaTool:Parsing failed. Reason: Missing required options: [-help print this message, -info Show config and schema details, -upgradeSchema Schema upgrade, -upgradeSchemaFrom Schema upgrade from a version, -initSchema Schema initialization, -dropAllDatabases Drop all Hive databases (with CASCADE). This will remove all managed data!, -initSchemaTo Schema initialization to a version, -initOrUpgradeSchema Initialize or upgrade schema to latest version, -validate Validate the database, -createCatalog Create a catalog, requires --catalogLocation parameter as well, -alterCatalog Alter a catalog, requires --catalogLocation and/or --catalogDescription parameter as well, -mergeCatalog Merge databases from a catalog into other, Argument is the source catalog name Requires --toCatalog to indicate the destination catalog, -moveDatabase Move a database between catalogs. Argument is the database name. Requires --fromCatalog and --toCatalog parameters
as well, -moveTable Move a table to a different database. Argument is the table name. Requires --fromCatalog, --toCatalog, --fromDatabase, and --toDatabase parameters as well., -createUser Create the Hive user, set hiveUser to the db admin user and the hive password to the db admin password with this, -createLogsTable Create table for Hive warehouse/compute logs], dbType
Underlying cause: org.apache.commons.cli.ParseException : HiveSchemaTool:Parsing failed. Reason: Missing required options: [-help print this message, -info Show config and schema details, -upgradeSchema Schema upgrade, -upgradeSchemaFrom Schema upgrade from a version, -initSchema Schema initialization, -dropAllDatabases Drop all Hive databases (with CASCADE). This will remove all managed data!, -initSchemaTo Schema initialization to a version, -initOrUpgradeSchema Initialize or upgrade schema to latest version, -validate Validate the database, -createCatalog Create a catalog, requires --catalogLocation parameter as well, -alterCatalog Alter a catalog, requires --catalogLocation and/or --catalogDescription parameter as well, -mergeCatalog Merge databases from a catalog into other, Argument is the source catalog name Requires --toCatalog to indicate the destination catalog, -moveDatabase Move a database between catalogs. Argument is the database name. Requires --fromCatalog and --t
oCatalog parameters as well, -moveTable Move a table to a different database. Argument is the table name. Requires --fromCatalog, --toCatalog, --fromDatabase, and --toDatabase parameters as well., -createUser Create the Hive user, set hiveUser to the db admin user and the hive password to the db admin password with this, -createLogsTable Create table for Hive warehouse/compute logs], dbType
*** schemaTool failed ***
```
CC @miklosgergely and @ashutoshc, as you did the original refactoring
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-28487: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn merged PR #5419:
URL: https://github.com/apache/hive/pull/5419
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-28487: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "sbernauer (via GitHub)" <gi...@apache.org>.
sbernauer commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2317272774
@ayushtkn sure thing, created https://issues.apache.org/jira/browse/HIVE-28487 and update PR title + commit message
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-28487: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2320880566
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-28487: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2317870703
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-21298: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2317131750
Please create a new ticket rather than using the old ticket, just link the old ticket in that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-28487: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2319750940
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-21298: Fix outdated MetastoreSchemaTool class reference in schemaTool.sh [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5419:
URL: https://github.com/apache/hive/pull/5419#issuecomment-2316928270
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5419&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5419&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5419&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5419)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org