You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/05/31 00:03:59 UTC
svn commit: r1488035 [4/5] - in /incubator/ambari/trunk: ./
ambari-agent/src/main/puppet/modules/hdp-oozie/manifests/
ambari-agent/src/main/puppet/modules/hdp-yarn/files/
ambari-agent/src/main/puppet/modules/hdp-yarn/manifests/
ambari-agent/src/main/py...
Modified: incubator/ambari/trunk/ambari-server/src/test/resources/deploy_HDP2.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/resources/deploy_HDP2.sh?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/test/resources/deploy_HDP2.sh (original)
+++ incubator/ambari/trunk/ambari-server/src/test/resources/deploy_HDP2.sh Thu May 30 22:03:58 2013
@@ -16,7 +16,7 @@ curl -i -X PUT -d '{"Clusters":{"desired
echo "-----------------------mapred-queue-acls-----------------------"
curl -i -X PUT -d '{"Clusters":{"desired_configs":{"type":"mapred-site","tag":"version1","properties":{"io.sort.mb":"","io.sort.record.percent":".2","io.sort.spill.percent":"","io.sort.factor":"100","mapred.tasktracker.tasks.sleeptime-before-sigkill":"250","mapred.job.tracker.handler.count":"50","mapred.system.dir":"/mapred/system","mapred.job.tracker":"","mapred.job.tracker.http.address":"","mapred.local.dir":"","mapreduce.cluster.administrators":"hadoop","mapred.reduce.parallel.copies":"30","mapred.tasktracker.map.tasks.maximum":"","mapred.tasktracker.reduce.tasks.maximum":"","tasktracker.http.threads":"50","mapred.map.tasks.speculative.execution":"false","mapred.reduce.tasks.speculative.execution":"false","mapred.reduce.slowstart.completed.maps":"0.05","mapred.inmem.merge.threshold":"1000","mapred.job.shuffle.merge.percent":"0.66","mapred.job.shuffle.input.buffer.percent":"0.7","mapred.map.output.compression.codec":"","mapred.output.compression.type":"BLOCK","mapred.jobtr
acker.completeuserjobs.maximum":"0","mapred.jobtracker.taskScheduler":"","mapred.jobtracker.restart.recover":"false","mapred.job.reduce.input.buffer.percent":"0.0","mapreduce.reduce.input.limit":"10737418240","mapred.compress.map.output":"","mapred.task.timeout":"600000","jetty.connector":"org.mortbay.jetty.nio.SelectChannelConnector","mapred.task.tracker.task-controller":"","mapred.child.root.logger":"INFO,TLA","mapred.child.java.opts":"","mapred.cluster.map.memory.mb":"","mapred.cluster.reduce.memory.mb":"","mapred.job.map.memory.mb":"","mapred.job.reduce.memory.mb":"","mapred.cluster.max.map.memory.mb":"","mapred.cluster.max.reduce.memory.mb":"","mapred.hosts":"","mapred.hosts.exclude":"","mapred.max.tracker.blacklists":"16","mapred.healthChecker.script.path":"","mapred.healthChecker.interval":"135000","mapred.healthChecker.script.timeout":"60000","mapred.job.tracker.persist.jobstatus.active":"false","mapred.job.tracker.persist.jobstatus.hours":"1","mapred.job.tracker.per
sist.jobstatus.dir":"","mapred.jobtracker.retirejob.check":"10000","mapred.jobtracker.retirejob.interval":"0","mapred.job.tracker.history.completed.location":"/mapred/history/done","mapred.task.maxvmem":"","mapred.jobtracker.maxtasks.per.job":"","mapreduce.fileoutputcommitter.marksuccessfuljobs":"false","mapred.userlog.retain.hours":"","mapred.job.reuse.jvm.num.tasks":"1","mapreduce.jobtracker.kerberos.principal":"","mapreduce.tasktracker.kerberos.principal":"","hadoop.job.history.user.location":"none","mapreduce.jobtracker.keytab.file":"","mapreduce.tasktracker.keytab.file":"","mapreduce.jobtracker.staging.root.dir":"/user","mapreduce.tasktracker.group":"hadoop","mapreduce.jobtracker.split.metainfo.maxsize":"50000000","mapreduce.history.server.embedded":"false","mapreduce.history.server.http.address":"","mapreduce.jobhistory.kerberos.principal":"","mapreduce.jobhistory.keytab.file":"","mapred.jobtracker.blacklist.fault-timeout-window":"180","mapred.jobtracker.blacklist.faul
t-bucket-width":"15","mapred.queue.names":"default","mapreduce.shuffle.port":"8081","mapreduce.jobhistory.intermediate-done-dir" : "/mr-history/tmp","mapreduce.jobhistory.done-dir" : "/mr-history/done"}}}}' -u admin:admin http://localhost:8080/api/v1/clusters/c1
echo "-----------------------mapred-site-----------------------"
-curl -i -X PUT -d `echo '{"Clusters":{"desired_configs":{"type":"yarn-site","tag":"version1","properties":{"yarn.resourcemanager.resource-tracker.address":"HOST:8025","yarn.resourcemanager.scheduler.address":"HOST:8030","yarn.resourcemanager.address":"HOST:8050","yarn.resourcemanager.admin.address":"HOST:8141","yarn.resourcemanager.scheduler.class":"org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler","yarn.scheduler.minimum-allocation-mb":"1024","yarn.scheduler.maximum-allocation-mb":"8192","yarn.nodemanager.address":"0.0.0.0:45454","yarn.nodemanager.local-dirs":"/yarn/loc/dir","yarn.nodemanager.resource.memory-mb":"8192","yarn.application.classpath":"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*,/usr/lib/ambari-server/*","yarn.nodemanager.vmem-pmem-ratio":"2.1","yarn.nodeman
ager.container-executor.class":"org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor","yarn.nodemanager.aux-services":"mapreduce.shuffle","yarn.nodemanager.aux-services.class":"org.apache.hadoop.mapred.ShuffleHandler","yarn.nodemanager.log-dirs":"/var/log/yarn","yarn.nodemanager.container-monitor.interval-ms":"3000","yarn.nodemanager.health-checker.script.path":"/etc/hadoop/conf/health_check","yarn.nodemanager.health-checker.interval-ms":"135000","yarn.nodemanager.health-checker.script.timeout-ms":"60000","yarn.nodemanager.log.retain-second":"604800","yarn.log-aggregation-enable":"true","yarn.nodemanager.remote-app-log-dir":"/app-logs","yarn.nodemanager.remote-app-log-dir-suffix":"logs","yarn.nodemanager.log-aggregation.compression-type":"gz","yarn.nodemanager.delete.debug-delay-sec":"36000"}}}}'| sed s/HOST/$HOST/g` -u admin:admin http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d `echo '{"Clusters":{"desired_configs":{"type":"yarn-site","tag":"version1","properties":{"yarn.resourcemanager.resource-tracker.address":"HOST:8025","yarn.resourcemanager.scheduler.address":"HOST:8030","yarn.resourcemanager.address":"HOST:8050","yarn.resourcemanager.admin.address":"HOST:8141","yarn.resourcemanager.scheduler.class":"org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler","yarn.scheduler.minimum-allocation-mb":"1024","yarn.scheduler.maximum-allocation-mb":"8192","yarn.nodemanager.address":"0.0.0.0:45454","yarn.nodemanager.local-dirs":"/yarn/loc/dir","yarn.nodemanager.resource.memory-mb":"8192","yarn.application.classpath":"/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*,/usr/lib/ambari-server/*","yarn.nodemanager.vmem-pmem-ratio":"2.1","yarn.nodeman
ager.container-executor.class":"org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor","yarn.nodemanager.aux-services":"mapreduce.shuffle","yarn.nodemanager.aux-services.class":"org.apache.hadoop.mapred.ShuffleHandler","yarn.nodemanager.log-dirs":"/var/log/hadoop-yarn/yarn","yarn.nodemanager.container-monitor.interval-ms":"3000","yarn.nodemanager.health-checker.script.path":"/etc/hadoop/conf/health_check","yarn.nodemanager.health-checker.interval-ms":"135000","yarn.nodemanager.health-checker.script.timeout-ms":"60000","yarn.nodemanager.log.retain-second":"604800","yarn.log-aggregation-enable":"true","yarn.nodemanager.remote-app-log-dir":"/app-logs","yarn.nodemanager.remote-app-log-dir-suffix":"logs","yarn.nodemanager.log-aggregation.compression-type":"gz","yarn.nodemanager.delete.debug-delay-sec":"36000"}}}}'| sed s/HOST/$HOST/g` -u admin:admin http://localhost:8080/api/v1/clusters/c1
echo "-----------------------yarn-site-----------------------"
curl -i -X POST -d '{"components":[{"ServiceComponentInfo":{"component_name":"NAMENODE"}},{"ServiceComponentInfo":{"component_name":"SECONDARY_NAMENODE"}},{"ServiceComponentInfo":{"component_name":"DATANODE"}},{"ServiceComponentInfo":{"component_name":"HDFS_CLIENT"}}]}' -u admin:admin http://localhost:8080/api/v1/clusters/c1/services?ServiceInfo/service_name=HDFS
Modified: incubator/ambari/trunk/ambari-web/app/config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/config.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/config.js Thu May 30 22:03:58 2013
@@ -34,6 +34,8 @@ App.componentsUpdateInterval = 6000;
App.contentUpdateInterval = 15000;
App.maxRunsForAppBrowser = 500;
App.pageReloadTime=3600000;
+App.singleNodeInstall = false;
+App.singleNodeAlias = document.location.hostname;
// experimental features are automatically enabled if running on brunch server
App.enableExperimental = false;
Modified: incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/global/cluster_controller.js Thu May 30 22:03:58 2013
@@ -120,7 +120,7 @@ App.ClusterController = Em.Controller.ex
if (host) {
hostName = host.get('publicHostName');
}
- return "http://" + hostName + "/ganglia";
+ return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : hostName) + "/ganglia";
}
}
}
@@ -154,7 +154,7 @@ App.ClusterController = Em.Controller.ex
if (host) {
hostName = host.get('publicHostName');
}
- return "http://" + hostName + "/nagios";
+ return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : hostName) + "/nagios";
}
}
}
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/misc_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/misc_controller.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/misc_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/misc_controller.js Thu May 30 22:03:58 2013
@@ -42,6 +42,7 @@ App.MainAdminMiscController = App.MainSe
});
},
loadServiceTagSuccess: function(data, opt, params) {
+ var installedServices = App.Service.find().mapProperty("serviceName");
var serviceConfigsDef = params.serviceConfigsDef;
var serviceName = this.get('content.serviceName');
var loadedClusterSiteToTagMap = {};
@@ -57,6 +58,8 @@ App.MainAdminMiscController = App.MainSe
var misc_configs = configSet.globalConfigs.filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true);
+ misc_configs = App.config.miscConfigVisibleProperty(misc_configs, installedServices);
+
var sortOrder = this.get('configs').filterProperty('serviceName', this.get('selectedService')).filterProperty('category', 'Users and Groups').filterProperty('isVisible', true).mapProperty('name');
var sorted = [];
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/host.js Thu May 30 22:03:58 2013
@@ -23,7 +23,6 @@ var componentHelper = require('utils/com
App.MainHostController = Em.ArrayController.extend({
name:'mainHostController',
content: App.Host.find(),
- comeWithFilter: false,
alerts: function () {
return App.router.get('clusterController.alerts').filterProperty('isOk', false).filterProperty('ignoredForHosts', false);
@@ -56,27 +55,32 @@ App.MainHostController = Em.ArrayControl
*/
filterByComponent:function (component) {
var id = component.get('componentName');
-
+ var column = 6;
this.get('componentsForFilter').setEach('checkedForHostFilter', false);
- this.get('componentsForFilter').filterProperty('id', id).setEach('checkedForHostFilter', true);
-
- this.set('comeWithFilter', true);
- },
- /**
- * On click callback for decommission button
- * @param event
- */
- decommissionButtonPopup:function () {
- var self = this;
- App.showConfirmationPopup(function(){
- alert('do');
- });
+ var filterForComponent = {
+ iColumn: column,
+ value: id,
+ type: 'multiple'
+ };
+
+ var filterConditions = App.db.getFilterConditions(this.get('name'));
+ if (filterConditions) {
+ var component = filterConditions.findProperty('iColumn', column);
+ if (component) {
+ component.value = id;
+ }
+ else {
+ filterConditions.push(filterForComponent);
+ }
+ App.db.setFilterConditions(this.get('name'), filterConditions);
+ }
+ else {
+ App.db.setFilterConditions(this.get('name'), [filterForComponent]);
+ }
},
-
/**
* On click callback for delete button
- * @param event
*/
deleteButtonPopup:function () {
var self = this;
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/host/details.js Thu May 30 22:03:58 2013
@@ -50,7 +50,9 @@ App.MainHostDetailsController = Em.Contr
/**
* Send specific command to server
* @param url
- * @param data Object to send
+ * @param _method
+ * @param postData
+ * @param callback
*/
sendCommandToServer : function(url, postData, _method, callback){
var url = (App.testMode) ?
Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard/step7_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step7_controller.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard/step7_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard/step7_controller.js Thu May 30 22:03:58 2013
@@ -91,20 +91,7 @@ App.WizardStep7Controller = Em.Controlle
*/
activateSpecialConfigs: function () {
var miscConfigs = this.get('stepConfigs').findProperty('serviceName', 'MISC').configs;
- var showProxyGroup = this.get('selectedServiceNames').contains('HIVE') ||
- this.get('selectedServiceNames').contains('HCATALOG') ||
- this.get('selectedServiceNames').contains('OOZIE');
- miscConfigs.findProperty('name', 'proxyuser_group').set('isVisible', showProxyGroup);
- miscConfigs.findProperty('name', 'hbase_user').set('isVisible', this.get('selectedServiceNames').contains('HBASE'));
- miscConfigs.findProperty('name', 'mapred_user').set('isVisible', this.get('selectedServiceNames').contains('MAPREDUCE'));
- miscConfigs.findProperty('name', 'hive_user').set('isVisible', this.get('selectedServiceNames').contains('HIVE'));
- miscConfigs.findProperty('name', 'hcat_user').set('isVisible', this.get('selectedServiceNames').contains('HCATALOG'));
- miscConfigs.findProperty('name', 'webhcat_user').set('isVisible', this.get('selectedServiceNames').contains('WEBHCAT'));
- miscConfigs.findProperty('name', 'oozie_user').set('isVisible', this.get('selectedServiceNames').contains('OOZIE'));
- miscConfigs.findProperty('name', 'zk_user').set('isVisible', this.get('selectedServiceNames').contains('ZOOKEEPER'));
- miscConfigs.findProperty('name', 'gmetad_user').set('isVisible', this.get('selectedServiceNames').contains('GANGLIA'));
- miscConfigs.findProperty('name', 'rrdcached_base_dir').set('isVisible', this.get('selectedServiceNames').contains('GANGLIA'));
- miscConfigs.findProperty('name', 'nagios_user').set('isVisible', this.get('selectedServiceNames').contains('NAGIOS'));
+ miscConfigs = App.config.miscConfigVisibleProperty(miscConfigs, this.get('selectedServiceNames'));
},
/**
Modified: incubator/ambari/trunk/ambari-web/app/data/HDP2/config_mapping.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/HDP2/config_mapping.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/HDP2/config_mapping.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/HDP2/config_mapping.js Thu May 30 22:03:58 2013
@@ -303,7 +303,7 @@ var configs = [
},
/**********************************************yarn-site***************************************/
{
- "name": "yarn.resourcemanager.resourcetracker.address",
+ "name": "yarn.resourcemanager.resource-tracker.address",
"templateName": ["rm_host"],
"foreignKey": null,
"value": "hdfs://<templateName[0]>:8025",
@@ -317,7 +317,7 @@ var configs = [
"filename": "yarn-site.xml"
},
{
- "name": "yarn.resourcemanager.addresss",
+ "name": "yarn.resourcemanager.address",
"templateName": ["rm_host"],
"foreignKey": null,
"value": "hdfs://<templateName[0]>:8050",
@@ -359,30 +359,24 @@ var configs = [
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
+ //io.sort.mb -> mapreduce.task.io.sort.mb
{
- "name": "io.sort.mb",
- "templateName": ["io_sort_mb"],
- "foreignKey": null,
- "value": "<templateName[0]>",
- "filename": "mapred-site.xml"
- },
- /*{
- "name": "mapred.cluster.reduce.memory.mb",
- "templateName": ["mapred_cluster_red_mem_mb"],
+ "name": "mapreduce.task.io.sort.mb",
+ "templateName": ["mapreduce_task_io_sort_mb"],
"foreignKey": null,
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapred.cluster.max.map.memory.mb",
- "templateName": ["mapred_cluster_max_map_mem_mb"],
+ "name": "mapred.system.dir",
+ "templateName": ["mapred_system_dir"],
"foreignKey": null,
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapred.cluster.max.reduce.memory.mb",
- "templateName": ["mapred_cluster_max_red_mem_mb"],
+ "name": "mapred.cluster.reduce.memory.mb",
+ "templateName": ["mapred_cluster_red_mem_mb"],
"foreignKey": null,
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
@@ -395,69 +389,13 @@ var configs = [
"filename": "mapred-site.xml"
},
{
- "name": "mapred.hosts.exclude",
- "templateName": ["hadoop_conf_dir", "mapred_hosts_exclude"],
- "foreignKey": null,
- "value": "<templateName[0]>/<templateName[1]>",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.healthChecker.script.path",
- "templateName": ["mapred_jobstatus_dir"],
- "foreignKey": null,
- "value": "<templateName[0]>",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.job.tracker.persist.jobstatus.dir",
- "templateName": ["hadoop_conf_dir"],
- "foreignKey": null,
- "value": "<templateName[0]>/health_check",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.child.java.opts",
- "templateName": ["mapred_child_java_opts_sz"],
- "foreignKey": null,
- "value": "-server -Xmx<templateName[0]>m -Djava.net.preferIPv4Stack=true",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.cluster.map.memory.mb",
- "templateName": ["mapred_cluster_map_mem_mb"],
- "foreignKey": null,
- "value": "<templateName[0]>",
- "filename": "mapred-site.xml"
- },
- {
- "name": "io.sort.spill.percent",
- "templateName": ["io_sort_spill_percent"],
- "foreignKey": null,
- "value": "<templateName[0]>",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.system.dir",
- "templateName": ["mapred_system_dir"],
+ "name": "mapred.jobtracker.maxtasks.per.job",
+ "templateName": ["maxtasks_per_job"],
"foreignKey": null,
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapred.job.tracker",
- "templateName": ["jobtracker_host"],
- "foreignKey": null,
- "value": "<templateName[0]>:50300",
- "filename": "mapred-site.xml"
- },
- {
- "name": "mapred.job.tracker.http.address",
- "templateName": ["jobtracker_host"],
- "foreignKey": null,
- "value": "<templateName[0]>:50030",
- "filename": "mapred-site.xml"
- },
- {
"name": "mapred.userlog.retain.hours",
"templateName": ["mapreduce_userlog_retainhours"],
"foreignKey": null,
@@ -465,8 +403,8 @@ var configs = [
"filename": "mapred-site.xml"
},
{
- "name": "mapred.jobtracker.maxtasks.per.job",
- "templateName": ["maxtasks_per_job"],
+ "name": "mapred.local.dir",
+ "templateName": ["mapred_local_dir"],
"foreignKey": null,
"value": "<templateName[0]>",
"filename": "mapred-site.xml"
@@ -479,61 +417,54 @@ var configs = [
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.jobtracker.kerberos.principal",
- "templateName": ["kerberos_domain"],
+ "name": "mapred.tasktracker.map.tasks.maximum",
+ "templateName": ["mapred_map_tasks_max"],
"foreignKey": null,
- "value": "jt/_HOST@<templateName[0]>",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.tasktracker.kerberos.principal",
- "templateName": ["kerberos_domain"],
+ "name": "mapred.hosts.exclude",
+ "templateName": ["hadoop_conf_dir", "mapred_hosts_exclude"],
"foreignKey": null,
- "value": "tt/_HOST@<templateName[0]>",
+ "value": "<templateName[0]>/<templateName[1]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.jobtracker.keytab.file",
- "templateName": ["keytab_path"],
+ "name": "mapred.cluster.max.map.memory.mb",
+ "templateName": ["mapred_cluster_max_map_mem_mb"],
"foreignKey": null,
- "value": "<templateName[0]>/jt.service.keytab",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.tasktracker.keytab.file",
- "templateName": ["keytab_path"],
+ "name": "mapred.cluster.max.reduce.memory.mb",
+ "templateName": ["mapred_cluster_max_red_mem_mb"],
"foreignKey": null,
- "value": "<templateName[0]>/tt.service.keytab",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.history.server.embedded",
- "templateName": [],
+ "name": "mapred.jobtracker.taskScheduler",
+ "templateName": ["scheduler_name"],
"foreignKey": null,
- "value": "false",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.history.server.http.address",
- "templateName": ["jobtracker_host"],
+ "name": "mapred.healthChecker.script.path",
+ "templateName": ["mapred_jobstatus_dir"],
"foreignKey": null,
- "value": "<templateName[0]>:51111",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
{
- "name": "mapreduce.jobhistory.kerberos.principal",
- "templateName": ["kerberos_domain"],
+ "name": "mapred.cluster.map.memory.mb",
+ "templateName": ["mapred_cluster_map_mem_mb"],
"foreignKey": null,
- "value": "jt/_HOST@<templateName[0]>",
+ "value": "<templateName[0]>",
"filename": "mapred-site.xml"
},
- {
- "name": "mapreduce.jobhistory.keytab.file",
- "templateName": ["keytab_path"],
- "foreignKey": null,
- "value": "<templateName[0]>/jt.service.keytab",
- "filename": "mapred-site.xml"
- },*/
/**********************************************hbase-site***************************************/
{
"name": "hbase.rootdir",
Modified: incubator/ambari/trunk/ambari-web/app/data/HDP2/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/HDP2/config_properties.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/HDP2/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/HDP2/config_properties.js Thu May 30 22:03:58 2013
@@ -58,7 +58,7 @@
*
* serviceName:
* The service that the config property belongs to.
- * E.g., "HDFS", "MAPREDUCE", "ZOOKEEPER", etc.
+ * E.g., "HDFS", "MAPREDUCE2", "ZOOKEEPER", etc.
*
* category: the category that the config property belongs to (used for grouping config properties in the UI).
* if unspecified, "General" is assumed.
@@ -494,6 +494,209 @@ module.exports =
"category": "HistoryServer",
"index": 0
},
+ {
+ "id": "puppet var",
+ "name": "mapred_local_dir",
+ "displayName": "MapReduce local directories",
+ "description": "Directories for MapReduce to store intermediate data files",
+ "defaultValue": "",
+ "defaultDirectory": "/hadoop/mapred",
+ "displayType": "directories",
+ "isReconfigurable": true,
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_cluster_red_mem_mb",
+ "displayName": "Cluster's Reduce slot size (virtual memory)",
+ "description": "The virtual memory size of a single Reduce slot in the MapReduce framework",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_map_tasks_max",
+ "displayName": "Number of Map slots per node",
+ "description": "Number of slots that Map tasks that run simultaneously can occupy on a TaskTracker",
+ "defaultValue": "4",
+ "displayType": "int",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_job_map_mem_mb",
+ "displayName": "Default virtual memory for a job's map-task",
+ "description": "Virtual memory for single Map task",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_job_red_mem_mb",
+ "displayName": "Default virtual memory for a job's reduce-task",
+ "description": "Virtual memory for single Reduce task",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapreduce_task_io_sort_mb",
+ "displayName": "Map-side sort buffer memory",
+ "description": "The total amount of Map-side buffer memory to use while sorting files (Expert-only configuration)",
+ "defaultValue": "200",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapreduce_userlog_retainhours",
+ "displayName": "Job log retention (hours)",
+ "description": "The maximum time, in hours, for which the user-logs are to be retained after the job completion.",
+ "defaultValue": "24",
+ "displayType": "int",
+ "unit": "hours",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "maxtasks_per_job",
+ "displayName": "Maximum number tasks for a Job",
+ "description": "Maximum number of tasks for a single Job",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_cluster_max_map_mem_mb",
+ "displayName": "Upper limit on virtual memory for single Map task",
+ "description": "Upper limit on virtual memory size for a single Map task of any MapReduce job",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_cluster_max_red_mem_mb",
+ "displayName": "Upper limit on virtual memory for single Reduce task",
+ "description": "Upper limit on virtual memory size for a single Reduce task of any MapReduce job",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "scheduler_name",
+ "displayName": "MapReduce Capacity Scheduler",
+ "description": "The scheduler to use for scheduling of MapReduce jobs",
+ "defaultValue": "org.apache.hadoop.mapred.CapacityTaskScheduler",
+ "displayType": "advanced",
+ "isOverridable": false,
+ "isVisible": true,
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_cluster_map_mem_mb",
+ "displayName": "Cluster's Map slot size (virtual memory)",
+ "description": "The virtual memory size of a single Map slot in the MapReduce framework",
+ "defaultValue": "-1",
+ "displayType": "int",
+ "unit": "MB",
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_system_dir",
+ "displayName": "MapReduce system directories",
+ "description": "",
+ "defaultValue": "/mapred/system",
+ "displayType": "directories",
+ "isReconfigurable": true,
+ "isVisible": true,
+ "domain": "global",
+ "serviceName": "MAPREDUCE2",
+ "category": "Advanced"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_hosts_include",
+ "displayName": "Include hosts",
+ "description": "Include enetered hosts",
+ "defaultValue": "mapred.include",
+ "displayType": "directories",
+ "isVisible": false,
+ "serviceName": "MAPREDUCE2",
+ "domain": "global",
+ "category": "Advanced"
+ },
+ {
+ "id": "puppet var",
+ "name": "task_controller",
+ "displayName": "task_controller",
+ "description": "",
+ "defaultValue": "org.apache.hadoop.mapred.DefaultTaskController",
+ "displayType": "advanced",
+ "isVisible": false,
+ "serviceName": "MAPREDUCE2",
+ "domain": "global",
+ "category": "Advanced"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_hosts_exclude",
+ "displayName": "Exclude hosts",
+ "description": "Exclude entered hosts",
+ "defaultValue": "mapred.exclude",
+ "displayType": "directories",
+ "isVisible": false,
+ "serviceName": "MAPREDUCE2",
+ "domain": "global",
+ "category": "Advanced"
+ },
+ {
+ "id": "puppet var",
+ "name": "mapred_jobstatus_dir",
+ "displayName": "Job Status directory",
+ "description": "Directory path to view job status",
+ "defaultValue": "file:////mapred/jobstatus",
+ "displayType": "advanced",
+ "isVisible": false,
+ "serviceName": "MAPREDUCE2",
+ "domain": "global",
+ "category": "Advanced"
+ },
/**********************************************YARN***************************************/
{
"id": "puppet var",
@@ -1695,7 +1898,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1710,7 +1914,8 @@ module.exports =
"filename": "core-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HIVE","WEBHCAT","OOZIE"]
},
{
"id": "puppet var",
@@ -1724,7 +1929,8 @@ module.exports =
"filename": "hdfs-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1738,7 +1944,8 @@ module.exports =
"filename": "hdfs-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1751,7 +1958,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1764,7 +1972,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1777,7 +1986,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1790,7 +2000,8 @@ module.exports =
"displayType": "directory",
"isVisible": false,
"domain": "global",
- "serviceName": "MISC"
+ "serviceName": "MISC",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1804,7 +2015,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1818,7 +2030,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1832,7 +2045,8 @@ module.exports =
"isVisible": true,
"serviceName": "MISC",
"domain": "global",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
{
"id": "puppet var",
@@ -1846,7 +2060,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["MAPREDUCE"]
},
{
"id": "puppet var",
@@ -1860,7 +2075,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HBASE"]
},
{
"id": "puppet var",
@@ -1874,7 +2090,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HIVE"]
},
{
"id": "puppet var",
@@ -1888,7 +2105,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HCATALOG"]
},
{
"id": "puppet var",
@@ -1902,7 +2120,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["WEBHCAT"]
},
{
"id": "puppet var",
@@ -1916,7 +2135,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["OOZIE"]
},
{
"id": "puppet var",
@@ -1930,7 +2150,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["ZOOKEEPER"]
},
{
"id": "puppet var",
@@ -1944,7 +2165,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["GANGLIA"]
},
{
"id": "puppet var",
@@ -1958,7 +2180,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName":"MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -1972,7 +2195,8 @@ module.exports =
"domain": "global",
"isVisible": true,
"serviceName":"MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["NAGIOS"]
},
{
"id": "puppet var",
@@ -1986,7 +2210,8 @@ module.exports =
"isVisible": App.supports.customizeSmokeTestUser,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
{
"id": "puppet var",
@@ -2000,7 +2225,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
{
"id": "puppet var",
@@ -2012,7 +2238,8 @@ module.exports =
"isOverridable": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":["GANGLIA"]
}
]
};
Modified: incubator/ambari/trunk/ambari-web/app/data/config_properties.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/data/config_properties.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/data/config_properties.js (original)
+++ incubator/ambari/trunk/ambari-web/app/data/config_properties.js Thu May 30 22:03:58 2013
@@ -2132,7 +2132,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2147,7 +2148,8 @@ module.exports =
"filename": "core-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HIVE","WEBHCAT","OOZIE"]
},
{
"id": "puppet var",
@@ -2161,7 +2163,8 @@ module.exports =
"filename": "hdfs-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2175,7 +2178,8 @@ module.exports =
"filename": "hdfs-site.xml",
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2188,7 +2192,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2201,7 +2206,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2214,7 +2220,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":[]
},
/*
{
@@ -2269,7 +2276,8 @@ module.exports =
"displayType": "directory",
"isVisible": false,
"domain": "global",
- "serviceName": "MISC"
+ "serviceName": "MISC",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2283,7 +2291,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2297,7 +2306,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName": "MISC",
- "category": "Advanced"
+ "category": "Advanced",
+ "belongsToService":[]
},
/*
{
@@ -2413,7 +2423,8 @@ module.exports =
"isVisible": true,
"serviceName": "MISC",
"domain": "global",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
{
"id": "puppet var",
@@ -2427,7 +2438,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["MAPREDUCE"]
},
{
"id": "puppet var",
@@ -2441,7 +2453,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HBASE"]
},
{
"id": "puppet var",
@@ -2455,7 +2468,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HIVE"]
},
{
"id": "puppet var",
@@ -2469,7 +2483,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HCATALOG"]
},
{
"id": "puppet var",
@@ -2483,7 +2498,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["WEBHCAT"]
},
{
"id": "puppet var",
@@ -2497,7 +2513,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["OOZIE"]
},
/*
{
@@ -2568,7 +2585,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["ZOOKEEPER"]
},
{
"id": "puppet var",
@@ -2582,7 +2600,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["GANGLIA"]
},
{
"id": "puppet var",
@@ -2596,7 +2615,8 @@ module.exports =
"isVisible": false,
"domain": "global",
"serviceName":"MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":[]
},
{
"id": "puppet var",
@@ -2610,7 +2630,8 @@ module.exports =
"domain": "global",
"isVisible": true,
"serviceName":"MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["NAGIOS"]
},
{
"id": "puppet var",
@@ -2624,7 +2645,8 @@ module.exports =
"isVisible": App.supports.customizeSmokeTestUser,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
{
"id": "puppet var",
@@ -2638,7 +2660,8 @@ module.exports =
"isVisible": true,
"domain": "global",
"serviceName": "MISC",
- "category": "Users and Groups"
+ "category": "Users and Groups",
+ "belongsToService":["HDFS"]
},
/*
{
@@ -2664,7 +2687,8 @@ module.exports =
"isOverridable": false,
"domain": "global",
"serviceName": "MISC",
- "category": "General"
+ "category": "General",
+ "belongsToService":["GANGLIA"]
}
]
};
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Thu May 30 22:03:58 2013
@@ -115,6 +115,7 @@ Em.I18n.translations = {
'common.search': 'Search',
'common.confirm': 'Confirm',
'common.upgrade': 'Upgrade',
+ 'common.reUpgrade': 'Retry Upgrade',
'common.security':'Security',
'common.cluster':'Cluster',
'common.add': 'Add',
@@ -128,7 +129,7 @@ Em.I18n.translations = {
'common.abort': 'Abort',
'common.misc': 'Misc',
'common.operations': 'Operations',
- 'common.install': 'Install',
+ 'common.reinstall': 'Re-Install',
'common.errorPopup.header': 'An error has been encountered',
'common.use': 'Use',
'common.stacks': 'Stacks',
Modified: incubator/ambari/trunk/ambari-web/app/models/host_component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/host_component.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/host_component.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/host_component.js Thu May 30 22:03:58 2013
@@ -88,7 +88,33 @@ App.HostComponent = DS.Model.extend({
}
}
return decommissioning;
- }.property('componentName', 'host.hostName', 'App.router.mainServiceController.hdfsService.decommissionDataNodes.@each.hostName')
+ }.property('componentName', 'host.hostName', 'App.router.mainServiceController.hdfsService.decommissionDataNodes.@each.hostName'),
+ /**
+ * User friendly host component status
+ */
+ componentTextStatus: function () {
+ var value = this.get("workStatus");
+
+ switch(value){
+ case "INSTALLING":
+ return 'Installing...';
+ case "INSTALL_FAILED":
+ return 'Install Failed';
+ case "INSTALLED":
+ return 'Stopped';
+ case "STARTED":
+ return 'Started';
+ case "STARTING":
+ return 'Starting...';
+ case "STOPPING":
+ return 'Stopping...';
+ case "UNKNOWN":
+ return 'Heartbeat lost...';
+ case "UPGRADE_FAILED":
+ return 'Upgrade Failed';
+ }
+ return 'Unknown';
+ }.property('workStatus','isDecommissioning')
});
App.HostComponent.FIXTURES = [];
@@ -98,8 +124,6 @@ App.HostComponentStatus = {
starting: "STARTING",
stopped: "INSTALLED",
stopping: "STOPPING",
- stop_failed: "STOP_FAILED",
- start_failed: "START_FAILED",
install_failed: "INSTALL_FAILED",
installing: "INSTALLING",
upgrade_failed: "UPGRADE_FAILED",
@@ -115,10 +139,6 @@ App.HostComponentStatus = {
return 'installed';
case this.stopping:
return 'stopping';
- case this.stop_failed:
- return 'stop_failed';
- case this.start_failed:
- return 'start_failed';
case this.install_failed:
return 'install_failed';
case this.installing:
Modified: incubator/ambari/trunk/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/service.js Thu May 30 22:03:58 2013
@@ -57,7 +57,7 @@ App.Service = DS.Model.extend({
this.set('healthStatus', 'green');
} else if (components.someProperty('workStatus', App.HostComponentStatus.starting)) {
this.set('healthStatus', 'green-blinking');
- } else if (components.someProperty('workStatus', App.HostComponentStatus.stopped) || components.someProperty('workStatus', App.HostComponentStatus.start_failed)) {
+ } else if (components.someProperty('workStatus', App.HostComponentStatus.stopped)) {
this.set('healthStatus', 'red');
} else if (components.someProperty('workStatus', App.HostComponentStatus.unknown)) {
this.set('healthStatus', 'yellow');
Modified: incubator/ambari/trunk/ambari-web/app/models/service_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service_config.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/service_config.js Thu May 30 22:03:58 2013
@@ -19,10 +19,6 @@
var App = require('app');
var validator = require('utils/validator');
-App.ConfigProperties = Ember.ArrayProxy.extend({
- content: require('data/config_properties').configProperties
-});
-
App.ServiceConfig = Ember.Object.extend({
serviceName: '',
configCategories: [],
Modified: incubator/ambari/trunk/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/styles/application.less?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/trunk/ambari-web/app/styles/application.less Thu May 30 22:03:58 2013
@@ -2170,6 +2170,14 @@ table.graphs {
.marker;
}
+ .health-status-color-blue {
+ color:#0000ff;
+ }
+
+ .health-status-color-red {
+ color:#ff0000;
+ }
+
.health-status-DEAD-ORANGE {
background-image: @status-dead-orange-marker;
.marker;
@@ -2242,6 +2250,18 @@ table.graphs {
.host-components .btn-group {
margin: 0 5px 10px 0;
+
+ .component-text-status{
+ cursor: default;
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 20px;
+ color: #333333;
+ white-space: nowrap;
+ font-style: italic;
+ }
}
}
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/admin/misc.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/admin/misc.hbs?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/admin/misc.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/admin/misc.hbs Thu May 30 22:03:58 2013
@@ -31,10 +31,12 @@
</thead>
<tbody>
{{#each user in controller.users}}
- <tr>
- <td>{{user.displayName}}</td>
- <td>{{user.value}}</td>
- </tr>
+ {{#if user.isVisible}}
+ <tr>
+ <td>{{user.displayName}}</td>
+ <td>{{user.value}}</td>
+ </tr>
+ {{/if}}
{{/each}}
</tbody>
</table>
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/summary.hbs Thu May 30 22:03:58 2013
@@ -64,43 +64,60 @@
<div class="span5">
{{#if App.isAdmin}}
<div class="btn-group">
- <a {{ bindAttr class=":btn :dropdown-toggle view.disabledClass"}} data-toggle="dropdown">
+ <a {{ bindAttr class=":btn :dropdown-toggle"}} data-toggle="dropdown">
{{t common.action}}
<span class="caret pull-right"></span>
</a>
<ul class="dropdown-menu">
+ <li>
+ <div class="component-text-status">
+ {{view.componentTextStatus}}
+ </div>
+ </li>
{{#if view.isDataNode}}
- <li {{bindAttr class="view.isDataNodeDecommissionAvailable::hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "decommission" view.content target="controller"}}>
- {{t common.decommission}}
- </a>
- </li>
- <li {{bindAttr class="view.isDataNodeRecommissionAvailable::hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "recommission" view.content target="controller"}}>
- {{t common.recommission}}
- </a>
- </li>
+ {{#if view.isDataNodeDecommissionAvailable}}
+ <li {{bindAttr class="view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "decommission" view.content target="controller"}}>
+ {{t common.decommission}}
+ </a>
+ </li>
+ {{/if}}
+ {{#if view.isDataNodeRecommissionAvailable}}
+ <li {{bindAttr class="view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "recommission" view.content target="controller"}}>
+ {{t common.recommission}}
+ </a>
+ </li>
+ {{/if}}
+ {{/if}}
+ {{#if view.isStart}}
+ <li {{bindAttr class=" view.isDecommissioning:hidden view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
+ {{t common.stop}}
+ </a>
+ </li>
+ {{/if}}
+ {{#unless view.isStart}}
+ <li {{bindAttr class="view.isUpgradeFailed:hidden view.isInstallFailed:hidden view.isDecommissioning:hidden view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
+ {{t common.start}}
+ </a>
+ </li>
+ {{/unless}}
+ {{#if view.isUpgradeFailed}}
+ <li {{bindAttr class="view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
+ {{t common.reUpgrade}}
+ </a>
+ </li>
+ {{/if}}
+ {{#if view.isInstallFailed}}
+ <li {{bindAttr class="view.noActionAvailable"}}>
+ <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
+ {{t common.reinstall}}
+ </a>
+ </li>
{{/if}}
- <li {{bindAttr class="view.isStart::hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "stopComponent" view.content target="controller"}}>
- {{t common.stop}}
- </a>
- </li>
- <li {{bindAttr class="view.isStart:hidden: view.isInstallFailed:hidden: view.isDataNodeRecommissionAvailable:hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "startComponent" view.content target="controller"}}>
- {{t common.start}}
- </a>
- </li>
- <li {{bindAttr class="view.isUpgradeFailed::hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "upgradeComponent" view.content target="controller"}}>
- {{t common.upgrade}}
- </a>
- </li>
- <li {{bindAttr class="view.isInstallFailed::hidden"}}>
- <a href="javascript:void(null)" data-toggle="modal" {{action "installComponent" view.content target="controller"}}>
- {{t common.install}}
- </a>
- </li>
</ul>
</div>
{{/if}}
@@ -165,4 +182,4 @@
</div>
</div>
</div>
-</div>
+</div>
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/wizard/step9HostTasksLogPopup.hbs Thu May 30 22:03:58 2013
@@ -55,8 +55,8 @@
<span class="task-detail-log-rolename" >{{{view.openedTask.role}} {{view.openedTask.command}}</span>
</div>
<div class="task-detail-ico-wrap">
- <div title="Click to Copy" {{action "textTrigger" taskInfo target="view"}} class="task-detail-copy"><i class="icon-copy"></i> {{t common.copy}}</div>
- <div title="Open in New Window" {{action openTaskLogInDialog}} class="task-detail-open-dialog"><i class="icon-external-link"></i> {{t common.open}}</div>
+ <a title="Click to Copy" {{action "textTrigger" taskInfo target="view"}} class="task-detail-copy"><i class="icon-copy"></i> {{t common.copy}}</a>
+ <a title="Open in New Window" {{action openTaskLogInDialog}} class="task-detail-open-dialog"><i class="icon-external-link"></i> {{t common.open}}</a>
</div>
</div>
<div class="task-detail-log-info">
Modified: incubator/ambari/trunk/ambari-web/app/utils/config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/config.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/config.js Thu May 30 22:03:58 2013
@@ -37,9 +37,9 @@ App.config = Em.Object.create({
configMapping: function() {
if (stringUtils.compareVersions(App.get('currentStackVersionNumber'), "2.0") === 1 ||
stringUtils.compareVersions(App.get('currentStackVersionNumber'), "2.0") === 0) {
- return require('data/config_mapping');
+ return require('data/HDP2/config_mapping');
}
- return require('data/HDP2/config_mapping');
+ return require('data/config_mapping');
}.property('App.currentStackVersionNumber'),
preDefinedConfigProperties: function() {
if (stringUtils.compareVersions(App.get('currentStackVersionNumber'), "2.0") === 1 ||
@@ -154,15 +154,16 @@ App.config = Em.Object.create({
properties = (properties.length) ? properties.objectAt(0).properties : {};
for (var index in properties) {
var configsPropertyDef = preDefinedConfigs.findProperty('name', index) || null;
- var serviceConfigObj = {
+ var serviceConfigObj = App.ServiceConfig.create({
name: index,
value: properties[index],
defaultValue: properties[index],
filename: _tag.siteName + ".xml",
isUserProperty: false,
isOverridable: true,
- serviceName: serviceName
- };
+ serviceName: serviceName,
+ belongsToService: []
+ });
if (configsPropertyDef) {
serviceConfigObj.displayType = configsPropertyDef.displayType;
@@ -174,6 +175,7 @@ App.config = Em.Object.create({
serviceConfigObj.isOverridable = configsPropertyDef.isOverridable === undefined ? true : configsPropertyDef.isOverridable;
serviceConfigObj.serviceName = configsPropertyDef ? configsPropertyDef.serviceName : null;
serviceConfigObj.index = configsPropertyDef.index;
+ serviceConfigObj.belongsToService = configsPropertyDef.belongsToService;
}
// MAPREDUCE contains core-site properties but doesn't show them
if(serviceConfigObj.serviceName === 'MAPREDUCE' && serviceConfigObj.filename === 'core-site.xml'){
@@ -367,6 +369,14 @@ App.config = Em.Object.create({
break;
}
},
+
+ miscConfigVisibleProperty: function (configs, serviceToShow) {
+ configs.forEach(function(item) {
+ item.set("isVisible", item.belongsToService.some(function(cur){return serviceToShow.contains(cur)}));
+ });
+ return configs;
+ },
+
/**
* render configs, distribute them by service
* and wrap each in ServiceConfigProperty object
Modified: incubator/ambari/trunk/ambari-web/app/utils/db.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/db.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/db.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/db.js Thu May 30 22:03:58 2013
@@ -49,7 +49,13 @@ App.db.cleanUp = function () {
App.db.data = {
'app': {
'loginName': '',
- 'authenticated': false
+ 'authenticated': false,
+ 'tables': {
+ 'filterConditions': {},
+ 'displayLength': {},
+ 'startIndex': {},
+ 'sortingConditions': {}
+ }
},
'Installer' : {},
@@ -111,6 +117,46 @@ App.db.setAuthenticated = function (auth
console.log('Now present value of authentication is: ' + App.db.data.app.authenticated);
};
+App.db.setFilterConditions = function(name, filterConditions) {
+ console.log('TRACE: Entering db:setFilterConditions function');
+ App.db.data = localStorage.getObject('ambari');
+ if (!App.db.data.app.tables.filterConditions) {
+ App.db.data.app.tables.filterConditions = {};
+ }
+ App.db.data.app.tables.filterConditions[name] = filterConditions;
+ localStorage.setObject('ambari', App.db.data);
+};
+
+App.db.setDisplayLength = function(name, displayLength) {
+ console.log('TRACE: Entering db:setDisplayLength function');
+ App.db.data = localStorage.getObject('ambari');
+ if (!App.db.data.app.tables.displayLength) {
+ App.db.data.app.tables.displayLength = {};
+ }
+ App.db.data.app.tables.displayLength[name] = displayLength;
+ localStorage.setObject('ambari', App.db.data);
+};
+
+App.db.setStartIndex = function(name, startIndex) {
+ console.log('TRACE: Entering db:setStartIndex function');
+ App.db.data = localStorage.getObject('ambari');
+ if (!App.db.data.app.tables.startIndex) {
+ App.db.data.app.tables.startIndex = {};
+ }
+ App.db.data.app.tables.startIndex[name] = startIndex;
+ localStorage.setObject('ambari', App.db.data);
+};
+
+App.db.setSortingStatuses = function(name, sortingConditions) {
+ console.log('TRACE: Entering db:setSortingConditions function');
+ App.db.data = localStorage.getObject('ambari');
+ if (!App.db.data.app.tables.sortingConditions) {
+ App.db.data.app.tables.sortingConditions = {};
+ }
+ App.db.data.app.tables.sortingConditions[name] = sortingConditions;
+ localStorage.setObject('ambari', App.db.data);
+};
+
App.db.setAllHostNames = function (hostNames) {
console.log('TRACE: Entering db:setAllHostNames function');
App.db.data = localStorage.getObject('ambari');
@@ -297,6 +343,42 @@ App.db.getAmbariStacks = function () {
return App.db.data.app.stacks;
};
+App.db.getFilterConditions = function(name) {
+ console.log('TRACE: Entering db:getFilterConditions function');
+ App.db.data = localStorage.getObject('ambari');
+ if (App.db.data.app.tables.filterConditions[name]) {
+ return App.db.data.app.tables.filterConditions[name];
+ }
+ return null;
+};
+
+App.db.getDisplayLength = function(name) {
+ console.log('TRACE: Entering db:getDisplayLength function');
+ App.db.data = localStorage.getObject('ambari');
+ if (App.db.data.app.tables.displayLength[name]) {
+ return App.db.data.app.tables.displayLength[name];
+ }
+ return null;
+};
+
+App.db.getStartIndex = function(name) {
+ console.log('TRACE: Entering db:getStartIndex function');
+ App.db.data = localStorage.getObject('ambari');
+ if (App.db.data.app.tables.startIndex[name]) {
+ return App.db.data.app.tables.startIndex[name];
+ }
+ return null;
+};
+
+App.db.getSortingStatuses = function(name) {
+ console.log('TRACE: Entering db:getSortingConditions function');
+ App.db.data = localStorage.getObject('ambari');
+ if (App.db.data.app.tables.sortingConditions[name]) {
+ return App.db.data.app.tables.sortingConditions[name];
+ }
+ return null;
+};
+
/**
* Return current step for specified Wizard Type
* @param wizardType
Modified: incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js Thu May 30 22:03:58 2013
@@ -189,7 +189,7 @@ App.ServiceConfigsByCategoryView = Ember
var name = this.get('name');
if(name.trim() != ""){
if(validator.isValidConfigKey(name)){
- var configMappingProperty = App.config.configMapping.all().findProperty('name', name);
+ var configMappingProperty = App.config.get('configMapping').all().findProperty('name', name);
if((configMappingProperty == null) && (!serviceConfigNames.contains(name))){
this.set("isKeyError", false);
this.set("errorMessage", "");
Modified: incubator/ambari/trunk/ambari-web/app/views/common/filter_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/filter_view.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/filter_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/filter_view.js Thu May 30 22:03:58 2013
@@ -33,6 +33,11 @@ var wrapperView = Ember.View.extend({
value: null,
/**
+ * Column index
+ */
+ column: null,
+
+ /**
* If this field is exists we dynamically create hidden input element and set value there.
* Used for some cases, where this values will be used outside of component
*/
Modified: incubator/ambari/trunk/ambari-web/app/views/common/quick_view_link_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/quick_view_link_view.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/quick_view_link_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/quick_view_link_view.js Thu May 30 22:03:58 2013
@@ -29,13 +29,18 @@ App.QuickViewLinks = Em.View.extend({
var host;
if (serviceName === 'HDFS') {
- host = components.findProperty('componentName', 'NAMENODE').get('host.publicHostName');
+ host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName', 'NAMENODE').get('host.publicHostName');
} else if (serviceName === 'MAPREDUCE') {
- host = components.findProperty('componentName', 'JOBTRACKER').get('host.publicHostName');
+ host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName', 'JOBTRACKER').get('host.publicHostName');
} else if (serviceName === 'HBASE') {
var component = components.filterProperty('componentName', 'HBASE_MASTER').findProperty('haStatus', 'active');
if(component){
- host = component.get('host.publicHostName');
+ if(App.singleNodeInstall){
+ host = App.singleNodeAlias;
+ }else{
+ host = component.get('host.publicHostName');
+ }
+
}
}
if (!host) {
Modified: incubator/ambari/trunk/ambari-web/app/views/common/sort_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/sort_view.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/sort_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/sort_view.js Thu May 30 22:03:58 2013
@@ -17,6 +17,7 @@
*/
var misc = require('utils/misc');
+var App = require('app');
/**
* Wrapper View for all sort components. Layout template and common actions are located inside of it.
@@ -27,6 +28,51 @@ var misc = require('utils/misc');
*/
var wrapperView = Em.View.extend({
tagName: 'tr',
+
+ /**
+ * Load sort statuses from local storage
+ * Works only after finish filtering in the parent View
+ */
+ loadSortStatuses: function() {
+ var statuses = App.db.getSortingStatuses(this.get('controller.name'));
+ if (!this.get('parentView.filteringComplete')) return;
+ if (statuses) {
+ var childViews = this.get('childViews');
+ var self = this;
+ statuses.forEach(function(st) {
+ if (st.status != 'sorting') {
+ var sortOrder = false;
+ if(st.status == 'sorting_desc') {
+ sortOrder = true;
+ }
+ self.sort(childViews.findProperty('name', st.name), sortOrder);
+
+ childViews.findProperty('name', st.name).set('status', (sortOrder)?'sorting_desc':'sorting_asc');
+ }
+ else {
+ childViews.findProperty('name', st.name).set('status', st.status);
+ }
+ });
+ this.get('parentView').showProperPage();
+ }
+ }.observes('parentView.filteringComplete'),
+
+ /**
+ * Save sort statuses to local storage
+ * Works only after finish filtering in the parent View
+ */
+ saveSortStatuses: function() {
+ if (!this.get('parentView.filteringComplete')) return;
+ var statuses = [];
+ this.get('childViews').forEach(function(childView) {
+ statuses.push({
+ name: childView.get('name'),
+ status: childView.get('status')
+ });
+ });
+ App.db.setSortingStatuses(this.get('controller.name'), statuses);
+ }.observes('childViews.@each.status'),
+
/**
* sort content by property
* @param property
@@ -119,7 +165,8 @@ var fieldView = Em.View.extend({
if(this.get('status') === 'sorting_desc'){
this.get('parentView').sort(this, false);
this.set('status', 'sorting_asc');
- } else {
+ }
+ else {
this.get('parentView').sort(this, true);
this.set('status', 'sorting_desc');
}
Modified: incubator/ambari/trunk/ambari-web/app/views/common/table_view.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/table_view.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/table_view.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/table_view.js Thu May 30 22:03:58 2013
@@ -22,13 +22,74 @@ var sort = require('views/common/sort_vi
App.TableView = Em.View.extend({
- didInsertElement: function () {
- this.set('filterConditions', []);
- this.filter();
+ /**
+ * Shows if all data is loaded and filtered
+ */
+ filteringComplete: false,
+
+ /**
+ * Loaded from local storage startIndex value
+ */
+ startIndexOnLoad: null,
+ /**
+ * Loaded from local storage displayLength value
+ */
+ displayLengthOnLoad: null,
+
+ /**
+ * Do filtering, using saved in the local storage filter conditions
+ */
+ willInsertElement:function () {
+ var self = this;
+ var name = this.get('controller.name');
+
+ this.set('startIndexOnLoad', App.db.getStartIndex(name));
+ this.set('displayLengthOnLoad', App.db.getDisplayLength(name));
+
+ var filterConditions = App.db.getFilterConditions(name);
+ if (filterConditions) {
+ this.set('filterConditions', filterConditions);
+
+ var childViews = this.get('childViews');
+
+ filterConditions.forEach(function(condition) {
+ var view = childViews.findProperty('column', condition.iColumn);
+ if (view) {
+ view.set('value', condition.value);
+ Em.run.next(function() {
+ view.showClearFilter();
+ });
+ }
+ });
+ }
+
+ Em.run.next(function() {
+ Em.run.next(function() {
+ self.set('filteringComplete', true);
+ });
+ });
},
/**
- * return pagination information displayed on the mirroring page
+ * Do pagination after filtering and sorting
+ * Don't call this method! It's already used where it's need
+ */
+ showProperPage: function() {
+ var self = this;
+ Em.run.next(function() {
+ Em.run.next(function() {
+ if (self.get('displayLengthOnLoad')) {
+ self.set('displayLength', self.get('displayLengthOnLoad'));
+ }
+ if(self.get('startIndexOnLoad')) {
+ self.set('startIndex', self.get('startIndexOnLoad'));
+ }
+ });
+ });
+ },
+
+ /**
+ * return pagination information displayed on the page
*/
paginationInfo: function () {
return this.t('apps.filters.paginationInfo').format(this.get('startIndex'), this.get('endIndex'), this.get('filteredContent.length'));
@@ -70,16 +131,16 @@ App.TableView = Em.View.extend({
content: ['10', '25', '50']
}),
- // start index for displayed content on the mirroring page
+ // start index for displayed content on the page
startIndex: 1,
- // calculate end index for displayed content on the mirroring page
+ // calculate end index for displayed content on the page
endIndex: function () {
return Math.min(this.get('filteredContent.length'), this.get('startIndex') + parseInt(this.get('displayLength')) - 1);
}.property('startIndex', 'displayLength', 'filteredContent.length'),
/**
- * onclick handler for previous page button on the mirroring page
+ * onclick handler for previous page button on the page
*/
previousPage: function () {
var result = this.get('startIndex') - parseInt(this.get('displayLength'));
@@ -90,7 +151,7 @@ App.TableView = Em.View.extend({
},
/**
- * onclick handler for next page button on the mirroring page
+ * onclick handler for next page button on the page
*/
nextPage: function () {
var result = this.get('startIndex') + parseInt(this.get('displayLength'));
@@ -99,7 +160,7 @@ App.TableView = Em.View.extend({
}
},
- // the number of mirroring to show on every page of the mirroring page view
+ // the number of rows to show on every page
displayLength: null,
// calculates default value for startIndex property after applying filter or changing displayLength
@@ -112,22 +173,54 @@ App.TableView = Em.View.extend({
*
* @param iColumn number of column by which filter
* @param value
+ * @param type
*/
updateFilter: function (iColumn, value, type) {
var filterCondition = this.get('filterConditions').findProperty('iColumn', iColumn);
if (filterCondition) {
filterCondition.value = value;
- } else {
+ }
+ else {
filterCondition = {
iColumn: iColumn,
value: value,
type: type
- }
+ };
this.get('filterConditions').push(filterCondition);
}
+ this.saveFilterConditions();
this.filter();
},
+ saveFilterConditions: function() {
+ App.db.setFilterConditions(this.get('controller.name'), this.get('filterConditions'));
+ },
+
+ saveDisplayLength: function() {
+ var self = this;
+ Em.run.next(function() {
+ App.db.setDisplayLength(self.get('controller.name'), self.get('displayLength'));
+ });
+ }.observes('displayLength'),
+
+ saveStartIndex: function() {
+ if (this.get('filteringComplete')) {
+ App.db.setStartIndex(this.get('controller.name'), this.get('startIndex'));
+ }
+ }.observes('startIndex'),
+
+ clearFilterCondition: function() {
+ App.db.setFilterConditions(this.get('controller.name'), null);
+ },
+
+ clearDisplayLength: function() {
+ App.db.setDisplayLength(this.get('controller.name'), null);
+ },
+
+ clearStartIndex: function() {
+ App.db.setStartIndex(this.get('controller.name'), null);
+ },
+
/**
* contain filter conditions for each column
*/
@@ -135,7 +228,7 @@ App.TableView = Em.View.extend({
filteredContent: [],
- // contain content to show on the current page of mirroring page view
+ // contain content to show on the current page of data page view
pageContent: function () {
return this.get('filteredContent').slice(this.get('startIndex') - 1, this.get('endIndex'));
}.property('filteredContent.length', 'startIndex', 'endIndex'),
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hbase.js Thu May 30 22:03:58 2013
@@ -80,7 +80,7 @@ App.MainDashboardServiceHbaseView = App.
hbaseMasterWebUrl: function () {
if (this.get('activeMaster.host') && this.get('activeMaster.host').get('publicHostName')) {
- return "http://" + this.get('activeMaster.host').get('publicHostName') + ":60010";
+ return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('activeMaster.host').get('publicHostName')) + ":60010";
}
}.property('activeMaster'),
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/hdfs.js Thu May 30 22:03:58 2013
@@ -70,7 +70,7 @@ App.MainDashboardServiceHdfsView = App.M
}.property("service.nameNodeStartTime"),
nodeWebUrl: function () {
- return "http://" + this.get('service').get('nameNode').get('publicHostName') + ":50070";
+ return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('service').get('nameNode').get('publicHostName')) + ":50070";
}.property('service.nameNode'),
nodeHeap: function () {
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/mapreduce.js Thu May 30 22:03:58 2013
@@ -22,7 +22,7 @@ App.MainDashboardServiceMapreduceView =
templateName: require('templates/main/dashboard/service/mapreduce'),
serviceName: 'MAPREDUCE',
jobTrackerWebUrl: function () {
- return "http://" + this.get('service').get('jobTracker').get('publicHostName') + ":50030";
+ return "http://" + (App.singleNodeInstall ? App.singleNodeAlias : this.get('service').get('jobTracker').get('publicHostName')) + ":50030";
}.property('service.nameNode'),
Chart: App.ChartLinearView.extend({
Modified: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/oozie.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/oozie.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/oozie.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/oozie.js Thu May 30 22:03:58 2013
@@ -23,7 +23,7 @@ App.MainDashboardServiceOozieView = App.
templateName: require('templates/main/dashboard/service/oozie'),
webUi: function () {
- var hostName = this.get('service.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.publicHostName');
+ var hostName = App.singleNodeInstall ? App.singleNodeAlias : this.get('service.hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.publicHostName');
return "http://{0}:11000/oozie".format(hostName);
}.property('service')
});
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host.js?rev=1488035&r1=1488034&r2=1488035&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host.js Thu May 30 22:03:58 2013
@@ -27,7 +27,7 @@ App.MainHostView = App.TableView.extend(
return this.get('controller.content');
}.property('controller.content.length'),
- didInsertElement:function () {
+ willInsertElement: function() {
this._super();
},
@@ -60,6 +60,7 @@ App.MainHostView = App.TableView.extend(
displayName: Em.I18n.t('common.loadAvg'),
type: 'number'
}),
+
HostView:Em.View.extend({
content:null,
tagName: 'tr',
@@ -203,8 +204,9 @@ App.MainHostView = App.TableView.extend(
* Based on <code>filters</code> library
*/
nameFilterView: filters.createTextView({
+ column: 1,
onChangeValue: function(){
- this.get('parentView').updateFilter(1, this.get('value'), 'string');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
}
}),
@@ -213,8 +215,9 @@ App.MainHostView = App.TableView.extend(
* Based on <code>filters</code> library
*/
ipFilterView: filters.createTextView({
+ column: 2,
onChangeValue: function(){
- this.get('parentView').updateFilter(2, this.get('value'), 'string');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string');
}
}),
@@ -225,8 +228,9 @@ App.MainHostView = App.TableView.extend(
cpuFilterView: filters.createTextView({
fieldType: 'input-mini',
fieldId: 'cpu_filter',
+ column: 3,
onChangeValue: function(){
- this.get('parentView').updateFilter(3, this.get('value'), 'number');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'number');
}
}),
@@ -237,8 +241,9 @@ App.MainHostView = App.TableView.extend(
loadAvgFilterView: filters.createTextView({
fieldType: 'input-mini',
fieldId: 'load_avg_filter',
+ column: 5,
onChangeValue: function(){
- this.get('parentView').updateFilter(5, this.get('value'), 'number');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'number');
}
}),
@@ -249,8 +254,9 @@ App.MainHostView = App.TableView.extend(
ramFilterView: filters.createTextView({
fieldType: 'input-mini',
fieldId: 'ram_filter',
+ column: 4,
onChangeValue: function(){
- this.get('parentView').updateFilter(4, this.get('value'), 'ambari-bandwidth');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'ambari-bandwidth');
}
}),
@@ -259,6 +265,9 @@ App.MainHostView = App.TableView.extend(
* Based on <code>filters</code> library
*/
componentsFilterView: filters.createComponentView({
+
+ column: 6,
+
/**
* Inner FilterView. Used just to render component. Value bind to <code>mainview.value</code> property
* Base methods was implemented in <code>filters.componentFieldView</code>
@@ -318,7 +327,7 @@ App.MainHostView = App.TableView.extend(
*/
applyFilter:function() {
this._super();
-
+ var self = this;
var chosenComponents = [];
this.get('masterComponents').filterProperty('checkedForHostFilter', true).forEach(function(item){
@@ -330,21 +339,42 @@ App.MainHostView = App.TableView.extend(
this.get('clientComponents').filterProperty('checkedForHostFilter', true).forEach(function(item){
chosenComponents.push(item.get('id'));
});
- this.set('value', chosenComponents.toString());
+ Em.run.next(function() {
+ self.set('value', chosenComponents.toString());
+ });
},
- didInsertElement:function () {
- if (this.get('controller.comeWithFilter')) {
- this.applyFilter();
- this.set('controller.comeWithFilter', false);
- } else {
- this.clearFilter();
+ /**
+ * Verify that checked checkboxes are equal to value stored in hidden field (components ids list)
+ */
+ checkComponents: function() {
+ var components = this.get('value').split(',');
+ var self = this;
+ if (components) {
+ components.forEach(function(componentId) {
+ if(!self.tryCheckComponent(self, 'masterComponents', componentId)) {
+ if(!self.tryCheckComponent(self, 'slaveComponents', componentId)) {
+ self.tryCheckComponent(self, 'clientComponents', componentId);
+ }
+ }
+ });
+ }
+ }.observes('value'),
+
+ tryCheckComponent: function(self, category, componentId) {
+ var c = self.get(category).findProperty('id', componentId);
+ if (c) {
+ if (!c.get('checkedForHostFilter')) {
+ c.set('checkedForHostFilter', true);
+ return true;
+ }
}
+ return false;
}
}),
onChangeValue: function(){
- this.get('parentView').updateFilter(6, this.get('value'), 'multiple');
+ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'multiple');
}
}),