Эх сурвалжийг харах

HUE-8880 [oozie] Fix KeyError when execute coordinator

(cherry picked from commit fa59b5109bb1958c2f9e6df81b2e02a4c9690e70)

Change-Id: Ie122cdb6985f9172d6d7e9029cc11e9327451793
Ying Chen 6 жил өмнө
parent
commit
ffd311bd11

+ 3 - 3
apps/oozie/src/oozie/templates/editor2/gen/coordinator.xml.mako

@@ -60,15 +60,15 @@
   start="${ coord.start_server_tz }" end="${ coord.end_server_tz }" timezone="${ coord.data['properties']['timezone'] }"
   xmlns="${ 'uri:oozie:coordinator:0.4' if coord.sla_enabled else coord.data['properties']['schema_version'] | n,unicode }"
   ${ 'xmlns:sla="uri:oozie:sla:0.2"' if coord.sla_enabled else '' | n,unicode }>
-  % if coord.data['properties']['timeout'] or coord.data['properties'].get('concurrency') or coord.data['properties']['execution'] or coord.data['properties'].get('throttle'):
+  % if coord.data['properties'].get('timeout') or coord.data['properties'].get('concurrency') or coord.data['properties'].get('execution') or coord.data['properties'].get('throttle'):
   <controls>
-    % if coord.data['properties']['timeout']:
+    % if coord.data['properties'].get('timeout'):
     <timeout>${ coord.data['properties']['timeout'] }</timeout>
     % endif
     % if coord.data['properties'].get('concurrency'):
     <concurrency>${ coord.data['properties']['concurrency'] }</concurrency>
     % endif
-    % if coord.data['properties']['execution']:
+    % if coord.data['properties'].get('execution'):
     <execution>${ coord.data['properties']['execution'] }</execution>
     % endif
     % if coord.data['properties'].get('throttle'):