hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carter Shanklin (JIRA)" <>
Subject [jira] [Commented] (HIVE-16944) schematool -dbType hive should give some more feedback/assistance
Date Thu, 22 Jun 2017 15:44:01 GMT


Carter Shanklin commented on HIVE-16944:

The dbType hive is specifically for the new INFORMATION_SCHEMA introduced in HIVE-1010

metaDbType only comes into play if you specify dbType of hive.

In this case the metatool is trying to connect to Hive as a JDBC target and create 2 databases
+ a number of tables within them, which is why the HS2 endpoint and driver class are needed.
Although personally I don't see why it can't just hard code org.apache.hive.jdbc.HiveDriver,
but that is a minor point.

> schematool -dbType hive should give some more feedback/assistance
> -----------------------------------------------------------------
>                 Key: HIVE-16944
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Carter Shanklin
> Given the other ways schematool is used, the most obvious guess I would have for initializing
the Hive schema is:
> {code}
> schematool -metaDbType mysql -dbType hive -initSchema
> {code}
> Unfortunately that fails with this NPE:
> {code}
> Exception in thread "main" java.lang.NullPointerException
> 	at
> 	at
> 	at
> 	at$HiveCommandParser.<init>(
> 	at
> 	at org.apache.hive.beeline.HiveSchemaTool.getDbCommandParser(
> 	at org.apache.hive.beeline.HiveSchemaTool.<init>(
> 	at org.apache.hive.beeline.HiveSchemaTool.<init>(
> 	at org.apache.hive.beeline.HiveSchemaTool.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at
> 	at org.apache.hadoop.util.RunJar.main(
> {code}
> Two additional arguments are needed:
> -url jdbc:hive2://localhost:10000/default -driver org.apache.hive.jdbc.HiveDriver
> If the user does not supply these for dbType hive, schematool should detect and error
out appropriately, plus give an example of what it's looking for.

This message was sent by Atlassian JIRA

View raw message