Post-Upgrade Steps for Hue
Complete the following steps after you upgrade Hue with or without the Installer:
About this task
Procedure
- To configure the Hue-livy package after upgrading, see Integrate Hue With Spark.
-
Copy the changes that you made for required services in your existing
hue.inifile into the latest version of the file:/opt/mapr/hue/hue-<version>/desktop/conf/hue.iniNOTEHue 3.9 uses the old Query editor to work with Hive and Impala queries, and introduces new Spark Notebooks. Hue 3.10+ uses Notebooks as a replacement for the old Query editor for Hive and Impala. If you are upgrading to Hue 3.10+, and you want to have access to your saved queries in the old Hive or Impala Query editor, you need to configure Hue to use the old Query editor. To do this, set theuse_new_editorproperty in thehue.inifile tofalse. For example:[desktop] ... # Choose whether to show the new SQL editor. use_new_editor=false -
If you use SQLite as the Hue database, load its backup:
-
If the Hue node runs on Ubuntu, install sqlite3:
apt-get install sqlite3 -
Run the following commands:
cd /opt/mapr/hue/hue-<new_version>/desktop mv desktop.db desktop.db.old sqlite3 desktop.db < ~/dump-hue-<old_version>-sqlite.bak sqlite3 desktop.db DELETE FROM django_content_type;
-
If the Hue node runs on Ubuntu, install sqlite3:
-
Update the old database schema so that it is compatible with the new upgraded
version:
-
For Hue 4.3+:
source /opt/mapr/hue/hue-<new_version>/bin/activate hue migrate --run-syncdb --fake-initial deactivateFor example, run the following commands to update the database schema to make it compatible with Hue 4.3+:
source /opt/mapr/hue/hue-4.3.0/bin/activate hue migrate --run-syncdb --fake-initial deactivate -
For Hue version up to Hue 4.2:
source /opt/mapr/hue/hue-<new_version>/bin/activate hue syncdb --noinput hue migrate --merge deactivateFor example, run the following commands to update the database schema to make it compatible with Hue 4.2:
source /opt/mapr/hue/hue-4.2.0/bin/activate hue syncdb --noinput hue migrate --merge deactivate
If you are using MySQL, PostgreSQL, or Oracle, and you have trouble with the database during the Hue upgrade, you can restore your data from the backup that you created during the Pre-Upgrade Steps for Hue:source /opt/mapr/hue/hue-<new_version>/bin/activate hue loaddata --ignorenonexistent ~/dump-hue-<old_version>.json deactivate
-
For Hue 4.3+:
-
For upgrades performed without the Installer: If you are using Hadoop MRv1, complete the following
steps to establish communication between Hue and the JobTracker processes:
-
Remove existing Hue plugins from the MapReduce lib directory:
rm /opt/mapr/hadoop/hadoop-0.20*/lib/hue-plugins-*.jar -
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.10+:cp /opt/mapr/hue/hue-3.10.0/desktop/libs/hadoop/java-lib/hue-plugins-*.jar /opt/mapr/hadoop/hadoop-0.20*/lib/ -
Restart the JobTracker services:
maprcli node services -jobtracker restart -nodes <ip_addresses>
-
Remove existing Hue plugins from the MapReduce lib directory:
-
Run
configure.sh -R:/opt/mapr/server/configure.sh -RIf you do not complete this step, Hue may fail to start and the Control System may still display references to the Hue version that you upgraded from.
-
Restart the Hue service:
maprcli node services -name hue -action restart -nodes <ip_address>