فهرست منبع

HUE-2512 [impala] Fix installing Impala examples when tables already exist

This fixes an InstallException raised when installing
impala examples after hive examples are installed
by properly checking if the sample table already exists
in impala.
Peter Slawski 11 سال پیش
والد
کامیت
3d514dc
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py

+ 2 - 0
apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py

@@ -132,6 +132,8 @@ class SampleTable(object):
 
     try:
       # Already exists?
+      if self.app_name == 'impala':
+        db.execute_statement('INVALIDATE METADATA %s;' % (self.name,))
       db.get_table('default', self.name)
       msg = _('Table "%(table)s" already exists.') % {'table': self.name}
       LOG.error(msg)