You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/04/14 09:18:59 UTC
[1/2] git commit: AMBARI-5454. Flume service summary page should show
list of flume agents and status. (srimanth)
Repository: ambari
Updated Branches:
refs/heads/trunk 0f7f76048 -> 864fae63f
AMBARI-5454. Flume service summary page should show list of flume agents and status. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c9d4945
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c9d4945
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c9d4945
Branch: refs/heads/trunk
Commit: 1c9d49458efff1094df9d5e609d6d890a92aaecd
Parents: 0f7f760
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Sat Apr 12 23:51:50 2014 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Sun Apr 13 00:00:47 2014 -0700
----------------------------------------------------------------------
.../app/mappers/service_metrics_mapper.js | 5 +-
ambari-web/app/messages.js | 6 +-
ambari-web/app/models/service/flume.js | 213 ++++++++++++++++++-
ambari-web/app/styles/application.less | 31 +++
.../templates/main/service/services/flume.hbs | 91 ++++----
.../app/views/main/service/services/flume.js | 23 +-
6 files changed, 304 insertions(+), 65 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index 805677e..e8ae925 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -217,12 +217,13 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
finalJson = this.flumeMapper(item);
finalJson.rand = Math.random();
result.push(finalJson);
- if (finalJson.nodeObjs) {
+ // TODO Below block to be uncommented when server data available
+ /*if (finalJson.nodeObjs) {
finalJson.nodeObjs.forEach(function (no) {
App.store.load(App.FlumeNode, no);
});
}
- App.store.load(App.FlumeService, finalJson);
+ App.store.load(App.FlumeService, finalJson);*/
} else if (item && item.ServiceInfo && item.ServiceInfo.service_name == "YARN") {
finalJson = this.yarnMapper(item);
finalJson.rand = Math.random();
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 7f19802..d4ed91f 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1769,8 +1769,10 @@ Em.I18n.translations = {
'dashboard.services.mapreduce.jobTrackerUptime':'Job Trackers Uptime',
'dashboard.services.mapreduce.chart.label':'Jobs Running',
- 'dashboard.services.flume.summary.single':'{0} Flume Agent',
- 'dashboard.services.flume.summary.multiple':'{0} Flume Agents',
+ 'dashboard.services.flume.summary.single':'{0} Flume Agent on ',
+ 'dashboard.services.flume.summary.multiple':'{0} Flume Agents on ',
+ 'dashboard.services.flume.summary.hosts.single':'1 host',
+ 'dashboard.services.flume.summary.hosts.multiple':'{0} hosts',
'dashboard.services.flume.agentsLabel': 'Flume Agents',
'dashboard.services.flume.channels': 'Channels',
'dashboard.services.flume.sources': 'Sources',
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/models/service/flume.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/flume.js b/ambari-web/app/models/service/flume.js
index bd05f04..d45b29d 100644
--- a/ambari-web/app/models/service/flume.js
+++ b/ambari-web/app/models/service/flume.js
@@ -70,27 +70,222 @@ App.FlumeAgent = DS.Model.extend({
} else {
return sinks.split(',').length;
}
- }.property('sinks')
+ }.property('sinks'),
+
+ healthClass : function() {
+ switch (this.get('status')) {
+ case 'STARTED':
+ case 'STARTING':
+ return App.healthIconClassGreen;
+ break;
+ case 'INSTALLED':
+ case 'STOPPING':
+ return App.healthIconClassRed;
+ break;
+ case 'UNKNOWN':
+ default:
+ return App.healthIconClassYellow;
+ break;
+ }
+ }.property('status')
});
-App.FlumeService.FIXTURES = [ {
- version: '1.4.0',
- agents: [ 0, 1 ]
-} ];
App.FlumeAgent.FIXTURES = [ {
- id: 0,
+ id: 1,
name: 'a1_dev01',
status: 'INSTALLED',
- host: 'dev01',
+ host: 'dev01.hortonworks.com',
channels: 'c1,c2',
sources: 'so1,so2,so3,so4',
sinks: 'si1,si2'
}, {
- id: 1,
+ id: 2,
name: 'a2_dev01',
status: 'STARTED',
- host: 'dev01',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 3,
+ name: 'a3_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 4,
+ name: 'a4_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 5,
+ name: 'a5_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 6,
+ name: 'a6_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 7,
+ name: 'a7_dev01',
+ status: 'INSTALLED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 8,
+ name: 'a8_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 9,
+ name: 'a9_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 10,
+ name: 'a10_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 11,
+ name: 'a11_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 12,
+ name: 'a12_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 13,
+ name: 'a13_dev01',
+ status: 'INSTALLED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 14,
+ name: 'a14_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
channels: 'c2',
sources: 'so1,so2,so3,so4',
sinks: 'si1,si2,si3,si4'
+}, {
+ id: 15,
+ name: 'a15_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 16,
+ name: 'a16_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 17,
+ name: 'a17_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 18,
+ name: 'a18_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 19,
+ name: 'a19_dev01',
+ status: 'INSTALLED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 20,
+ name: 'a20_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 21,
+ name: 'a21_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+}, {
+ id: 22,
+ name: 'a22_dev01',
+ status: 'UNKNOWN',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1,c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2'
+}, {
+ id: 23,
+ name: 'a23_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c2',
+ sources: 'so1,so2,so3,so4',
+ sinks: 'si1,si2,si3,si4'
+}, {
+ id: 24,
+ name: 'a24_dev01',
+ status: 'STARTED',
+ host: 'dev01.hortonworks.com',
+ channels: 'c1, c4',
+ sources: 'so1',
+ sinks: 'si1,si2'
+} ];
+App.FlumeService.FIXTURES = [ {
+ id: 0,
+ version: '1.4.0',
+ service_name: 'FLUME',
+ agents: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ]
} ];
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 5555287..31aac97 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6057,3 +6057,34 @@ i.icon-asterisks {
width:100%;
min-height:600px;
}
+
+#flume-summary {
+ text-align:left !important;
+ max-height: 490px;
+ overflow: scroll;
+ #flume-agents-table {
+ margin-top: 7px;
+ width: 100%;
+ td.agent-status {
+ width: 14px;
+ overflow: hidden;
+ }
+ td.agent-name {
+ width: 20%;
+ overflow: hidden;
+ }
+ td.agent-host-name {
+ width: 20%;
+ overflow: hidden;
+ }
+ .icon-ok-sign {
+ color: @health-status-green;
+ }
+ .icon-question-sign {
+ color: @health-status-yellow;
+ }
+ .icon-warning-sign {
+ color: #FDB82F;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/templates/main/service/services/flume.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/flume.hbs b/ambari-web/app/templates/main/service/services/flume.hbs
index 23ac669..6eb9bb1 100644
--- a/ambari-web/app/templates/main/service/services/flume.hbs
+++ b/ambari-web/app/templates/main/service/services/flume.hbs
@@ -18,50 +18,57 @@
<!-- Flume Agents -->
<tr>
- <td>{{t dashboard.services.flume.agentsLabel}}</td>
<td>
+ <div id="flume-summary">
<a href="#" {{action filterHosts view.flumeServerComponent}}>{{view.summaryHeader}}</a>
- </td>
-</tr>
-<!-- Channels -->
-<tr>
- <td>{{t dashboard.services.flume.channels}}</td>
- <td>
- {{view.service.channelsCount}} {{t dashboard.services.flume.channels}}
- <ul>
- {{#each view.service.nodes}}
- {{#if channelsCount}}
- <li> {{channels}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
- {{/if}}
- {{/each}}
- </ul>
- </td>
-</tr>
-<!-- Sources -->
-<tr>
- <td>{{t dashboard.services.flume.sources}}</td>
- <td>
- {{view.service.sourcesCount}} {{t dashboard.services.flume.sources}}
- <ul>
- {{#each view.service.nodes}}
- {{#if sourcesCount}}
- <li> {{sources}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
- {{/if}}
- {{/each}}
- </ul>
- </td>
-</tr>
-<!-- Sinks -->
-<tr>
- <td>{{t dashboard.services.flume.sinks}}</td>
- <td>
- {{view.service.sinksCount}} {{t dashboard.services.flume.sinks}}
- <ul>
- {{#each view.service.nodes}}
- {{#if sinksCount}}
- <li> {{sinks}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
- {{/if}}
+ <table class="table table-hover table-bordered table-striped" id="flume-agents-table">
+ <tr>
+ <th>
+ </th>
+ <th>
+ Agent
+ </th>
+ <th>
+ Host
+ </th>
+ <th>
+ Sources
+ </th>
+ <th>
+ Channels
+ </th>
+ <th>
+ Sinks
+ </th>
+ <th>
+ Actions
+ </th>
+ </tr>
+ {{#each agent in view.service.agents}}
+ <tr>
+ <td class="agent-status">
+ <span {{bindAttr class="agent.healthClass"}}></span>
+ </td>
+ <td class="agent-name">
+ {{agent.name}}
+ </td>
+ <td class="agent-host-name">
+ {{agent.host.hostName}}
+ </td>
+ <td>
+ {{agent.sourcesCount}}
+ </td>
+ <td>
+ {{agent.channelsCount}}
+ </td>
+ <td>
+ {{agent.sinksCount}}
+ </td>
+ <td>
+ </td>
+ </tr>
{{/each}}
- </ul>
+ </table>
+ </div>
</td>
</tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c9d4945/ambari-web/app/views/main/service/services/flume.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js
index ee62aed..70a2991 100644
--- a/ambari-web/app/views/main/service/services/flume.js
+++ b/ambari-web/app/views/main/service/services/flume.js
@@ -21,16 +21,19 @@ var date = require('utils/date');
App.MainDashboardServiceFlumeView = App.MainDashboardServiceView.extend({
templateName: require('templates/main/service/services/flume'),
serviceName: 'flume',
-
- summaryHeader: function () {
- var count = this.get('service.nodes.length');
- if(count==1)
- return this.t("dashboard.services.flume.summary.single").format(count);
- return this.t("dashboard.services.flume.summary.multiple").format(count);
- }.property('service.nodes'),
- flumeServerComponent: function () {
- return App.HostComponent.find().findProperty('componentName', 'FLUME_SERVER');
- }.property()
+ summaryHeader : function() {
+ var agents = App.FlumeService.find().objectAt(0).get('agents');//this.get('service.agents');
+ var agentCount = agents.get('length');
+ var hostCount = agents.mapProperty('host').uniq().get('length');
+ var prefix = agentCount == 1 ? this.t("dashboard.services.flume.summary.single") :
+ this.t("dashboard.services.flume.summary.multiple").format(agentCount);
+ var suffix = hostCount == 1 ? this.t("dashboard.services.flume.summary.hosts.single") :
+ this.t("dashboard.services.flume.summary.hosts.multiple").format(hostCount);
+ return prefix + suffix;
+ }.property('service.agents'),
+ flumeServerComponent: function() {
+ return App.HostComponent.find().findProperty('componentName', 'FLUME_SERVER');
+ }.property(),
});
[2/2] git commit: AMBARI-5455. Ambari configuration for map join
conversion and tez container size seems wrong. (srimanth)
Posted by sr...@apache.org.
AMBARI-5455. Ambari configuration for map join conversion and tez container size seems wrong. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/864fae63
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/864fae63
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/864fae63
Branch: refs/heads/trunk
Commit: 864fae63f2488d8294dc1b6379b632294bf6fe0e
Parents: 1c9d494
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Sun Apr 13 22:04:46 2014 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Mon Apr 14 00:15:42 2014 -0700
----------------------------------------------------------------------
.../configs/defaults_providers/hive_defaults_provider.js | 11 ++++++++---
.../utils/configs/validators/hive_configs_validator.js | 10 ++++++++++
2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/864fae63/ambari-web/app/utils/configs/defaults_providers/hive_defaults_provider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/defaults_providers/hive_defaults_provider.js b/ambari-web/app/utils/configs/defaults_providers/hive_defaults_provider.js
index 7530041..fda9f56 100644
--- a/ambari-web/app/utils/configs/defaults_providers/hive_defaults_provider.js
+++ b/ambari-web/app/utils/configs/defaults_providers/hive_defaults_provider.js
@@ -21,15 +21,20 @@ require('utils/configs/defaults_providers/yarn_defaults_provider');
App.HiveDefaultsProvider = App.YARNDefaultsProvider.extend({
configsTemplate: {
- 'hive.tez.container.size': null
+ 'hive.tez.container.size': null,
+ 'hive.tez.java.opts': null,
+ 'hive.auto.convert.join.noconditionaltask.size': null
},
getDefaults : function(localDB) {
var configs = this._super(localDB);
if (configs['yarn.scheduler.maximum-allocation-mb'] != null && configs['mapreduce.map.memory.mb'] != null
&& configs['mapreduce.reduce.memory.mb'] != null) {
- var containerSize = configs['mapreduce.map.memory.mb'] >= 2048 ? configs['mapreduce.map.memory.mb'] : configs['mapreduce.reduce.memory.mb'];
- configs['hive.tez.container.size'] = Math.min(configs['yarn.scheduler.maximum-allocation-mb'], containerSize);
+ var containerSize = configs['mapreduce.map.memory.mb'] > 2048 ? configs['mapreduce.map.memory.mb'] : configs['mapreduce.reduce.memory.mb'];
+ containerSize = Math.min(configs['yarn.scheduler.maximum-allocation-mb'], containerSize);
+ configs['hive.auto.convert.join.noconditionaltask.size'] = Math.round(containerSize / 3) * 1048576; // MB to Bytes
+ configs['hive.tez.java.opts'] = "-server -Xmx"+containerSize+"m -Djava.net.preferIPv4Stack=true";
+ configs['hive.tez.container.size'] = containerSize;
} else {
jQuery.extend(configs, this.get('configsTemplate'));
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/864fae63/ambari-web/app/utils/configs/validators/hive_configs_validator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/validators/hive_configs_validator.js b/ambari-web/app/utils/configs/validators/hive_configs_validator.js
index 8323d38..5eb048d 100644
--- a/ambari-web/app/utils/configs/validators/hive_configs_validator.js
+++ b/ambari-web/app/utils/configs/validators/hive_configs_validator.js
@@ -24,9 +24,19 @@ App.HiveConfigsValidator = App.ServiceConfigsValidator.create({
*/
configValidators: {
'hive.tez.container.size': 'hiveTezContainerMb',
+ 'hive.tez.java.opts': 'hiveTezJavaOpts',
+ 'hive.auto.convert.join.noconditionaltask.size': 'hiveTezJoinNoConditionalBytes'
},
hiveTezContainerMb: function(config) {
return this.validatorLessThenDefaultValue(config);
+ },
+
+ hiveTezJavaOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ hiveTezJoinNoConditionalBytes: function(config) {
+ return this.validatorLessThenDefaultValue(config);
}
});