After upgrade to CDH5.8.x and above from earlier CDH versions , Hue documents conversion failures

0 votes
7 views
asked Aug 30, 2017 in Hadoop by admin (4,410 points)
SummaryThis article may help if users start to notice various issues with Hue query editor right after a CDH upgrade from earlier versions to CDH5.8.x and above.
Applies To
  • CDH5.8+
  • Hue
Symptoms

After upgrading CDH to 5.8.x and later CDH versions, users can see following errors related to documents conversion:

  1. Missing saved queries and query histories
  2. Noticing error message from Hue query editor:
  • Cannot execute any Hive query: 'NoneType' object has no attribute 'update_data'
  • "get() returned more than one Document2 -- it returned 2!"
  1. Noticing below error messages in Hue role server log (/var/log/hue/runcpserver.log):
  • Failed to convert and import documents: Document <name>
  • MultipleObjectsReturned: get() returned more than one Document2 -- it returned <#>!

Cause

Because some of Hue table structure changes, after upgrading to CDH5.8 and above, data will be migrated from old tables to new tables. During this process, things may fail due to below various reasons:

  • Saved query or query history entry had invalid characters that failed the conversion.
  • Multiple Home and .Trash directories created after upgrading.
  • Hue code issue to handle migration of certain documents during upgrade
Instructions

IMPORTANT:
- Make sure to run the steps in the giving sequence.
- Make sure to backup Hue database before proceeding the steps.

  1. ​Run the cleanup duplicate home directory and .Trash folder script documented in this kb article:

Cleaning Multiple Documents Error in Hue

  1. Run the migration script steps documented in this kb article:

Missing query history and saved queries after upgrade to 5.8

Please log in or register to answer this question.

...