Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-822

[oozie] Prepare statement should follow fs action convention

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: con.oozie
    • Labels:
      None
    • Target Version:
    • Easy:
      Easy

      Description

      In prepares() of workflow.common.xml:

      Algo (still problems if a variable is used for a path):

                  <prepare>
                      % for p in prepares:
                        <%
                          operation = p['type']
                          path = p['value']
                          
                          if not path.startswith('/'):                    
                            path = '/user/%(username)s/%(path)s' % {'username': '${wf:name()}', 'path': path}
                            
                          if not path.startswith('hdfs://'):
                            path = '%(nameNode)s%(path)s' % {'nameNode': '${nameNode}', 'path': path}          
                        %>
                        
                        <${ operation } path="${ path }"/>
                      % endfor
                  </prepare>
      

      or

      if path.startswith 'hdfs://':
        return path
      elif not path.startswith '/':
        return '${nameNode}' + path
      else:
        return '${nameNode}' + '/user/' + ${wf:name()} + '/' + path
      

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              romain Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: