Browse Source

[oozie] Disable Decision node

Fix coordinator display of the graph of its workflows
Fix path of jar file in example
Fix i18n automatic string extraction for oozie app
Romain Rigaux 13 năm trước cách đây
mục cha
commit
57936d4086

+ 11 - 10
apps/Makefile

@@ -31,15 +31,15 @@ default: env-install
 .PHONY: clean default distclean install
 .PHONY: clean default distclean install
 
 
 APPS := about \
 APPS := about \
-	beeswax \
-	filebrowser \
-	help \
-	jobbrowser \
-	jobsub \
-        oozie \
-	proxy \
-        shell \
-	useradmin
+  beeswax \
+  filebrowser \
+  help \
+  jobbrowser \
+  jobsub \
+  oozie \
+  proxy \
+  shell \
+  useradmin
 
 
 ################################################
 ################################################
 # Install all applications into the Desktop environment
 # Install all applications into the Desktop environment
@@ -106,7 +106,8 @@ I18N_APPS := about \
   jobbrowser \
   jobbrowser \
   jobsub \
   jobsub \
   shell \
   shell \
-  useradmin
+  useradmin \
+  oozie
 
 
 COMPILE_LOCALE_TARGETS := $(I18N_APPS:%=.recursive-compile-locales/%)
 COMPILE_LOCALE_TARGETS := $(I18N_APPS:%=.recursive-compile-locales/%)
 compile-locales: $(COMPILE_LOCALE_TARGETS)
 compile-locales: $(COMPILE_LOCALE_TARGETS)

+ 1 - 1
apps/oozie/src/oozie/fixtures/initial_data.json

@@ -120,7 +120,7 @@
     "fields": {
     "fields": {
       "files": "[]",
       "files": "[]",
       "job_properties": "[{\"name\":\"mapred.reduce.tasks\",\"value\":\"1\"},{\"name\":\"mapred.mapper.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.reducer.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.mapoutput.key.class\",\"value\":\"org.apache.hadoop.io.IntWritable\"},{\"name\":\"mapred.mapoutput.value.class\",\"value\":\"org.apache.hadoop.io.NullWritable\"},{\"name\":\"mapred.output.format.class\",\"value\":\"org.apache.hadoop.mapred.lib.NullOutputFormat\"},{\"name\":\"mapred.input.format.class\",\"value\":\"org.apache.hadoop.examples.SleepJob$SleepInputFormat\"},{\"name\":\"mapred.partitioner.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.speculative.execution\",\"value\":\"false\"},{\"name\":\"sleep.job.map.sleep.time\",\"value\":\"0\"},{\"name\":\"sleep.job.reduce.sleep.time\",\"value\":\"${REDUCER_SLEEP_TIME}\"}]",
       "job_properties": "[{\"name\":\"mapred.reduce.tasks\",\"value\":\"1\"},{\"name\":\"mapred.mapper.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.reducer.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.mapoutput.key.class\",\"value\":\"org.apache.hadoop.io.IntWritable\"},{\"name\":\"mapred.mapoutput.value.class\",\"value\":\"org.apache.hadoop.io.NullWritable\"},{\"name\":\"mapred.output.format.class\",\"value\":\"org.apache.hadoop.mapred.lib.NullOutputFormat\"},{\"name\":\"mapred.input.format.class\",\"value\":\"org.apache.hadoop.examples.SleepJob$SleepInputFormat\"},{\"name\":\"mapred.partitioner.class\",\"value\":\"org.apache.hadoop.examples.SleepJob\"},{\"name\":\"mapred.speculative.execution\",\"value\":\"false\"},{\"name\":\"sleep.job.map.sleep.time\",\"value\":\"0\"},{\"name\":\"sleep.job.reduce.sleep.time\",\"value\":\"${REDUCER_SLEEP_TIME}\"}]",
-      "jar_path": "/user/hue/oozie/demo/lib/hadoop-examples.jar",
+      "jar_path": "/user/hue/oozie/examples/lib/hadoop-examples.jar",
       "archives": "[]",
       "archives": "[]",
       "node_ptr": 19
       "node_ptr": 19
     }
     }

+ 2 - 1
apps/oozie/src/oozie/models.py

@@ -479,6 +479,7 @@ class Workflow(Job):
 
 
   @property
   @property
   def node_list(self):
   def node_list(self):
+    """Return a flatten node list ordered by the hierarchy of the nodes in the workflow"""
     def flatten(nodes):
     def flatten(nodes):
       flat = []
       flat = []
       if type(nodes) == list:
       if type(nodes) == list:
@@ -939,7 +940,7 @@ class Fork(ControlFlow):
     return Link.objects.get(parent=self, name='related').child.get_full_node()
     return Link.objects.get(parent=self, name='related').child.get_full_node()
 
 
   def is_editable(self):
   def is_editable(self):
-    return True
+    return False
 
 
   def get_edit_link(self):
   def get_edit_link(self):
     return reverse('oozie:edit_workflow_fork', kwargs={'action': self.id})
     return reverse('oozie:edit_workflow_fork', kwargs={'action': self.id})

+ 4 - 8
apps/oozie/src/oozie/views/editor.py

@@ -768,14 +768,10 @@ def submit_coordinator(request, coordinator):
 
 
 def _submit_coordinator(request, coordinator, mapping):
 def _submit_coordinator(request, coordinator, mapping):
   try:
   try:
-    if not coordinator.workflow.is_deployed(request.fs):
-      submission = Submission(request.user, coordinator.workflow, request.fs, mapping)
-      wf_dir = submission.deploy()
-      coordinator.workflow.deployment_dir = wf_dir
-      coordinator.workflow.save()
-
-    coordinator.deployment_dir = coordinator.workflow.deployment_dir
-    properties = {'wf_application_path': request.fs.get_hdfs_path(coordinator.workflow.deployment_dir)}
+    submission = Submission(request.user, coordinator.workflow, request.fs, mapping)
+    wf_dir = submission.deploy()
+
+    properties = {'wf_application_path': request.fs.get_hdfs_path(wf_dir)}
     properties.update(mapping)
     properties.update(mapping)
 
 
     submission = Submission(request.user, coordinator, request.fs, properties=properties)
     submission = Submission(request.user, coordinator, request.fs, properties=properties)