Browse Source

HUE-1892 [oozie] Permission denied for hive-site.xml for Hive action on workflow

Rename hive-site.xml example to hive-config.xml.
Add a note on the editor of Hive action.
Cleaner History page with direct link to dashboard from the editor.
Romain Rigaux 12 years ago
parent
commit
8e81051

+ 1 - 1
apps/oozie/examples/unmanaged/hive/hive-site.xml → apps/oozie/examples/managed/hive/hive-config.xml

@@ -22,7 +22,7 @@
 <!--
   Note:
 
-  Configure Hive to use a remote Hive Metastore and update this hive-site.xml.
+  Configure Hive to use a remote Hive Metastore and update this with from /etc/hive/conf/hive-site.xml values.
   This example can work with a local metatastore but this is not recommended.
 
   http://gethue.tumblr.com/post/60937985689/hadoop-tutorials-ii-2-execute-hive-queries-and

BIN
apps/oozie/examples/managed/hive/workflow.zip


+ 1 - 1
apps/oozie/examples/managed/hive/hive-site.xml → apps/oozie/examples/unmanaged/hive/hive-config.xml

@@ -22,7 +22,7 @@
 <!--
   Note:
 
-  Configure Hive to use a remote Hive Metastore and update this hive-site.xml.
+  Configure Hive to use a remote Hive Metastore and update this from /etc/hive/conf/hive-site.xml values.
   This example can work with a local metatastore but this is not recommended.
 
   http://gethue.tumblr.com/post/60937985689/hadoop-tutorials-ii-2-execute-hive-queries-and

BIN
apps/oozie/examples/unmanaged/hive/workflow.zip


+ 3 - 3
apps/oozie/src/oozie/models.py

@@ -984,14 +984,14 @@ class Hive(Action):
       help_text=_t('List of names or paths of files to be added to the distributed cache and the task running directory.'))
   archives = models.TextField(default="[]", verbose_name=_t('Archives'),
       help_text=_t('List of names or paths of the archives to be added to the distributed cache.'))
-  job_properties = models.TextField(default='[{"name":"oozie.hive.defaults","value":"hive-site.xml"}]',
+  job_properties = models.TextField(default='[]',
                                     verbose_name=_t('Hadoop job properties'),
                                     help_text=_t('For the job configuration (e.g. mapred.job.queue.name=production)'))
   prepares = models.TextField(default="[]", verbose_name=_t('Prepares'),
                               help_text=_t('List of absolute paths to delete, then create, before starting the application. '
                                            'This should be used exclusively for directory cleanup.'))
-  job_xml = models.CharField(max_length=PATH_MAX, default='', blank=True, verbose_name=_t('Job XML'),
-                             help_text=_t('Refer to a Hive hive-site.xml file bundled in the workflow deployment directory. '))
+  job_xml = models.CharField(max_length=PATH_MAX, default='hive-config.xml', blank=True, verbose_name=_t('Job XML'),
+                             help_text=_t('Refer to a Hive hive-config.xml file bundled in the workflow deployment directory. Pick a name different than hive-site.xml.'))
 
   def get_properties(self):
     return json.loads(self.job_properties)

+ 5 - 2
apps/oozie/src/oozie/templates/editor/edit_bundle.mako

@@ -234,10 +234,13 @@ ${ layout.menubar(section='bundles') }
               % for record in history:
               <tr>
                 <td>
-                  <a href="${ url('oozie:list_history_record', record_id=record.id) }" data-row-selector="true"></a>
                   ${ utils.format_date(record.submission_date) }
                 </td>
-                <td>${ record.oozie_job_id }</td>
+                <td>
+                  <a href="${ record.get_absolute_oozie_url() }" data-row-selector="true">
+                    ${ record.oozie_job_id }
+                  </a>
+                </td>
               </tr>
               % endfor
               </tbody>

+ 5 - 2
apps/oozie/src/oozie/templates/editor/edit_coordinator.mako

@@ -416,10 +416,13 @@ ${ layout.menubar(section='coordinators') }
               % for record in history:
               <tr>
                 <td>
-                  <a href="${ url('oozie:list_history_record', record_id=record.id) }" data-row-selector="true"></a>
                   ${ utils.format_date(record.submission_date) }
                 </td>
-                <td>${ record.oozie_job_id }</td>
+                <td>
+                  <a href="${ record.get_absolute_oozie_url() }" data-row-selector="true">
+                    ${ record.oozie_job_id }
+                  </a>
+                </td>
               </tr>
               % endfor
               </tbody>

+ 13 - 8
apps/oozie/src/oozie/templates/editor/edit_workflow.mako

@@ -85,12 +85,12 @@ ${ layout.menubar(section='workflows') }
       <div class="alert alert-info"><h3 data-bind="text: name()"></h3></div>
       <div class="card-body">
         <p>
-            <fieldset>
-        ${ utils.render_field_with_error_js(workflow_form['name'], workflow_form['name'].name, extra_attrs={'data-bind': 'value: %s' % workflow_form['name'].name}) }
-        ${ utils.render_field_with_error_js(workflow_form['description'], workflow_form['description'].name, extra_attrs={'data-bind': 'value: %s' % workflow_form['description'].name}) }
-        <div class="hide">
-          ${ utils.render_field_with_error_js(workflow_form['is_shared'], workflow_form['is_shared'].name, extra_attrs={'data-bind': 'checked: %s' % workflow_form['is_shared'].name}) }
-        </div>
+          <fieldset>
+            ${ utils.render_field_with_error_js(workflow_form['name'], workflow_form['name'].name, extra_attrs={'data-bind': 'value: %s' % workflow_form['name'].name}) }
+            ${ utils.render_field_with_error_js(workflow_form['description'], workflow_form['description'].name, extra_attrs={'data-bind': 'value: %s' % workflow_form['description'].name}) }
+            <div class="hide">
+              ${ utils.render_field_with_error_js(workflow_form['is_shared'], workflow_form['is_shared'].name, extra_attrs={'data-bind': 'checked: %s' % workflow_form['is_shared'].name}) }
+            </div>
 
       <%
       workflows.key_value_field(workflow_form['parameters'].label, workflow_form['parameters'].help_text, {
@@ -369,10 +369,13 @@ ${ layout.menubar(section='workflows') }
                 % for record in history:
                 <tr>
                   <td>
-                    <a href="${ url('oozie:list_history_record', record_id=record.id) }" data-row-selector="true"></a>
                     ${ utils.format_date(record.submission_date) }
                   </td>
-                  <td>${ record.oozie_job_id }</td>
+                  <td>
+                    <a href="${ record.get_absolute_oozie_url() }" data-row-selector="true">
+                      ${ record.oozie_job_id }
+                    </a>
+                  </td>
                 </tr>
                 % endfor
                 </tbody>
@@ -948,6 +951,8 @@ $(document).ready(function () {
 
   routie('editWorkflow');
 
+  $("a[data-row-selector='true']").jHueRowSelector();
+
   var actionToolbarProperties = {
     docked: false,
     detachPosition: 0,