Repository: ambari Updated Branches: refs/heads/branch-windows-dev be54a4fcf -> 2868c2051
AMBARI-8120 - Configs tab doesn't appear for all services Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2868c205 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2868c205 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2868c205 Branch: refs/heads/branch-windows-dev Commit: 2868c20515cc56f5f044c1bf5a289cb8d1c4c4d1 Parents: be54a4f Author: Artem Baranchuk <abaranc...@hortonworks.com> Authored: Mon Nov 3 13:13:20 2014 +0200 Committer: Artem Baranchuk <abaranc...@hortonworks.com> Committed: Thu Nov 6 20:06:54 2014 +0200 ---------------------------------------------------------------------- .../YARN/configuration-mapred/mapred-site.xml | 212 +++++++++++++++++++ .../services/YARN/configuration/mapred-site.xml | 212 ------------------- .../HDPWIN/2.1/services/YARN/metainfo.xml | 1 - .../data/configuration/cluster_env_site.json | 14 ++ .../controllers/main/service/info/configs.js | 27 +++ ambari-web/app/utils/ajax/ajax.js | 5 + 6 files changed, 258 insertions(+), 213 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration-mapred/mapred-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration-mapred/mapred-site.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration-mapred/mapred-site.xml new file mode 100644 index 0000000..8e909bc --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration-mapred/mapred-site.xml @@ -0,0 +1,212 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- Put site-specific property overrides in this file. --> +<configuration xmlns:xi="http://www.w3.org/2001/XInclude"> + <!-- MR AM properties --> + <property> + <name>mapreduce.framework.name</name> + <value>yarn</value> + </property> + <property> + <name>yarn.app.mapreduce.am.staging-dir</name> + <value>/user</value> + </property> + <property> + <name>mapreduce.job.hdfs-servers</name> + <value>${fs.defaultFS}</value> + </property> + <property> + <name>mapreduce.map.speculative</name> + <value>false</value> + <description>If true, then multiple instances of some map tasks + may be executed in parallel.</description> + </property> + <property> + <name>mapreduce.reduce.speculative</name> + <value>false</value> + <description>If true, then multiple instances of some reduce tasks + may be executed in parallel.</description> + </property> + <property> + <name>mapreduce.job.reduce.slowstart.completedmaps</name> + <value>0.05</value> + <description>Fraction of the number of maps in the job which should be + complete before reduces are scheduled for the job. + </description> + </property> + <property> + <name>mapreduce.task.timeout</name> + <value>600000</value> + <description>The number of milliseconds before a task will be + terminated if it neither reads an input, writes an output, nor + updates its status string. A value of 0 disables the timeout. + </description> + </property> + <property> + <name>jetty.connector</name> + <value>org.mortbay.jetty.nio.SelectChannelConnector</value> + <description>No description</description> + </property> + <property> + <name>mapred.child.root.logger</name> + <value>INFO,TLA</value> + </property> + <property> + <name>mapreduce.fileoutputcommitter.marksuccessfuljobs</name> + <value>true</value> + </property> + <property> + <name>mapreduce.job.acl-view-job</name> + <value>*</value> + </property> + <!-- i/o properties --> + <property> + <name>io.sort.mb</name> + <value>200</value> + <description>No description</description> + </property> + <property> + <name>io.sort.spill.percent</name> + <value>0.9</value> + <description>No description</description> + </property> + <property> + <name>io.sort.factor</name> + <value>100</value> + <description>No description</description> + </property> + <!-- map tasks' properties --> + <property> + <name>mapreduce.map.output.compress</name> + <value>true</value> + <description>Should the outputs of the maps be compressed before being + sent across the network. Uses SequenceFile compression. + </description> + </property> + <property> + <name>mapreduce.map.output.compress.codec</name> + <value>org.apache.hadoop.io.compress.SnappyCodec</value> + <description>If the map outputs are compressed, how should they be + compressed? + </description> + </property> + <!-- reduce tasks' properties --> + <property> + <name>mapreduce.reduce.shuffle.parallelcopies</name> + <value>30</value> + <description>The default number of parallel transfers run by reduce + during the copy(shuffle) phase. + </description> + </property> + <property> + <name>mapreduce.reduce.merge.inmem.threshold</name> + <value>1000</value> + <description>The threshold, in terms of the number of files + for the in-memory merge process. When we accumulate threshold number of files + we initiate the in-memory merge and spill to disk. A value of 0 or less than + 0 indicates we want to DON'T have any threshold and instead depend only on + the ramfs's memory consumption to trigger the merge. + </description> + </property> + <property> + <name>mapreduce.reduce.shuffle.merge.percent</name> + <value>0.66</value> + <description>The usage threshold at which an in-memory merge will be + initiated, expressed as a percentage of the total memory allocated to + storing in-memory map outputs, as defined by + mapreduce.reduce.shuffle.input.buffer.percent. + </description> + </property> + <property> + <name>mapreduce.reduce.shuffle.input.buffer.percent</name> + <value>0.70</value> + <description>The percentage of memory to be allocated from the maximum heap + size to storing map outputs during the shuffle. + </description> + </property> + <!-- JobHistory Server --> + <property> + <name>mapreduce.jobhistory.intermediate-done-dir</name> + <value>/mapred/history/done_intermediate</value> + </property> + <property> + <name>mapreduce.jobhistory.done-dir</name> + <value>/mapred/history/done</value> + </property> + <property> + <name>mapreduce.jobhistory.address</name> + <value>localhost:10020</value> + </property> + <property> + <name>mapreduce.jobhistory.webapp.address</name> + <value>localhost:19888</value> + </property> + <property> + <name>mapreduce.jobhistory.webapp.https.address</name> + <value>localhost:19888</value> + </property> + <property> + <name>yarn.app.mapreduce.am.create-intermediate-jh-base-dir</name> + <value>false</value> + </property> + <!-- JobHistory Security Settings --> + <property> + <name>mapreduce.application.classpath</name> + <value>%HADOOP_CONF_DIR%,%HADOOP_COMMON_HOME%/share/hadoop/common/*,%HADOOP_COMMON_HOME%/share/hadoop/common/lib/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/lib/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/lib/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/lib/*</value> + <description>CLASSPATH for MR applications. A comma-separated list + of CLASSPATH entries</description> + </property> + <property> + <name>mapreduce.shuffle.ssl.enabled</name> + <value>false</value> + </property> + <property> + <name>mapreduce.ssl.enabled</name> + <value>false</value> + </property> + <property> + <name>mapreduce.job.counters.max</name> + <value>20000</value> + </property> + <property> + <name>mapreduce.job.counters.groups.max</name> + <value>10000</value> + </property> + <property> + <name>mapreduce.job.counters.group.name.max</name> + <value>1000</value> + </property> + <property> + <name>mapreduce.job.counters.counter.name.max</name> + <value>1000</value> + </property> + <property> + <name>mapreduce.cluster.local.dir</name> + <value>c:\hdpdata\hadoop\local</value> + </property> + + <property> + <name>mapred.job.tracker.history.completed.location</name> + <value>/mapred/history/done</value> + </property> + + <property> + <name>mapred.local.dir</name> + <value>c:\hdpdata\hdfs\mapred\local</value> + </property> + + <property> + <name>mapreduce.map.java.opts</name> + <value>-Xmx756m</value> + </property> + + <property> + <name>mapred.child.tmp</name> + <value>c:\hdp\temp\hadoop</value> + </property> + + <property> + <name>mapreduce.reduce.java.opts</name> + <value>-Xmx756m</value> + </property> +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration/mapred-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration/mapred-site.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration/mapred-site.xml deleted file mode 100644 index 8e909bc..0000000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/configuration/mapred-site.xml +++ /dev/null @@ -1,212 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- Put site-specific property overrides in this file. --> -<configuration xmlns:xi="http://www.w3.org/2001/XInclude"> - <!-- MR AM properties --> - <property> - <name>mapreduce.framework.name</name> - <value>yarn</value> - </property> - <property> - <name>yarn.app.mapreduce.am.staging-dir</name> - <value>/user</value> - </property> - <property> - <name>mapreduce.job.hdfs-servers</name> - <value>${fs.defaultFS}</value> - </property> - <property> - <name>mapreduce.map.speculative</name> - <value>false</value> - <description>If true, then multiple instances of some map tasks - may be executed in parallel.</description> - </property> - <property> - <name>mapreduce.reduce.speculative</name> - <value>false</value> - <description>If true, then multiple instances of some reduce tasks - may be executed in parallel.</description> - </property> - <property> - <name>mapreduce.job.reduce.slowstart.completedmaps</name> - <value>0.05</value> - <description>Fraction of the number of maps in the job which should be - complete before reduces are scheduled for the job. - </description> - </property> - <property> - <name>mapreduce.task.timeout</name> - <value>600000</value> - <description>The number of milliseconds before a task will be - terminated if it neither reads an input, writes an output, nor - updates its status string. A value of 0 disables the timeout. - </description> - </property> - <property> - <name>jetty.connector</name> - <value>org.mortbay.jetty.nio.SelectChannelConnector</value> - <description>No description</description> - </property> - <property> - <name>mapred.child.root.logger</name> - <value>INFO,TLA</value> - </property> - <property> - <name>mapreduce.fileoutputcommitter.marksuccessfuljobs</name> - <value>true</value> - </property> - <property> - <name>mapreduce.job.acl-view-job</name> - <value>*</value> - </property> - <!-- i/o properties --> - <property> - <name>io.sort.mb</name> - <value>200</value> - <description>No description</description> - </property> - <property> - <name>io.sort.spill.percent</name> - <value>0.9</value> - <description>No description</description> - </property> - <property> - <name>io.sort.factor</name> - <value>100</value> - <description>No description</description> - </property> - <!-- map tasks' properties --> - <property> - <name>mapreduce.map.output.compress</name> - <value>true</value> - <description>Should the outputs of the maps be compressed before being - sent across the network. Uses SequenceFile compression. - </description> - </property> - <property> - <name>mapreduce.map.output.compress.codec</name> - <value>org.apache.hadoop.io.compress.SnappyCodec</value> - <description>If the map outputs are compressed, how should they be - compressed? - </description> - </property> - <!-- reduce tasks' properties --> - <property> - <name>mapreduce.reduce.shuffle.parallelcopies</name> - <value>30</value> - <description>The default number of parallel transfers run by reduce - during the copy(shuffle) phase. - </description> - </property> - <property> - <name>mapreduce.reduce.merge.inmem.threshold</name> - <value>1000</value> - <description>The threshold, in terms of the number of files - for the in-memory merge process. When we accumulate threshold number of files - we initiate the in-memory merge and spill to disk. A value of 0 or less than - 0 indicates we want to DON'T have any threshold and instead depend only on - the ramfs's memory consumption to trigger the merge. - </description> - </property> - <property> - <name>mapreduce.reduce.shuffle.merge.percent</name> - <value>0.66</value> - <description>The usage threshold at which an in-memory merge will be - initiated, expressed as a percentage of the total memory allocated to - storing in-memory map outputs, as defined by - mapreduce.reduce.shuffle.input.buffer.percent. - </description> - </property> - <property> - <name>mapreduce.reduce.shuffle.input.buffer.percent</name> - <value>0.70</value> - <description>The percentage of memory to be allocated from the maximum heap - size to storing map outputs during the shuffle. - </description> - </property> - <!-- JobHistory Server --> - <property> - <name>mapreduce.jobhistory.intermediate-done-dir</name> - <value>/mapred/history/done_intermediate</value> - </property> - <property> - <name>mapreduce.jobhistory.done-dir</name> - <value>/mapred/history/done</value> - </property> - <property> - <name>mapreduce.jobhistory.address</name> - <value>localhost:10020</value> - </property> - <property> - <name>mapreduce.jobhistory.webapp.address</name> - <value>localhost:19888</value> - </property> - <property> - <name>mapreduce.jobhistory.webapp.https.address</name> - <value>localhost:19888</value> - </property> - <property> - <name>yarn.app.mapreduce.am.create-intermediate-jh-base-dir</name> - <value>false</value> - </property> - <!-- JobHistory Security Settings --> - <property> - <name>mapreduce.application.classpath</name> - <value>%HADOOP_CONF_DIR%,%HADOOP_COMMON_HOME%/share/hadoop/common/*,%HADOOP_COMMON_HOME%/share/hadoop/common/lib/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/lib/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/lib/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/lib/*</value> - <description>CLASSPATH for MR applications. A comma-separated list - of CLASSPATH entries</description> - </property> - <property> - <name>mapreduce.shuffle.ssl.enabled</name> - <value>false</value> - </property> - <property> - <name>mapreduce.ssl.enabled</name> - <value>false</value> - </property> - <property> - <name>mapreduce.job.counters.max</name> - <value>20000</value> - </property> - <property> - <name>mapreduce.job.counters.groups.max</name> - <value>10000</value> - </property> - <property> - <name>mapreduce.job.counters.group.name.max</name> - <value>1000</value> - </property> - <property> - <name>mapreduce.job.counters.counter.name.max</name> - <value>1000</value> - </property> - <property> - <name>mapreduce.cluster.local.dir</name> - <value>c:\hdpdata\hadoop\local</value> - </property> - - <property> - <name>mapred.job.tracker.history.completed.location</name> - <value>/mapred/history/done</value> - </property> - - <property> - <name>mapred.local.dir</name> - <value>c:\hdpdata\hdfs\mapred\local</value> - </property> - - <property> - <name>mapreduce.map.java.opts</name> - <value>-Xmx756m</value> - </property> - - <property> - <name>mapred.child.tmp</name> - <value>c:\hdp\temp\hadoop</value> - </property> - - <property> - <name>mapreduce.reduce.java.opts</name> - <value>-Xmx756m</value> - </property> -</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/metainfo.xml index 31eb346..e7206d3 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/metainfo.xml @@ -125,7 +125,6 @@ <config-type>yarn-site</config-type> <config-type>yarn-env</config-type> <config-type>core-site</config-type> - <config-type>mapred-site</config-type> <config-type>yarn-log4j</config-type> </configuration-dependencies> </service> http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-web/app/assets/data/configuration/cluster_env_site.json ---------------------------------------------------------------------- diff --git a/ambari-web/app/assets/data/configuration/cluster_env_site.json b/ambari-web/app/assets/data/configuration/cluster_env_site.json new file mode 100644 index 0000000..292b0a1 --- /dev/null +++ b/ambari-web/app/assets/data/configuration/cluster_env_site.json @@ -0,0 +1,14 @@ +{ + "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/configurations?type=cluster-env", + "items" : [ + { + "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/configurations?type=cluster-env&tag=version1", + "tag" : "version1", + "type" : "cluster-env", + "version" : 1, + "Config" : { + "cluster_name" : "c" + } + } +] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index bc5406d..30e0311 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -57,6 +57,9 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM // note passed on configs save serviceConfigVersionNote: '', versionLoaded: false, + // current cluster-env version + clusterEnvTagVersion: '', + isCurrentSelected: function () { return App.ServiceConfigVersion.find(this.get('content.serviceName') + "_" + this.get('selectedVersion')).get('isCurrent'); }.property('selectedVersion'), @@ -244,6 +247,26 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM loadStep: function () { console.log("TRACE: Loading configure for service"); this.clearStep(); + this.loadClusterEnvSite(); + }, + + /** + * load all tag versions of cluster-env site + * @returns {$.ajax} + */ + loadClusterEnvSite: function () { + var self = this; + return App.ajax.send({ + name: 'config.cluster_env_site', + sender: self, + success: 'loadClusterEnvSiteSuccess' + }); + }, + + loadClusterEnvSiteSuccess: function (data) { + // find the latest tag version + var maxVersion = Math.max.apply(this, data.items.mapProperty('version')); + this.set('clusterEnvTagVersion', data.items.findProperty('version', maxVersion).tag); this.loadServiceConfigs(); }, @@ -389,6 +412,10 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM }, this); App.router.get('configurationController').saveToDB(configurations); + + // add cluster-env tag + siteToTagMap['cluster-env'] = this.get('clusterEnvTagVersion'); + this.loadedClusterSiteToTagMap = siteToTagMap; this.set('selectedVersion', selectedVersion); //reset map if selected current version of default group http://git-wip-us.apache.org/repos/asf/ambari/blob/2868c205/ambari-web/app/utils/ajax/ajax.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index f264dc4..65c1994 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -523,6 +523,11 @@ var urls = { 'mock': '/data/configurations/host_level_overrides_configs.json?{params}' }, + 'config.cluster_env_site': { + 'real': '/clusters/{clusterName}/configurations?type=cluster-env', + 'mock': '/data/configuration/cluster_env_site.json' + }, + 'host.host_component.add_new_component': { 'real': '/clusters/{clusterName}/hosts?Hosts/host_name={hostName}', 'mock': '/data/wizard/deploy/poll_1.json',