Reply
New Contributor
Posts: 2
Registered: ‎08-04-2016

beeswax_queryhistory.is_cleared may not be NULL

try to use hive in HUE but got the following error

 

beeswax_queryhistory.is_cleared may not be NULL

New Contributor
Posts: 2
Registered: ‎08-04-2016

Re: beeswax_queryhistory.is_cleared may not be NULL

check the log, i saw the following,

 

error in <function execute_directly at 0x7fa9ac1706e0>
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/apps/beeswax/src/beeswax/api.py", line 54, in decorator
    return view_fn(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/apps/beeswax/src/beeswax/api.py", line 155, in execute_directly
    history_obj = db.execute_query(query, design)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/apps/beeswax/src/beeswax/server/dbms.py", line 203, in execute_query
    return self.execute_and_watch(query, design=design)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/apps/beeswax/src/beeswax/server/dbms.py", line 631, in execute_and_watch
    query_history.save()
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/apps/beeswax/src/beeswax/models.py", line 189, in save
    super(QueryHistory, self).save(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 687, in _do_insert
    using=using, raw=raw)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/manager.py", line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 1514, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 903, in execute_sql
    cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/sqlite3/base.py", line 452, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: beeswax_queryhistory.is_cleared may not be NULL
New Contributor
Posts: 2
Registered: ‎08-04-2016

Re: beeswax_queryhistory.is_cleared may not be NULL

did you resolved it?

Expert Contributor
Posts: 304
Registered: ‎01-25-2017

Re: beeswax_queryhistory.is_cleared may not be NULL

Anyone who manage to solve it?

Expert Contributor
Posts: 304
Registered: ‎01-25-2017

Re: beeswax_queryhistory.is_cleared may not be NULL

Anyone who manage to solve it?

 
Expert Contributor
Posts: 304
Registered: ‎01-25-2017

Re: beeswax_queryhistory.is_cleared may not be NULL

I managed to solve the issue.

 

For me it was happen after the downgrade of the CDH, This happended on the clusters that used SQLite3 as a database and not mysql, This database is not stable and i don't recommend to use it in production, so to solve the issue i created a db for hue in the mysql server which we are using for oozie and hive, changed the hue configurations to point to the new database and restart the service.

Announcements