I want to upgrade Hive version from 0.10.0 to higher version in CDH 4.4.0


6 Answer(s)


Hi Harsha,

Hive upgrade is 4 step process-

Step-1: Stop all the services

  • $ sudo service hive-server stop
  • $ sudo service hive-server2 stop
  • $ sudo service hive-metastore stop

Step-2: Install Hive packages

$ sudo yum install hive hive-metastore hive-server hive-server2

Step-3: Upgrade Schema

$ schematool -db type derby -upgradeSchemaFrom 0.10.0

Step-4: Start hive services

  • $ sudo service hive-metastore start
  • $ sudo service hive-server2 start

You can also the refer the following link: http://www.cloudera.com/documentation/archive/cdh/4-x/4-2-0/CDH4-Installation-Guide/cdh4ig_topic_18_2.html

Hope this helps.

Thanks.


[cloudera@localhost ~]$ schematool -db type derby -upgradeSchemaFrom 0.10.0
When i run the above command i got an error:

bash: schematool: command not found


Hi Harsha,

Schematool is part of Hive package itself.

This tool can be used to initialize the metastore schema for the current Hive version. It can also handle upgrading schema from an older version to the current one.

Try the following command to test whether schematool is present
$ schematool -help

Please let me know the output of the command.

Thanks

 


For the below command also same error.

$ schematool -help

bash: schematool: command not found


Hi Harsha,

I forwarded your request to concern faculty. Give me some time to get back to you.

Thanks


Please find the location of "schematool" using "find / -name "schematool" -type f" as a root or sudoer. Once you have the location (it will be located at $HIVE_HOME/bin/schematool), add this $HIVE_HOME/bin to your bashrc file.

Regards,

Sakhuja