Upgrade Hue
About this task
NOTE: If you installed Hue with the MapR Installer, use the
latest version of the MapR Installer
to perform the upgrade.
Procedure
-
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/
. -
Stop the Hue service.
maprcli node services -name hue -action stop -nodes <ip_address>
-
Create a Hue database dump as a JSON object:
- For MySQL, PostgreSQL, or Oracle
cd /opt/mapr/hue/hue-<version>/build/env/bin/ source /opt/mapr/hue/hue-<version>/build/env/bin/activate ./hue dumpdata > dump-hue-<version>.json
- For SQLite
cd /opt/mapr/hue/hue-<version>/desktop sqlite3 desktop.db .dump > ~/dump-hue-<version>-sqlite.bak
-
Upgrade Hue packages:
- On Ubuntu:
apt-get install mapr-hue-base mapr-hue
- On
RedHat/CentOS:
yum upgrade mapr-hue-base mapr-hue
- On Ubuntu:
-
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
-
If Hue is configured to use the SQLite database, perform the following steps:
-
If Hue is installed on CentOS/RedHat 7.x nodes, complete the following steps:
-
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
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
-
Update the old database schema so that it is compatible with the new upgraded
version:
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-<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
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
-
If you are using Hadoop MRv1, complete the following steps to establish communication
between Hue and the JobTracker processes:
-
Start the Hue service:
maprcli node services -name hue -action start -nodes <ip_address>