Details
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