HUE-8717 [oozie] Fix Sqoop1 editor fail to execute

Review Request #13663 - Created Feb. 28, 2019 and updated

Ying Chen
hue
master
HUE-8717
hue
jgauthier, johan, romain, weixia
commit 8d4c19571c969d535687bdfc1b83053f96bd5571 (HEAD -> master)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Thu Feb 28 17:46:00 2019 -0800

    HUE-8717 [oozie] Fix Sqoop1 editor fail to execute

:100644 100644 2b539d32c8... 528e765b45... M    desktop/libs/liboozie/src/liboozie/submission2.py
Tested with combination of 
1. Sqoop workflow with '--hive-import' in statement 
2. Sqoop workflow without '--hive-import' in statement 
3. Sqoop editor with '--hive-import' in statement 
4. Sqoop editor without '--hive-import' in statement
  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
  1. 
      
  2. Should we "or" with proper parenthesis?

    Firs one is for
    action.data['type'] in == 'spark'
    second one
    action.data['type'] in 'spark-document'

    e.g.
    ...
    and ('command' in action.data['properties'] and '--hive-import' in action.data['properties']['command'] ) or self._check_sqoop1_editor_statement(action))

  3. 
      
  1. 
      
  2. nit: '--hive-import' in action.data['properties'].get('command', '')

  3. Just FYI
    
    any('--hive-import' in cmd for cmd in [action.data['properties']['command'], self._check_sqoop1_editor_statement(action)))
  4. Maybe just that?

  5. 
      
  1. Nice!

  2. nit: (if we want only one return)

    statement = ''

    if ...
    statement = ...
    ...

    return '--hive-import' in statement

  3. 
      
Review request changed

Description:

~  

commit b880ec6e57c46b0979256925d561faec3bc28ecc (HEAD -> master)

  ~

commit 8d4c19571c969d535687bdfc1b83053f96bd5571 (HEAD -> master)

    Author: Ying Chen yingchen@cloudera.com
    Date: Thu Feb 28 17:46:00 2019 -0800

   
   
HUE-8717 [oozie] Fix Sqoop1 editor fail to execute
   
~  

:100644 100644 2b539d32c8... eba9fa27eb... M desktop/libs/liboozie/src/liboozie/submission2.py

  ~

:100644 100644 2b539d32c8... 528e765b45... M desktop/libs/liboozie/src/liboozie/submission2.py

Diff:

Revision 4 (+10 -2)

Show changes

Loading...