浏览代码

HUE-6586 [sqoop] Strip sqoop if present in beginning of command

Romain Rigaux 8 年之前
父节点
当前提交
9ea0e19
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      apps/oozie/src/oozie/models2.py

+ 6 - 1
apps/oozie/src/oozie/models2.py

@@ -813,7 +813,12 @@ class Node():
       action = notebook.get_data()['snippets'][0]
 
       name = '%s-%s' % (self.data['type'].split('-')[0], self.data['id'][:4])
-      self.data['properties']['command'] = action['statement']
+
+      command = action['statement']
+      if command.startswith('sqoop '):
+        _ignore, command = command.split('sqoop ', 1)
+      self.data['properties']['command'] = command
+
       self.data['properties']['arguments'] = []
 
     elif self.data['type'] == DistCpDocumentAction.TYPE: