4. Upgrade Hive and HCatalog

  1. Upgrade Hive and HCatalog. On the Hive and HCatalog host machines, execute the following command:s

    • For RHEL/CentOS:

      yum upgrade hive hcatalog
                      
    • For SLES:

      zypper update hive hcatalog
                    

  2. On the Hive host machine, edit the /etc/hive/conf/hive-site.xml file and add the following property:

    <property>
       <name>hive.server2.enable.doAs</name>
       <value>true</value>
     </property> 
    <property>
       <name>fs.hdfs.impl.disable.cache</name>
       <value>true</value>
     </property> 

  3. Source the upgrade script. Execute the following command from the Hive Metastore Server:

    cd /usr/lib/hive/scripts/metastore/upgrade/mysql/
     mysql -uhive -phive -h $fully.qualified.domain.name_for_Hive_hostmachine hivemysql> source upgrade-0.9.0-to-0.10.0.mysql.sql 
     

  4. On the Hive host machine, edit /usr/lib/hive/conf/hive-env.sh file and edit the HIVE_AUX_JARS_PATH parameter as shown below:

    export HIVE_AUX_JARS_PATH=/usr/lib/hcatalog/share/hcatalog/hcatalog-core.jar

  5. Start Hive. On the Hive Metastore host machine, execute the following command:

     sudo su -l hive -c "nohup hive --service metastore > $HIVE_LOG_DIR/hive.out 2> $HIVE_LOG_DIR/hive.log &" 
     
                        

    where $HIVE_LOG_DIR is the directory where Hive server logs are stored (example: /var/log/hive).

  6. Start Hive Server2. On the Hive Server2 host machine, execute the following command:

     sudo su -l hive -c "nohup /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=\" \" > $HIVE_LOG_DIR/hiveserver2.out 2> $HIVE_LOG_DIR/hiveserver2.log &" 
                        

    where $HIVE_LOG_DIR is the directory where Hive server logs are stored (example: /var/log/hive).


loading table of contents...