Parcourir la source

[oozie] Replace ABFS path in workflow files with full path (#2025)

Ying Chen il y a 4 ans
Parent
commit
c9c885be56
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      apps/oozie/src/oozie/models2.py

+ 7 - 0
apps/oozie/src/oozie/models2.py

@@ -36,6 +36,8 @@ from xml.sax.saxutils import escape
 from django.urls import reverse
 from django.db.models import Q
 
+from azure.abfs.__init__ import abfspath
+
 from desktop.conf import USE_DEFAULT_CONFIGURATION
 from desktop.lib import django_mako
 from desktop.lib.exceptions_renderable import PopupException
@@ -980,6 +982,11 @@ class Node(object):
       self.data['properties']['files'] = files
       self.data['properties']['archives'] = []
 
+    for i, f in enumerate(self.data['properties']['files']):
+      file_path = f['value']
+      if file_path.lower().startswith("abfs"):
+        file_path = abfspath(file_path)
+        self.data['properties']['files'][i] = {'value': file_path}
 
     data = {
       'node': self.data,