浏览代码

HUE-2716 [pig] Scripts fail on hcat auth with org.apache.hive.hcatalog.pig.HCatLoader()

Fix for HUE-2716, updating use_hcatalog() in pig's models.py to set hcat credentials
for org.apache.hive.hcatalog.pig.HCatLoader and HCatStorer, in addition to the
soon-to-be-deprecated api's org.apache.hcatalog.pig.HCatLoader and HCatStorer.
Rick Bernotas 10 年之前
父节点
当前提交
0ce7628
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/pig/src/pig/models.py

+ 2 - 2
apps/pig/src/pig/models.py

@@ -81,8 +81,8 @@ class PigScript(Document):
   @property
   @property
   def use_hcatalog(self):
   def use_hcatalog(self):
     script = self.dict['script']
     script = self.dict['script']
-    return 'org.apache.hcatalog.pig.HCatStorer' in script or 'org.apache.hcatalog.pig.HCatLoader' in script
-
+    return ('org.apache.hcatalog.pig.HCatStorer' in script or 'org.apache.hcatalog.pig.HCatLoader' in script) or \ # Deprecated
+    ('org.apache.hive.hcatalog.pig.HCatLoader' in script or 'org.apache.hive.hcatalog.pig.HCatStorer' in script)
 
 
 def create_or_update_script(id, name, script, user, parameters, resources, hadoopProperties, is_design=True):
 def create_or_update_script(id, name, script, user, parameters, resources, hadoopProperties, is_design=True):
   try:
   try: