This is documentation for MapR Version 5.0. You can also refer to MapR documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

If you installed Hue with the MapR Installer, use the latest version of the MapR Installer to perform the upgrade. 

To upgrade Hue installations to version 3.7 or , 3.8.1, complete or 3.9, complete the following steps as steps as a user with admin permissions:

Info
MapR does not recommend using the default SQLite database for Hue installations. These instructions assume that you are using a MySQL, Oracle, or PostgreSQL database.
  1. If you have modified the configuration files in your current installation of Hue and you want to apply those changes to the updated version, create a backup of the configuration files in a location outside of the MapR installation directory. Configuration properties are located in /opt/mapr/hue/hue-<version>/desktop/conf/.
     

  2. Stop the Hue service.

    Code Block
    maprcli node services -name hue -action stop -nodes <ip_address>
  3. Create a Hue database dump as a JSON object:

    Expandcode
    titleRun the following commands for upgrades from 3.5 to 3.7...For MySQL, PostgreSQL, or Oracle
    cd /opt/mapr/hue/hue-3.5.0<version>/build/env/bin/
    source /opt/mapr/hue/hue-3.5.0<version>/build/env/bin/activate
    ./hue dumpdata > dump-hue-3<version>.5.0.json
    Expandcode
    titleRun the following commands for upgrades from 3.6 to 3.7...For SQLite
    cd /opt/mapr/hue/hue-<version>/desktop
    sqlite3 desktop.db .dump > ~/dump-hue-<version>-sqlite.bak
  4. Install Hue:

    Code Block
    apt-get install mapr-hue (Ubuntu)
    yum install mapr-hue (CentOS)


  5. Copy the changes that you made for required services in your existing hue.ini file into the latest version of the file (/opt/mapr/hue/hue-<version>/desktop/conf/hue.ini).

  6. If Hue is configured to use the SQLite database, perform the following steps:

    1. If the Hue node runs on Ubuntu, install sqlite3.

      Code Block
      apt-get install sqlite3
    2. Run the following commands:

      Code Block
      cd /opt/mapr/hue/hue-
    3.6.0/
    1. <new_version>/desktop
      sudo sqlite3 desktop.db
      DELETE FROM django_content_type;
  7.  Upload the JSON dump file to the Hue database:

    Code Block
    titleFor MySQL, PostgreSQL, or Oracle
    cd /opt/mapr/hue/hue-<new_version>/build/env/bin/
    source /opt/mapr/hue/hue-3.6.0<new_version>/build/env/bin/activate
    ./hue dumpdataloaddata > dump-hue-3.6.0.<old_version>.json
    Expandcode
    titleRun the following commands for upgrades from 3.7 to 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: 

    Code Block
    cd /opt/mapr/hue/hue-3.79.0/build/env/bin/
    source /opt/mapr/hue/hue-3.79.0/build/env/bin/activate
    activate  ./hue dumpdataloaddata > dump-hue-3.78.01.json

    Install Hue:

    Code Block
    apt-get install mapr-hue (Ubuntu)
    yum install mapr-hue (CentOS)


  8. Copy the changes that you made for required services in your existing hue.ini file into the latest version of the file (/opt/mapr/hue/hue-<version>/desktop/conf/hue.ini).
    Update the old database schema so that it is compatible with the new upgraded version:

    Run
    Expand
    titleRun the following commands for upgrades to 3.7...
    Code Block
    title
    source /opt/mapr/hue/hue-
    3.7.0
    <new_version>/build/env/bin/activate
    /opt/mapr/hue/hue-
    3.7.0
    <new_version>/build/env/bin/hue syncdb --noinput
    /opt/mapr/hue/hue-
    3.7.0
    <new_version>/build/env/bin/hue migrate
    Expand
     --merge

    For example, run the following commands

    for upgrades to

    to update the database schema so that it is compatible with Hue 3.

    8.1...

    9.0:

    Code Block
    source /opt/mapr/hue/hue-3.
    8
    9.
    1
    0/build/env/bin/activate
    /opt/mapr/hue/hue-3.
    8
    9.
    1
    0/build/env/bin/hue syncdb --noinput
    /opt/mapr/hue/hue-3.
    8
    9.
    1
    0/build/env/bin/hue migrate --merge
  9. If you are using Hadoop MRv1, complete the following steps to establish communication between Hue and the JobTracker processes:

    If you are using Hadoop MRv1, restart the
    1. Remove existing Hue plugins from the MapReduce lib directory:

      Code Block
      rm /opt/mapr/hadoop/hadoop-0.20*/lib/hue-plugins-*.jar

       

    2. Copy new Hue plugins to the MapReduce lib directory: 

      Expand
      titleRun the following commands for upgrades to 3.7...
      Code Block
      cp /opt/mapr/hue/hue-
      3.7.0
      <new_version>/desktop/libs/hadoop/java-lib/hue-plugins-*.jar /opt/mapr/hadoop/hadoop-0.20*/lib/
      Expand
      titleRun the following commands for upgrades to 3.8.1...
      Code Block
      cp /opt/mapr/hue/hue-3.8.1/desktop/libs/hadoop/java-lib/hue-plugins-*.jar /opt/mapr/hadoop/hadoop-0.20*/lib/
  10. Upload the JSON dump file to the Hue database:

    Expand
    titleRun the following commands for upgrades from 3.5 to 3.7...
    cd /opt/mapr/hue/hue-3.7.0/build/env/bin/
    source /opt/mapr/hue/hue-3.7.0/build/env/bin/activate

    ./hue loaddata dump-hue-3.5.0.json
    Expand
    titleRun the following commands for upgrades from 3.6 to 3.7...

    cd /opt/mapr/hue/hue-3.7.0/build/env/bin/
    source /opt/mapr/hue/hue-3.7.0/build/env/bin/activate 
    ./hue loaddata dump-hue-3.6.0.json

    Expand
    titleRun the following commands for upgrades from 3.7 to 3.8.1...

    cd /opt/mapr/hue/hue-3.8.1/build/env/bin/
    source /opt/mapr/hue/hue-3.8.1/build/env/bin/activate 

    ./hue loaddata dump-hue-3.7.0.json
    1. Restart the JobTracker services:

      Code Block
      maprcli node services -jobtracker restart -nodes <ip_addresses>

     

  11. Start the Hue service:

    Code Block
    maprcli node services -name hue -action start -nodes <ip_address>