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 years ago
parent
commit
57936d4086

+ 11 - 10
apps/Makefile

@@ -31,15 +31,15 @@ default: env-install
 .PHONY: clean default distclean install
 
 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
@@ -106,7 +106,8 @@ I18N_APPS := about \
   jobbrowser \
   jobsub \
   shell \
-  useradmin
+  useradmin \
+  oozie
 
 COMPILE_LOCALE_TARGETS := $(I18N_APPS:%=.recursive-compile-locales/%)
 compile-locales: $(COMPILE_LOCALE_TARGETS)

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

@@ -120,7 +120,7 @@
     "fields": {
       "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}\"}]",
-      "jar_path": "/user/hue/oozie/demo/lib/hadoop-examples.jar",
+      "jar_path": "/user/hue/oozie/examples/lib/hadoop-examples.jar",
       "archives": "[]",
       "node_ptr": 19
     }

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

@@ -479,6 +479,7 @@ class Workflow(Job):
 
   @property
   def node_list(self):
+    """Return a flatten node list ordered by the hierarchy of the nodes in the workflow"""
     def flatten(nodes):
       flat = []
       if type(nodes) == list:
@@ -939,7 +940,7 @@ class Fork(ControlFlow):
     return Link.objects.get(parent=self, name='related').child.get_full_node()
 
   def is_editable(self):
-    return True
+    return False
 
   def get_edit_link(self):
     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):
   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)
 
     submission = Submission(request.user, coordinator, request.fs, properties=properties)