You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/03/16 17:41:20 UTC

ambari git commit: AMBARI-10081 Jobs View: Record counters (read/write) not being generated for Hive queries. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk 35b96f728 -> 8bba8c7e2


AMBARI-10081 Jobs View: Record counters (read/write) not being generated for Hive queries. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8bba8c7e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8bba8c7e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8bba8c7e

Branch: refs/heads/trunk
Commit: 8bba8c7e2730b3819d7101390b3d9ec54960e7a3
Parents: 35b96f7
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Mon Mar 16 17:11:20 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Mon Mar 16 18:40:29 2015 +0200

----------------------------------------------------------------------
 .../src/main/resources/ui/app/scripts/helpers/jobs.js     |  8 ++++----
 .../src/main/resources/ui/app/scripts/helpers/string.js   | 10 ++++++++++
 .../ui/app/scripts/views/job/hive_job_details_view.js     |  4 ++--
 3 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8bba8c7e/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/jobs.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/jobs.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/jobs.js
index 9258d01..afda69c 100644
--- a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/jobs.js
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/jobs.js
@@ -221,10 +221,10 @@ App.Helpers.jobs = {
                       };
                       break;
                     case 'HIVE':
-                      cNameToPropetyMap = {
-                        'RECORDS_READ': 'recordReadCount',
-                        'RECORDS_WRITE': 'recordWriteCount'
-                      };
+                      var vertexNameFormatted = App.Helpers.string.convertSpacesToUnderscores(data.otherinfo.vertexName);
+                      cNameToPropetyMap = {};
+                      cNameToPropetyMap['RECORDS_IN_' + vertexNameFormatted] = 'recordReadCount';
+                      cNameToPropetyMap['RECORDS_OUT_' + vertexNameFormatted] = 'recordWriteCount';
                       break;
                     default:
                       break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8bba8c7e/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/string.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/string.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/string.js
index 053802e..55e6133 100644
--- a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/string.js
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/string.js
@@ -99,6 +99,16 @@ App.Helpers.string = {
       }
     }
     return value;
+  },
+
+  /**
+   * Convert spaces to underscores
+   * @method convertSpacesToUnderscores
+   * @param {string} str
+   * @returns {string}
+   */
+  convertSpacesToUnderscores: function (str) {
+    return Em.isNone(str) ? '' : str.replace(' ', '_');
   }
 
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/8bba8c7e/contrib/views/jobs/src/main/resources/ui/app/scripts/views/job/hive_job_details_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/views/job/hive_job_details_view.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/views/job/hive_job_details_view.js
index dbc5fe2..f6af896 100644
--- a/contrib/views/jobs/src/main/resources/ui/app/scripts/views/job/hive_job_details_view.js
+++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/views/job/hive_job_details_view.js
@@ -180,8 +180,8 @@ App.JobView = Em.View.extend({
   summaryMetricTypesDisplay: [
     Em.I18n.t('jobs.hive.tez.metric.input'),
     Em.I18n.t('jobs.hive.tez.metric.output'),
-    /* Em.I18n.t('jobs.hive.tez.metric.recordsRead'),
-     Em.I18n.t('jobs.hive.tez.metric.recordsWrite'), */
+    Em.I18n.t('jobs.hive.tez.metric.recordsRead'),
+    Em.I18n.t('jobs.hive.tez.metric.recordsWrite'),
     Em.I18n.t('jobs.hive.tez.metric.tezTasks'),
     Em.I18n.t('jobs.hive.tez.metric.spilledRecords')
   ],