Post-Upgrade Steps for Hue

After you upgrade HttpFS with the MapR Installer, perform the following steps.

  1. For upgrades to Hue 3.8.1, kill the old Hue processes.
    1. Run the following command to check for Hue processes that are running:
      ps -aux |grep hue
    2. Kill any processes associated with older Hue versions. For example, if any Hue 3.7 process is running, you need to kill that process.
      kill <pid>
  2. Update the hue.ini (/opt/mapr/hue/hue-<latest version>/desktop/conf/hue.ini) file with the following:
    1. Changes that you made to your existing or backed up hue.ini file.
    2. If you have Hive 0.13 installed:
      • Change thrift_version to 5 in the beeswax section.
      • Change use_get_log_api to true in the beeswax section.
  3. If Hue is configured to use the SQLite database, perform the following steps:
    1. If the Hue node runs on Ubuntu, install sqlite3.
      apt-get install sqlite3
    2. Run the following commands:
      cd /opt/mapr/hue/hue-<new_version>/desktop
      
      sudo sqlite3 desktop.db
      
      DELETE FROM django_content_type;
  4. Upload the JSON dump file to the Hue database:
    • For MySQL, PostgreSQL, or Oracle:
      cd /opt/mapr/hue/hue-<new_version>/build/env/bin/source 
      /opt/mapr/hue/hue-<new_version>/build/env/bin/activate
      ./hue loaddata dump-hue-<old_version>.json
    • For SQLite:
      cd /opt/mapr/hue/hue-<new_version>/desktop
      
      mv desktop.db desktop.db.old
      
      sqlite3 desktop.db < ~/dump-hue-<old_version>-sqlite.bak
    For example, run the following commands to upload the Hue 3.8.1 JSON dump file for MySQL into the Hue 3.9.0 installation directory:
    cd /opt/mapr/hue/hue-3.9.0/build/env/bin/source 
    /opt/mapr/hue/hue-3.9.0/build/env/bin/activate 
    ./hue loaddata dump-hue-3.8.1.json
  5. Update the old database schema so that it is compatible with the new upgraded version:
    
    source /opt/mapr/hue/hue-<new_version>/build/env/bin/activate
    /opt/mapr/hue/hue-<new_version>/build/env/bin/hue syncdb --noinput
    
    /opt/mapr/hue/hue-<new_version>/build/env/bin/hue migrate --merge
    For example, run the following commands to update the database schema so that it is compatible with Hue 3.9.0:
    source /opt/mapr/hue/hue-3.9.0/build/env/bin/activate
    /opt/mapr/hue/hue-3.9.0/build/env/bin/hue syncdb --noinput
    /opt/mapr/hue/hue-3.9.0/build/env/bin/hue migrate --merge
  6. If you are using Hadoop MRv1, complete the following steps to establish communication between Hue and the JobTracker processes:
    1. Remove existing Hue plugins from the MapReduce lib directory:
      rm /opt/mapr/hadoop/hadoop-0.20*/lib/hue-plugins-*.jar
    2. Copy new Hue plugins to the MapReduce lib directory:
      cp /opt/mapr/hue/hue-<version>/desktop/libs/hadoop/java-lib/hue-plugins-*.jar /opt/mapr/hadoop/hadoop-0.20*/lib/
      For example, run the following commands to copy the Hue plugin for Hue 3.9.0:
      cp /opt/mapr/hue/hue-3.9.0/desktop/libs/hadoop/java-lib/hue-plugins-*.jar /opt/mapr/hadoop/hadoop-0.20*/lib/
  7. Restart the Hue service:
    maprcli node services -name hue -action restart -nodes <ip_address>