ambari git commit: AMBARI-10801. Hive Review: Multiple /recommendation API fixes (mpapirkovskyy via srimanth)

2015-04-29 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 47907b961 - 98098a891


AMBARI-10801. Hive Review: Multiple /recommendation API fixes (mpapirkovskyy 
via srimanth)


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

Branch: refs/heads/trunk
Commit: 98098a89115f6e144e81dbd82a5c443bf7706c7d
Parents: 47907b9
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Apr 28 22:40:54 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Apr 28 23:16:35 2015 -0700

--
 .../services/HIVE/configuration/hive-site.xml   |  2 +-
 .../stacks/HDP/2.2/services/stack_advisor.py| 46 +++-
 .../stacks/2.2/common/test_stack_advisor.py | 44 ++-
 3 files changed, 79 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/98098a89/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
index 4525345..38bef72 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml
@@ -179,7 +179,7 @@ limitations under the License.
 value-attributes
   typeint/type
   minimum64/minimum
-  maximum4398046511104/maximum
+  maximum4294967296/maximum
   unitB/unit
   step-increment/step-increment
 /value-attributes

http://git-wip-us.apache.org/repos/asf/ambari/blob/98098a89/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index d5e1534..7ce98b9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -232,9 +232,6 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 putHiveSiteProperty(hive.vectorized.execution.enabled, true)
 putHiveSiteProperty(hive.vectorized.execution.reduce.enabled, false)
 
-# Memory
-putHiveSiteProperty(hive.exec.reducers.bytes.per.reducer, 67108864)
-
 # Transactions
 putHiveEnvProperty(hive_txn_acid, Off)
 if str(configurations[hive-env][properties][hive_txn_acid]).lower() 
== on:
@@ -296,22 +293,24 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
   yarn.scheduler.minimum-allocation-mb in 
configurations[yarn-site][properties]:
   container_size = 
configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb]
 putHiveSiteProperty(hive.tez.container.size, container_size)
-putHiveSiteProperty(hive.auto.convert.join.noconditionaltask.size, 
str(int(int(container_size)/3)*1024*1024))
 putHiveSiteProperty(hive.prewarm.enabled, false)
 putHiveSiteProperty(hive.prewarm.numcontainers, 3)
 putHiveSiteProperty(hive.tez.auto.reducer.parallelism, true)
 putHiveSiteProperty(hive.tez.dynamic.partition.pruning, true)
 
+# Memory
+putHiveSiteProperty(hive.auto.convert.join.noconditionaltask.size, 
int(int(container_size)*1024*1024/3))
+putHiveSiteProperty(hive.exec.reducers.bytes.per.reducer, 67108864)
+
 # CBO
 putHiveEnvProperty(cost_based_optimizer, On)
 if 
str(configurations[hive-env][properties][cost_based_optimizer]).lower() 
== on:
   putHiveSiteProperty(hive.cbo.enable, true)
-  putHiveSiteProperty(hive.stats.fetch.partition.stats, true)
-  putHiveSiteProperty(hive.stats.fetch.column.stats, true)
 else:
   putHiveSiteProperty(hive.cbo.enable, false)
-  putHiveSiteProperty(hive.stats.fetch.partition.stats, false)
-  putHiveSiteProperty(hive.stats.fetch.column.stats, false)
+hive_cbo_enable = 
configurations[hive-site][properties][hive.cbo.enable]
+putHiveSiteProperty(hive.stats.fetch.partition.stats, hive_cbo_enable)
+putHiveSiteProperty(hive.stats.fetch.column.stats, hive_cbo_enable)
 putHiveSiteProperty(hive.compute.query.using.stats , true)
 
 # Interactive Query
@@ -340,11 +339,22 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 else:
   putHiveSiteProperty(hive.security.authorization.enabled, true)
 
-if 
str(configurations[hive-env][properties][hive_security_authorization]).lower()
 == 

[2/2] ambari git commit: AMBARI-10828. Ambari memory calculation for Tez for config property: tez.runtime.io.sort.mb (dlysnichenko)

2015-04-29 Thread dmitriusan
AMBARI-10828. Ambari memory calculation for Tez for config property: 
tez.runtime.io.sort.mb (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 798f1072dd1db98a1980f8c245a10b14883235ce
Parents: 1ba28aa
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Wed Apr 29 14:32:19 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Wed Apr 29 14:32:19 2015 +0300

--
 .../resources/stacks/HDP/2.3/services/stack_advisor.py| 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/798f1072/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 8b56eb9..c3a9945 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -29,7 +29,15 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
 
   def recommendTezConfigurations(self, configurations, clusterData, services, 
hosts):
 super(HDP23StackAdvisor, self).recommendTezConfigurations(configurations, 
clusterData, services, hosts)
+
+putTezProperty = self.putProperty(configurations, tez-site)
+# remove 2gb limit for tez.runtime.io.sort.mb
+# in HDP 2.3 tez.runtime.sorter.class is set by default to PIPELINED, in 
other case comment calculation code below
+taskResourceMemory = clusterData['mapMemory'] if clusterData['mapMemory'] 
 2048 else int(clusterData['reduceMemory'])
+taskResourceMemory = min(clusterData['containers'] * 
clusterData['ramPerContainer'], taskResourceMemory)
+putTezProperty(tez.runtime.io.sort.mb, int(taskResourceMemory * 0.4))
+
 if tez-site in services[configurations] and tez.runtime.sorter.class 
in services[configurations][tez-site][properties]:
   if 
services[configurations][tez-site][properties][tez.runtime.sorter.class]
 == LEGACY:
 putTezAttribute = self.putPropertyAttribute(configurations, tez-site)
-putTezAttribute(tez.runtime.io.sort.mb,maximum, 2047)
\ No newline at end of file
+putTezAttribute(tez.runtime.io.sort.mb, maximum, 2047)



[1/2] ambari git commit: AMBARI-10829. YARN heapsize does not take effect (dlysnichenko)

2015-04-29 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk a39eb7d3b - 798f1072d


AMBARI-10829. YARN heapsize does not take effect (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 1ba28aa47c58566d5dd4605a3608b7c03ee90351
Parents: a39eb7d
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Wed Apr 29 14:31:25 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Wed Apr 29 14:31:25 2015 +0300

--
 .../services/YARN/configuration/yarn-env.xml| 119 +++
 .../catalog/UpgradeCatalog_1.3_to_2.2.json  |   2 +-
 2 files changed, 120 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ba28aa4/ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/configuration/yarn-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/configuration/yarn-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/configuration/yarn-env.xml
index dd3e3ef..4c99823 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/configuration/yarn-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/YARN/configuration/yarn-env.xml
@@ -26,4 +26,123 @@
 value1024/value
 descriptionMax heapsize for AppTimelineServer using a numerical value in 
the scale of MB/description
   /property
+  
+  !-- yarn-env.sh --
+  property
+namecontent/name
+descriptionThis is the jinja template for yarn-env.sh file/description
+value
+export HADOOP_YARN_HOME={{hadoop_yarn_home}}
+export YARN_LOG_DIR={{yarn_log_dir_prefix}}/$USER
+export YARN_PID_DIR={{yarn_pid_dir_prefix}}/$USER
+export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}
+export JAVA_HOME={{java64_home}}
+
+# User for YARN daemons
+export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}
+
+# resolve links - $0 may be a softlink
+export YARN_CONF_DIR=${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}
+
+# some Java parameters
+# export JAVA_HOME=/home/y/libexec/jdk1.6.0/
+if [ $JAVA_HOME !=  ]; then
+  #echo run java in $JAVA_HOME
+  JAVA_HOME=$JAVA_HOME
+fi
+
+if [ $JAVA_HOME =  ]; then
+  echo Error: JAVA_HOME is not set.
+  exit 1
+fi
+
+JAVA=$JAVA_HOME/bin/java
+JAVA_HEAP_MAX=-Xmx1000m
+
+# For setting YARN specific HEAP sizes please use this
+# Parameter and set appropriately
+YARN_HEAPSIZE={{yarn_heapsize}}
+
+# check envvars which might override default args
+if [ $YARN_HEAPSIZE !=  ]; then
+  JAVA_HEAP_MAX=-Xmx$YARN_HEAPSIZEm
+fi
+
+# Resource Manager specific parameters
+
+# Specify the max Heapsize for the ResourceManager using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1000.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_RESOURCEMANAGER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}}
+
+# Specify the JVM options to be used when starting the ResourceManager.
+# These options will be appended to the options specified as YARN_OPTS
+# and therefore may override any similar flags set in YARN_OPTS
+#export YARN_RESOURCEMANAGER_OPTS=
+
+# Node Manager specific parameters
+
+# Specify the max Heapsize for the NodeManager using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1000.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_NODEMANAGER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}}
+
+# Specify the max Heapsize for the timeline server using a numerical value
+# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
+# the value to 1024.
+# This value will be overridden by an Xmx setting specified in either YARN_OPTS
+# and/or YARN_TIMELINESERVER_OPTS.
+# If not specified, the default value will be picked from either YARN_HEAPMAX
+# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
+export YARN_TIMELINESERVER_HEAPSIZE={{apptimelineserver_heapsize}}
+
+# Specify the JVM options to be used when starting the NodeManager.
+# These options will be appended to the options specified as YARN_OPTS
+# and therefore may override any similar flags set in 

[1/4] ambari git commit: AMBARI-10826 Move App.ServiceConfigProperty object to separate file. (ababiichuk)

2015-04-29 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 798f1072d - 2514cda00


http://git-wip-us.apache.org/repos/asf/ambari/blob/11a09c57/ambari-web/test/models/service_config_test.js
--
diff --git a/ambari-web/test/models/service_config_test.js 
b/ambari-web/test/models/service_config_test.js
deleted file mode 100644
index f381ab8..000
--- a/ambari-web/test/models/service_config_test.js
+++ /dev/null
@@ -1,1418 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var App = require('app');
-
-require('models/service_config');
-
-var serviceConfig,
-  serviceConfigCategory,
-  group,
-  serviceConfigProperty,
-  serviceConfigPropertyInit,
-  configsData = [
-Ember.Object.create({
-  category: 'c0',
-  overrides: [
-{
-  error: true,
-  errorMessage: 'error'
-},
-{
-  error: true
-},
-{}
-  ]
-}),
-Ember.Object.create({
-  category: 'c1',
-  isValid: false,
-  isVisible: true
-}),
-Ember.Object.create({
-  category: 'c0',
-  isValid: true,
-  isVisible: true
-}),
-Ember.Object.create({
-  category: 'c1',
-  isValid: false,
-  isVisible: false
-})
-  ],
-  configCategoriesData = [
-Em.Object.create({
-  name: 'c0',
-  slaveErrorCount: 1
-}),
-Em.Object.create({
-  name: 'c1',
-  slaveErrorCount: 2
-})
-  ],
-  nameCases = [
-{
-  name: 'DataNode',
-  primary: 'DATANODE'
-},
-{
-  name: 'TaskTracker',
-  primary: 'TASKTRACKER'
-},
-{
-  name: 'RegionServer',
-  primary: 'HBASE_REGIONSERVER'
-},
-{
-  name: 'name',
-  primary: null
-}
-  ],
-  components = [
-{
-  name: 'NameNode',
-  master: true
-},
-{
-  name: 'SNameNode',
-  master: true
-},
-{
-  name: 'JobTracker',
-  master: true
-},
-{
-  name: 'HBase Master',
-  master: true
-},
-{
-  name: 'Oozie Master',
-  master: true
-},
-{
-  name: 'Hive Metastore',
-  master: true
-},
-{
-  name: 'WebHCat Server',
-  master: true
-},
-{
-  name: 'ZooKeeper Server',
-  master: true
-},
-{
-  name: 'Ganglia',
-  master: true
-},
-{
-  name: 'DataNode',
-  slave: true
-},
-{
-  name: 'TaskTracker',
-  slave: true
-},
-{
-  name: 'RegionServer',
-  slave: true
-}
-  ],
-  masters = components.filterProperty('master'),
-  slaves = components.filterProperty('slave'),
-  groupsData = {
-groups: [
-  Em.Object.create({
-errorCount: 1
-  }),
-  Em.Object.create({
-errorCount: 2
-  })
-]
-  },
-  groupNoErrorsData = [].concat(configsData.slice(2)),
-  groupErrorsData = [configsData[1]],
-  overridableFalseData = [
-{
-  isOverridable: false
-},
-{
-  isEditable: false,
-  overrides: configsData[0].overrides
-},
-{
-  displayType: 'masterHost'
-}
-  ],
-  overridableTrueData = [
-{
-  isOverridable: true,
-  isEditable: true
-},{
-  isOverridable: true,
-  overrides: []
-},
-{
-  isOverridable: true
-}
-  ],
-  overriddenFalseData = [
-{
-  overrides: null,
-  isOriginalSCP: true
-},
-{
-  overrides: [],
-  isOriginalSCP: true
-}
-  ],
-  overriddenTrueData = [
-{
-  overrides: configsData[0].overrides
-},
-{
-  isOriginalSCP: false
-}
-  ],
-  removableFalseData = [
-{
-  isEditable: false
-},
-{
-  hasOverrides: true
-},
-{
-  isUserProperty: false,
-  isOriginalSCP: true
-}
-  ],
-  removableTrueData = [
-{
-  isEditable: true,
-  hasOverrides: false,
-  isUserProperty: true
-},
-{
-  isEditable: true,
-  hasOverrides: false,
-  isOriginalSCP: false
-}
-  ],
-  initPropertyData = [
-{
-  initial: {
-displayType: 'password',
-value: 'value'
-  },
-  result: {
-retypedPassword: 'value'
-  }
-},
-{
-  

ambari git commit: AMBARI-10832. Comparing of enhanced config versions does not show full comparison-bar (onechiporenko)

2015-04-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 2514cda00 - 4a579a72e


AMBARI-10832. Comparing of enhanced config versions does not show full 
comparison-bar (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 4a579a72eb320f12b9aabb78ab0a4f7f1047009e
Parents: 2514cda
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Wed Apr 29 15:16:39 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Wed Apr 29 15:16:39 2015 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js  | 4 ++--
 .../app/templates/common/configs/service_config_layout_tab.hbs   | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4a579a72/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 64cdcc8..5715059 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -377,7 +377,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   onConfigGroupChange: function () {
 var self = this;
 this.get('stepConfigs').clear();
-this.set('dataIsLoaded', false);
+this.set('versionLoaded', false);
 var selectedConfigGroup = this.get('selectedConfigGroup');
 var serviceName = this.get('content.serviceName');
 //STEP 1: handle tags from JSON data for host overrides
@@ -418,7 +418,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   self.addHostNamesToConfig();
   //load configs of version being compared against
   self.loadCompareVersionConfigs(self.get('allConfigs')).done(function 
(isComparison) {
-//Load and add overriden configs of group
+//Load and add overridden configs of group
 if (!isComparison  
(!self.get('selectedConfigGroup').get('isDefault') || 
self.get('isCurrentSelected'))) {
   App.config.loadServiceConfigGroupOverrides(self.get('allConfigs'), 
self.get('loadedGroupToOverrideSiteToTagMap'), self.get('configGroupsToLoad'), 
self.onLoadOverrides, self);
 } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/4a579a72/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs 
b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
index 44f0abc..a06afa0 100644
--- a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
@@ -15,6 +15,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
+{{#if versionLoaded}}
 {{#unless tab.isHiddenByFilter}}
 div class=section-layout-container
   table class=config-section-table
@@ -51,4 +52,5 @@
 {{/each}}
   /table
 /div
-{{/unless}}
\ No newline at end of file
+{{/unless}}
+{{/if}}



ambari git commit: AMBARI-10824 Cloning a widget should make it a part of the widget layout. (atkach)

2015-04-29 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 4a579a72e - de06e8e08


AMBARI-10824 Cloning a widget should make it a part of the widget layout. 
(atkach)


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

Branch: refs/heads/trunk
Commit: de06e8e0877fe5be8240e24b9f4bc88c8e34efaa
Parents: 4a579a7
Author: Andrii Tkach atk...@hortonworks.com
Authored: Wed Apr 29 13:24:02 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Wed Apr 29 15:54:06 2015 +0300

--
 .../app/mixins/common/widgets/widget_mixin.js   | 28 +++-
 1 file changed, 21 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/de06e8e0/ambari-web/app/mixins/common/widgets/widget_mixin.js
--
diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js 
b/ambari-web/app/mixins/common/widgets/widget_mixin.js
index bf0a422..3a4d8f8 100644
--- a/ambari-web/app/mixins/common/widgets/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js
@@ -39,6 +39,12 @@ App.WidgetMixin = Ember.Mixin.create({
   VALUE_NAME_REGEX: /[\w\.\,\:\=\[\]]+/g,
 
   /**
+   * @type {string}
+   * @const
+   */
+  CLONE_SUFFIX: '(Copy)',
+
+  /**
* common metrics container
* @type {Array}
*/
@@ -428,9 +434,9 @@ App.WidgetMixin = Ember.Mixin.create({
 var self = this;
 return App.showConfirmationPopup(
   function () {
-self.postWidgetDefinition();
+self.postWidgetDefinition(true);
   },
-  Em.I18n.t('widget.clone.body').format(self.get('content.displayName')),
+  Em.I18n.t('widget.clone.body').format(self.get('content.widgetName')),
   null,
   null,
   Em.I18n.t('common.clone')
@@ -445,7 +451,6 @@ App.WidgetMixin = Ember.Mixin.create({
 return {
   WidgetInfo: {
 widget_name: this.get('content.widgetName'),
-display_name: this.get('content.displayName'),
 widget_type: this.get('content.widgetType'),
 description: this.get('content.widgetDescription'),
 scope: this.get('content.scope'),
@@ -466,21 +471,30 @@ App.WidgetMixin = Ember.Mixin.create({
 
   /**
* post widget definition to server
+   * @param {boolean} isClone
* @returns {$.ajax}
*/
-  postWidgetDefinition: function () {
+  postWidgetDefinition: function (isClone) {
+var data = this.collectWidgetData();
+if (isClone) {
+  data.WidgetInfo.widget_name += this.get('CLONE_SUFFIX');
+}
 return App.ajax.send({
   name: 'widgets.wizard.add',
   sender: this,
   data: {
-data: this.collectWidgetData()
+data: data
   },
   success: 'postWidgetDefinitionSuccessCallback'
 });
   },
 
-  postWidgetDefinitionSuccessCallback: function () {
-
+  postWidgetDefinitionSuccessCallback: function (data) {
+var widgets = this.get('content.layout.widgets').toArray();
+widgets.pushObject(Em.Object.create({
+  id: data.resources[0].WidgetInfo.id
+}));
+
App.router.get('mainServiceInfoSummaryController').saveWidgetLayout(widgets);
   },
 
   /*



[3/4] ambari git commit: AMBARI-10826 Move App.ServiceConfigProperty object to separate file. (ababiichuk)

2015-04-29 Thread ababiichuk
AMBARI-10826 Move App.ServiceConfigProperty object to separate file. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 11a09c57836e8adb4f69c66231131d68fa37cd7e
Parents: 798f107
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Apr 29 14:08:40 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Apr 29 14:58:52 2015 +0300

--
 ambari-web/app/assets/test/tests.js |5 +-
 .../wizard/slave_component_groups_controller.js |5 +-
 ambari-web/app/data/HDP2/secure_configs.js  |4 +-
 ambari-web/app/data/service_configs.js  |2 +-
 ambari-web/app/models.js|4 +-
 .../models/configs/objects/service_config.js|   96 ++
 .../configs/objects/service_config_category.js  |   89 ++
 .../configs/objects/service_config_property.js  |  376 +
 ambari-web/app/models/service_config.js | 1119 --
 ambari-web/app/models/stack_service.js  |2 +-
 ambari-web/app/utils/config.js  |3 +-
 .../app/utils/configs/config_property_helper.js |  554 +++
 .../objects/service_config_category_test.js |  184 +++
 .../objects/service_config_property_test.js |  474 ++
 .../configs/objects/service_config_test.js  |  165 ++
 ambari-web/test/models/service_config_test.js   | 1418 --
 .../configs/config_property_helper_test.js  |  865 +++
 17 files changed, 2820 insertions(+), 2545 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/11a09c57/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 055f447..d1d454d 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -161,6 +161,7 @@ var files = ['test/init_model_test',
   'test/utils/object_utils_test',
   'test/utils/ui_effects_test',
   'test/utils/updater_test',
+  'test/utils/configs/config_property_helper_test',
   'test/views/common/chart/linear_time_test',
   'test/views/common/configs/widgets/combo_config_widget_view_test',
   'test/views/common/configs/widgets/config_widget_view_test',
@@ -271,7 +272,6 @@ var files = ['test/init_model_test',
   'test/models/host_component_test',
   'test/models/hosts_test',
   'test/models/repository_test',
-  'test/models/service_config_test',
   'test/models/stack_service_component_test',
   'test/models/service_test',
   'test/models/stack_service_test',
@@ -282,6 +282,9 @@ var files = ['test/init_model_test',
   'test/models/configs/section_test',
   'test/models/configs/service_config_version_test',
   'test/models/configs/config_property_test',
+  'test/models/configs/objects/service_config_test',
+  'test/models/configs/objects/service_config_category_test',
+  'test/models/configs/objects/service_config_property_test',
   'test/routes/views_test',
   //contains test with fake timers that affect Date
   'test/utils/lazy_loading_test'

http://git-wip-us.apache.org/repos/asf/ambari/blob/11a09c57/ambari-web/app/controllers/wizard/slave_component_groups_controller.js
--
diff --git 
a/ambari-web/app/controllers/wizard/slave_component_groups_controller.js 
b/ambari-web/app/controllers/wizard/slave_component_groups_controller.js
index d113eb9..584fdf2 100644
--- a/ambari-web/app/controllers/wizard/slave_component_groups_controller.js
+++ b/ambari-web/app/controllers/wizard/slave_component_groups_controller.js
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 var App = require('app');
+var configPropertyHelper = require('utils/configs/config_property_helper');
 /**
  * Used to manage slave component config. User could create different settings 
for separate group
  * @type {*}
@@ -101,10 +102,10 @@ App.SlaveComponentGroupsController = 
Em.ArrayController.extend({
 
   switch(serviceConfigProperty.name){
 case 'dfs_data_dir' :
-  serviceConfigProperty.initialValue();
+  configPropertyHelper.initialValue(serviceConfigProperty);
   break;
 case 'mapred_local_dir' :
-  serviceConfigProperty.initialValue();
+  configPropertyHelper.initialValue(serviceConfigProperty);
   break;
   }
   configs.pushObject(serviceConfigProperty);

http://git-wip-us.apache.org/repos/asf/ambari/blob/11a09c57/ambari-web/app/data/HDP2/secure_configs.js
--
diff --git 

[4/4] ambari git commit: AMBARI-10827 JS error with toggling widget view. (ababiichuk)

2015-04-29 Thread ababiichuk
AMBARI-10827 JS error with toggling widget view. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 2514cda00537319837be819a38f748a0f194f2a7
Parents: 11a09c5
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Apr 29 14:59:11 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Apr 29 14:59:11 2015 +0300

--
 ambari-web/app/styles/application.less  |  1 +
 .../configs/widgets/combo_config_widget_view.js |  2 +-
 .../configs/widgets/config_widget_view.js   |  2 +-
 .../configs/widgets/list_config_widget_view.js  |  2 +-
 .../widgets/slider_config_widget_view.js| 30 ++-
 .../widgets/time_interval_spinner_view.js   | 28 +-
 .../widgets/combo_config_widget_view_test.js| 25 +
 .../configs/widgets/config_widget_view_test.js  | 12 +
 .../widgets/slider_config_widget_view_test.js   | 55 +++-
 .../widgets/time_interval_spinner_view_test.js  | 47 +
 10 files changed, 176 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2514cda0/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 271771d..8cd22c4 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5630,6 +5630,7 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
   table-layout: fixed; // for width to be equally distributed
   margin: 0 -20px;
   .config-section {
+overflow: hidden;
 height: 100%;
 padding: 18px;
 border: 1px solid #aaa;

http://git-wip-us.apache.org/repos/asf/ambari/blob/2514cda0/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
index b3655e1..3686224 100644
--- a/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js
@@ -131,7 +131,7 @@ App.ComboConfigWidgetView = App.ConfigWidgetView.extend({
   },
 
   isValueCompatibleWithWidget: function() {
-return this.get('content.valuesList').someProperty('configValue', 
this.get('config.value'));
+return this._super()  
this.get('content.valuesList').someProperty('configValue', 
this.get('config.value'));
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/2514cda0/ambari-web/app/views/common/configs/widgets/config_widget_view.js
--
diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
index 37d2c9c..6b7dda4 100644
--- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
@@ -282,7 +282,7 @@ App.ConfigWidgetView = 
Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
* @returns {boolean}
*/
   isValueCompatibleWithWidget: function() {
-return true
+return this.get('config.isValid');
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/2514cda0/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
index 3a5112c..aa154cf 100644
--- a/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/list_config_widget_view.js
@@ -261,7 +261,7 @@ App.ListConfigWidgetView = App.ConfigWidgetView.extend({
   },
 
   isValueCompatibleWithWidget: function() {
-return this.get('options').someProperty('value', this.get('config.value'));
+return this._super()  this.get('options').someProperty('value', 
this.get('config.value'));
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/2514cda0/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 

[1/2] ambari git commit: AMBARI-10817 'yarn.scheduler.capacity.resource-calculator' not showing up in enhanced-configs. (ababiichuk)

2015-04-29 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 06c7233d3 - a39eb7d3b


AMBARI-10817 'yarn.scheduler.capacity.resource-calculator' not showing up in 
enhanced-configs. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 7be88f62168af949c1d21560e35fc8a47ed27300
Parents: 06c7233
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Apr 29 09:53:39 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Apr 29 10:46:51 2015 +0300

--
 .../controllers/main/service/info/configs.js|  3 +-
 ambari-web/app/utils/config.js  | 15 ++
 ambari-web/test/utils/config_test.js| 29 +++-
 3 files changed, 39 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7be88f62/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 945bc56..64cdcc8 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -410,7 +410,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 
   //put properties from capacity-scheduler.xml into one config with 
textarea view
   if (self.get('content.serviceName') === 'YARN') {
-configs = App.config.fileConfigsIntoTextarea(configs, 
'capacity-scheduler.xml');
+var configsToSkip = 
self.get('advancedConfigs').filterProperty('filename', 
'capacity-scheduler.xml').filterProperty('subSection');
+configs = App.config.fileConfigsIntoTextarea(configs, 
'capacity-scheduler.xml', configsToSkip);
   }
   self.set('allConfigs', configs);
   //add configs as names of host components

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be88f62/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index c298fb3..1169de1 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1346,11 +1346,12 @@ App.config = Em.Object.create({
* transform set of configs from file
* into one config with textarea content:
* name=value
-   * @param configs
-   * @param filename
+   * @param {App.ServiceConfigProperty[]} configs
+   * @param {String} filename
+   * @param {App.ServiceConfigProperty[]} [configsToSkip=[]]
* @return {*}
*/
-  fileConfigsIntoTextarea: function (configs, filename) {
+  fileConfigsIntoTextarea: function (configs, filename, configsToSkip) {
 var fileConfigs = configs.filterProperty('filename', filename);
 var value = '';
 var defaultValue = '';
@@ -1358,8 +1359,10 @@ App.config = Em.Object.create({
 var complexConfig = $.extend({}, template);
 if (complexConfig) {
   fileConfigs.forEach(function (_config) {
-value += _config.name + '=' + _config.value + '\n';
-defaultValue += _config.name + '=' + _config.defaultValue + '\n';
+if (!(configsToSkip  configsToSkip.someProperty('name', 
_config.name))) {
+  value += _config.name + '=' + _config.value + '\n';
+  defaultValue += _config.name + '=' + _config.defaultValue + '\n';
+}
   }, this);
   var isFinal = fileConfigs.someProperty('isFinal', true);
   complexConfig.value = value;
@@ -1367,7 +1370,7 @@ App.config = Em.Object.create({
   complexConfig.isFinal = isFinal;
   complexConfig.defaultIsFinal = isFinal;
   configs = configs.filter(function (_config) {
-return _config.filename !== filename;
+return _config.filename !== filename || (configsToSkip  
configsToSkip.someProperty('name', _config.name));
   });
   configs.push(complexConfig);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be88f62/ambari-web/test/utils/config_test.js
--
diff --git a/ambari-web/test/utils/config_test.js 
b/ambari-web/test/utils/config_test.js
index bbfdc6b..1649db9 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -124,7 +124,34 @@ describe('App.config', function () {
   expect(result[0].value).to.equal('');
   expect(result[0].defaultValue).to.equal('');
 });
-
+it(filename has configs that shouldn't be included in textarea, function 
() {
+  var configs = [
+{
+  name: 

[2/2] ambari git commit: AMBARI-10820 Slider widget needs slight refactoring along with padding fixes. (ababiichuk)

2015-04-29 Thread ababiichuk
AMBARI-10820 Slider widget needs slight refactoring along with padding fixes. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: a39eb7d3bc158844e62d59af620d98740518e12b
Parents: 7be88f6
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Apr 29 11:43:06 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Apr 29 11:43:06 2015 +0300

--
 ambari-web/app/styles/application.less  |  3 +-
 ambari-web/app/styles/widgets.less  | 42 ++--
 .../widgets/slider_config_widget_view.js|  6 +--
 3 files changed, 33 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a39eb7d3/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index fdea9e5..271771d 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5631,10 +5631,11 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
   margin: 0 -20px;
   .config-section {
 height: 100%;
-padding: 0 30px 20px 30px;
+padding: 18px;
 border: 1px solid #aaa;
 vertical-align: top;
 h4 {
+  margin: 0px;
   font-size: 22px;
   font-weight: 400;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a39eb7d3/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index dd75d66..b4dc883 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -20,21 +20,25 @@
 @undo-btn-margin: 10px;
 @combo-widget-width: 100px;
 @green: #6ebd45;
+@slider-light-grey: #e6e6e6;
+@slider-dark-grey: #aa;
 
 @slider-widget-border-color: #999;
 @slider-widget-width: 220px;
 @slider-widget-tooltip-background-color: @green;
-@slider-widget-selection-background-color: @green;
+@slider-widget-selection-background-color: @slider-dark-grey;
 @slider-widget-body-height: 10px;
-@slider-widget-body-background-color: #ccc;
-@slider-widget-tick-height: 8px;
+@slider-widget-body-background-color: @slider-light-grey;
+@slider-widget-tick-height: 6px;
 @slider-widget-tick-width: 1px;
-@slider-widget-tick-background-color: #808080;
-@slider-widget-tick-label-color: #aaa;
+@slider-widget-tick-background-color: @slider-dark-grey;
+@slider-widget-tick-label-color: @slider-dark-grey;
 @slider-widget-tooltip-background: @slider-widget-tooltip-background-color;
 @slider-widget-disabled-selection-background-color: 
lighten(@slider-widget-selection-background-color, 20%);
+
 @widget-config-override-action-color: #cbcbcb;
 @widget-config-override-action-active-color: #acacac;
+
 @toggle-widget-handle-background-color: #f3f3f3;
 @toggle-widget-text-color: #fff;
 @toggle-widget-text-size: 12px;
@@ -105,6 +109,7 @@
 
   .widget-config-label {
 display: inline-block;
+padding-bottom: 13px;
 margin-bottom: 15px;
   }
   .slider-track {
@@ -119,7 +124,7 @@
   .slider.slider-horizontal {
 width: @slider-widget-width;
 .tooltip {
-  margin-top: -23px;
+  margin-top: -24px;
   opacity: 1;
   font-size: 10px;
   line-height: 14px;
@@ -158,29 +163,34 @@
 margin-left: -1px;
   }
   .slider-tick-default {
-margin-top: -22px;
-:before {
-  height: 53px;
-}
+width: 0;
+height: 0;
+border-left: 5px solid transparent;
+border-right: 5px solid transparent;
+border-bottom: 5px solid @slider-dark-grey;
+margin-left: -5px;
  span {
   color: @slider-widget-tick-label-color;
   font-size: 10px;
 }
+::before {
+  display: none;
+}
   }
 }
 .slider-disabled {
   .tooltip-arrow {
-border-top-color: @slider-widget-body-background-color;
+border-top-color: lighten(@green, 20%);;
   }
   .tooltip-inner {
-background-color: @slider-widget-body-background-color;
+background-color: lighten(@green, 20%);;
   }
 }
   }
   .slider-handle {
 margin-top: -4px !important;
 height: 14px;
-width: 2px;
+width: 3px;
 margin-left: -1px !important;
 background-color: @slider-widget-selection-background-color;
 background-image: none;
@@ -229,6 +239,12 @@
   .slider-selection {
 background-color: 

ambari git commit: AMBARI-10751. Multiple changes to YARN enhanced configs - typo fix (srimanth)

2015-04-29 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 98098a891 - 06c7233d3


AMBARI-10751. Multiple changes to YARN enhanced configs - typo fix (srimanth)


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

Branch: refs/heads/trunk
Commit: 06c7233d36cfd7d9f1f4a14a9b62d4b2ebb1692f
Parents: 98098a8
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Apr 28 23:43:56 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Apr 28 23:43:56 2015 -0700

--
 .../src/main/resources/stacks/HDP/2.2/services/stack_advisor.py| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/06c7233d/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 7ce98b9..c3af09b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -825,7 +825,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 if yarn_cgroups_enabled in properties:
   yarn_cgroups_enabled = properties[yarn_cgroups_enabled].lower() == 
true
   core_site_properties = getSiteProperties(configurations, core-site)
-  security_enbaled = False
+  security_enabled = False
   if core_site_properties:
 security_enabled = 
core_site_properties['hadoop.security.authentication'] == 'kerberos' and 
core_site_properties['hadoop.security.authorization'] == 'true'
   if not security_enabled and yarn_cgroups_enabled:



ambari git commit: AMBARI-10789. NameNode HA Wizard: Show Details alert is flying on step 3 (alexantonenko)

2015-04-29 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 66e42cbab - 6bed3a703


AMBARI-10789. NameNode HA Wizard: Show Details alert is flying on step 3 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 6bed3a703f1dd0d0566efbb20da0b953ecb24cad
Parents: 66e42cb
Author: Alex Antonenko hiv...@gmail.com
Authored: Wed Apr 29 20:05:11 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Wed Apr 29 20:05:25 2015 +0300

--
 ambari-web/app/assets/test/tests.js |   1 +
 .../nameNode/step3_controller.js|   1 +
 .../resourceManager/step3_controller.js |   2 +
 .../app/controllers/wizard/step9_controller.js  |   2 +-
 .../templates/common/configs/service_config.hbs |  14 +-
 .../wizard/slave_component_groups_controller.js | 696 +++
 6 files changed, 709 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6bed3a70/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 9abb648..8fc4b9c 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -99,6 +99,7 @@ var files = ['test/init_model_test',
   'test/controllers/installer_test',
   'test/controllers/main_test',
   'test/controllers/wizard_test',
+  'test/controllers/wizard/slave_component_groups_controller',
   'test/controllers/wizard/step0_test',
   'test/controllers/wizard/step2_test',
   'test/controllers/wizard/step3_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6bed3a70/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
index 44538c0..83b3ee7 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
@@ -27,6 +27,7 @@ App.HighAvailabilityWizardStep3Controller = 
Em.Controller.extend({
   once: false,
   isLoaded: false,
   versionLoaded: true,
+  hideDependenciesInfoBar: true,
 
   /**
* Map of sites and properties to delete

http://git-wip-us.apache.org/repos/asf/ambari/blob/6bed3a70/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
index 73eca17..7a2e250 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step3_controller.js
@@ -25,6 +25,8 @@ App.RMHighAvailabilityWizardStep3Controller = 
Em.Controller.extend({
 
   versionLoaded: true,
 
+  hideDependenciesInfoBar: true,
+
   isLoaded: false,
 
   isSubmitDisabled: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/6bed3a70/ambari-web/app/controllers/wizard/step9_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js 
b/ambari-web/app/controllers/wizard/step9_controller.js
index bb557e2..b0c9b7b 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -1221,7 +1221,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
*/
   loadDoServiceChecksFlagSuccessCallback: function (data) {
 var properties = Em.get(data, 'RootServiceComponents.properties');
-if(properties.hasOwnProperty('skip.service.checks')){
+if(properties  properties.hasOwnProperty('skip.service.checks')){
   this.set('skipServiceChecks', properties['skip.service.checks'] === 
'true');
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/6bed3a70/ambari-web/app/templates/common/configs/service_config.hbs
--
diff --git a/ambari-web/app/templates/common/configs/service_config.hbs 
b/ambari-web/app/templates/common/configs/service_config.hbs
index 8b7ccbe..573a75e 100644
--- 

ambari git commit: AMBARI-10836. Admin View: description + version overlap in UI (alexantonenko)

2015-04-29 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6bed3a703 - 6f00dd8a1


AMBARI-10836. Admin View: description + version overlap in UI (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 6f00dd8a173e6379230b348da6c8ab3bf481c6ed
Parents: 6bed3a7
Author: Alex Antonenko hiv...@gmail.com
Authored: Wed Apr 29 20:06:46 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Wed Apr 29 20:06:46 2015 +0300

--
 .../resources/ui/admin-web/app/views/ambariViews/listTable.html  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f00dd8a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
index 455898f..05cb1d5 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
@@ -71,7 +71,7 @@
 td class=col-sm-3
   a 
href=#/views/{{view.view_name}}/versions/{{instance.ViewInstanceInfo.version}}/instances/{{instance.ViewInstanceInfo.instance_name}}/edit
 class=instance-link{{instance.label}}/a
 /td
-td class=col-sm-1{{instance.ViewInstanceInfo.version}}/td
+td class=col-sm-5{{instance.ViewInstanceInfo.version}}/td
 td class=col-sm-5  div class=description-column 
tooltip={{instance.ViewInstanceInfo.description}}{{instance.ViewInstanceInfo.description
 || 'No description'}}/div
 /td
   /tr
@@ -94,4 +94,4 @@
 /div
 
   /accordion
-/div
\ No newline at end of file
+/div



ambari git commit: AMBARI-10838. Ranger Admin HA Wizard: different order after page refresh on step2. (akovalenko)

2015-04-29 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6727c1dc8 - 6cfff2107


AMBARI-10838. Ranger Admin HA Wizard: different order after page refresh on 
step2. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 6cfff2107852df046627ffbb33a7d40702c26295
Parents: 6727c1d
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Wed Apr 29 19:15:19 2015 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Wed Apr 29 19:39:47 2015 +0300

--
 ambari-web/app/assets/test/tests.js |  1 +
 .../nameNode/step2_controller.js|  4 +-
 .../rangerAdmin/step2_controller.js |  4 +-
 .../resourceManager/step2_controller.js |  4 +-
 .../mixins/wizard/assign_master_components.js   | 30 --
 .../nameNode/step2_controller_test.js   | 63 
 6 files changed, 98 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6cfff210/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index d1d454d..9abb648 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -59,6 +59,7 @@ var files = ['test/init_model_test',
   'test/controllers/main/admin/highAvailability_controller_test',
   'test/controllers/main/admin/highAvailability/progress_controller_test',
   
'test/controllers/main/admin/highAvailability/progress_popup_controller_test',
+  
'test/controllers/main/admin/highAvailability/nameNode/step2_controller_test',
   
'test/controllers/main/admin/highAvailability/nameNode/step3_controller_test',
   
'test/controllers/main/admin/highAvailability/nameNode/step4_controller_test',
   
'test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6cfff210/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
index ea604dc..b8d7978 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step2_controller.js
@@ -32,7 +32,9 @@ App.HighAvailabilityWizardStep2Controller = 
Em.Controller.extend(App.BlueprintMi
 
   showCurrentPrefix: ['NAMENODE'],
 
-  showAdditionalPrefix: ['NAMENODE']
+  showAdditionalPrefix: ['NAMENODE'],
+
+  showInstalledMastersFirst: true
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6cfff210/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
index 6911853..1922a98 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step2_controller.js
@@ -31,7 +31,9 @@ App.RAHighAvailabilityWizardStep2Controller = 
Em.Controller.extend(App.Blueprint
 
   showAdditionalPrefix: ['RANGER_ADMIN'],
 
-  mastersAddableInHA: ['RANGER_ADMIN']
+  mastersAddableInHA: ['RANGER_ADMIN'],
+
+  showInstalledMastersFirst: true
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6cfff210/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
index 551742c..8ad2a51 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
@@ -30,6 +30,8 @@ App.RMHighAvailabilityWizardStep2Controller = 
Em.Controller.extend(App.Blueprint
 
   showCurrentPrefix: ['RESOURCEMANAGER'],
 
-  showAdditionalPrefix: ['RESOURCEMANAGER']
+  showAdditionalPrefix: ['RESOURCEMANAGER'],
+
+  showInstalledMastersFirst: true
 });
 


[1/2] ambari git commit: AMBARI-10816 - Expose Customizable Parameters For SCRIPT Alerts (jonathanhurley)

2015-04-29 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk bc55f2d4e - 6727c1dc8


http://git-wip-us.apache.org/repos/asf/ambari/blob/6727c1dc/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/files/alert_ha_namenode_health.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/files/alert_ha_namenode_health.py
 
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/files/alert_ha_namenode_health.py
index 2066d46..19e3170 100644
--- 
a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/files/alert_ha_namenode_health.py
+++ 
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/files/alert_ha_namenode_health.py
@@ -35,7 +35,8 @@ NN_HTTP_ADDRESS_KEY = 
'{{hdfs-site/dfs.namenode.http-address}}'
 NN_HTTPS_ADDRESS_KEY = '{{hdfs-site/dfs.namenode.https-address}}'
 DFS_POLICY_KEY = '{{hdfs-site/dfs.http.policy}}'
 
-CONNECTION_TIMEOUT = 5.0
+CONNECTION_TIMEOUT_KEY = 'connection.timeout'
+CONNECTION_TIMEOUT_DEFAULT = 5.0
 
 def get_tokens():
   
@@ -44,36 +45,43 @@ def get_tokens():
   
   return (HDFS_SITE_KEY, NAMESERVICE_KEY, NN_HTTP_ADDRESS_KEY,
   NN_HTTPS_ADDRESS_KEY, DFS_POLICY_KEY)
-  
 
-def execute(parameters=None, host_name=None):
+
+def execute(configurations={}, parameters={}, host_name=None):
   
   Returns a tuple containing the result code and a pre-formatted result label
 
   Keyword arguments:
-  parameters (dictionary): a mapping of parameter key to value
+  configurations (dictionary): a mapping of configuration key to value
+  parameters (dictionary): a mapping of script parameter key to value
   host_name (string): the name of this host where the alert is running
   
-  if parameters is None:
-return (RESULT_STATE_UNKNOWN, ['There were no parameters supplied to the 
script.'])
+  if configurations is None:
+return (RESULT_STATE_UNKNOWN, ['There were no configurations supplied to 
the script.'])
 
   # if not in HA mode, then SKIP
-  if not NAMESERVICE_KEY in parameters:
+  if not NAMESERVICE_KEY in configurations:
 return (RESULT_STATE_SKIPPED, ['NameNode HA is not enabled'])
 
   # hdfs-site is required
-  if not HDFS_SITE_KEY in parameters:
+  if not HDFS_SITE_KEY in configurations:
 return (RESULT_STATE_UNKNOWN, ['{0} is a required parameter for the 
script'.format(HDFS_SITE_KEY)])
 
+  # parse script arguments
+  connection_timeout = CONNECTION_TIMEOUT_DEFAULT
+  if CONNECTION_TIMEOUT_KEY in parameters:
+connection_timeout = float(parameters[CONNECTION_TIMEOUT_KEY])
+
+
   # determine whether or not SSL is enabled
   is_ssl_enabled = False
-  if DFS_POLICY_KEY in parameters:
-dfs_policy = parameters[DFS_POLICY_KEY]
+  if DFS_POLICY_KEY in configurations:
+dfs_policy = configurations[DFS_POLICY_KEY]
 if dfs_policy == HTTPS_ONLY:
   is_ssl_enabled = True
 
-  name_service = parameters[NAMESERVICE_KEY]
-  hdfs_site = parameters[HDFS_SITE_KEY]
+  name_service = configurations[NAMESERVICE_KEY]
+  hdfs_site = configurations[HDFS_SITE_KEY]
 
   # look for dfs.ha.namenodes.foo
   nn_unique_ids_key = 'dfs.ha.namenodes.' + name_service
@@ -105,7 +113,7 @@ def execute(parameters=None, host_name=None):
 
   try:
 jmx_uri = jmx_uri_fragment.format(value)
-state = get_value_from_jmx(jmx_uri,'State')
+state = get_value_from_jmx(jmx_uri, 'State', connection_timeout)
 
 if state == HDFS_NN_STATE_ACTIVE:
   active_namenodes.append(value)
@@ -161,11 +169,11 @@ def execute(parameters=None, host_name=None):
   return (RESULT_STATE_SKIPPED, ['Another host will report this alert'])
 
 
-def get_value_from_jmx(query, jmx_property):
+def get_value_from_jmx(query, jmx_property, connection_timeout):
   response = None
-  
+
   try:
-response = urllib2.urlopen(query, timeout=CONNECTION_TIMEOUT)
+response = urllib2.urlopen(query, timeout=connection_timeout)
 data = response.read()
 
 data_dict = json.loads(data)

http://git-wip-us.apache.org/repos/asf/ambari/blob/6727c1dc/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/files/alert_hive_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/files/alert_hive_thrift_port.py
 
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/files/alert_hive_thrift_port.py
index 2837226..35217fc 100644
--- 
a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/files/alert_hive_thrift_port.py
+++ 
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HIVE/package/files/alert_hive_thrift_port.py
@@ -40,15 +40,21 @@ SMOKEUSER_KEY = '{{cluster-env/smokeuser}}'
 # The configured Kerberos executable search paths, if any
 KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = 
'{{kerberos-env/executable_search_paths}}'
 

[2/2] ambari git commit: AMBARI-10839 Move error/warning decorator from actions area to beside config-name. (ababiichuk)

2015-04-29 Thread ababiichuk
AMBARI-10839 Move error/warning decorator from actions area to beside 
config-name. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 705a0fb6f466e1b7f82def4039b814fb736c9511
Parents: 6cfff21
Author: aBabiichuk ababiic...@hortonworks.com
Authored: Wed Apr 29 19:34:46 2015 +0300
Committer: aBabiichuk ababiic...@hortonworks.com
Committed: Wed Apr 29 19:59:21 2015 +0300

--
 .../service/configs/widget_popover_support.js   |  2 -
 ambari-web/app/styles/widgets.less  | 15 +++---
 ambari-web/app/templates.js |  1 +
 .../configs/widgets/checkbox_config_widget.hbs  |  5 +-
 .../configs/widgets/combo_config_widget.hbs |  5 +-
 .../common/configs/widgets/config_label.hbs | 25 +
 .../common/configs/widgets/controls.hbs | 13 +++--
 .../configs/widgets/directory_config_widget.hbs |  7 +--
 .../configs/widgets/list_config_widget.hbs  |  5 +-
 .../configs/widgets/radio_button_config.hbs |  7 +--
 .../configs/widgets/slider_config_widget.hbs|  5 +-
 .../configs/widgets/textfield_config_widget.hbs |  5 +-
 .../configs/widgets/time_interval_spinner.hbs   |  5 +-
 .../configs/widgets/toggle_config_widget.hbs|  5 +-
 .../configs/widgets/config_widget_view.js   | 56 +---
 .../widgets/directory_config_widget_view.js |  2 +
 16 files changed, 106 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/705a0fb6/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
--
diff --git 
a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js 
b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
index c8dc1ed..98b6f50 100644
--- a/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
+++ b/ambari-web/app/mixins/main/service/configs/widget_popover_support.js
@@ -48,8 +48,6 @@ App.WidgetPopoverSupport = Em.Mixin.create({
 
   initPopover: function () {
 if (this.get('isPopoverEnabled') !== false) {
-  if (this.get('config.name') == 'keyserver_port')
-console.error(this.get('popoverPlacement'));
   var leftPopoverTemplate = 'div class=popover 
config-widget-left-popoverdiv class=arrow/divdiv 
class=popover-innerh3 class=popover-title/h3div 
class=popover-contentp/p/div/div/div';
   App.popover(this.$('.original-widget'), {
 template: this.get('popoverPlacement') == 'left'? leftPopoverTemplate 
: undefined,

http://git-wip-us.apache.org/repos/asf/ambari/blob/705a0fb6/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index b4dc883..76e4c0a 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -52,6 +52,11 @@
 .text-success {
   color: @green;
 }
+.icon-warning-sign {
+  .warning {
+color: @health-status-yellow
+  }
+}
   }
   .action-button {
 margin-right: @undo-btn-margin;
@@ -75,18 +80,14 @@
   text-decoration: none;
   display: block;
 }
-.widget-action-final {
+.widget-action-final,
+.widget-action-switch-view {
   padding-left: 1px;
   color: @widget-config-override-action-color;
   .active {
 color: @widget-config-override-action-active-color;
   }
 }
-.icon-warning-sign {
-  .warning {
-color: @health-status-yellow
-  }
-}
   }
 }
 
@@ -130,6 +131,7 @@
   line-height: 14px;
   min-width: 30px;
   z-index: 1;
+  visibility: inherit;
   .tooltip-min,
   .tooltip-max {
 display: none;
@@ -217,6 +219,7 @@
   .ui-slider-wrapper {
 .ui-slider-wrapper-inner {
   width: 68%;
+  padding-left: 10px;
   .slider.slider-horizontal {
 width: 100%;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/705a0fb6/ambari-web/app/templates.js
--
diff --git a/ambari-web/app/templates.js b/ambari-web/app/templates.js
index af5a2c0..b181cc2 100644
--- a/ambari-web/app/templates.js
+++ b/ambari-web/app/templates.js
@@ -26,3 +26,4 @@ require(templates/main/service/widgets/create/step2_number);
 require(templates/main/service/widgets/create/step2_template);
 require(templates/main/service/widgets/create/step2_graph);
 require('templates/common/configs/widgets/controls');
+require('templates/common/configs/widgets/config_label');


[1/2] ambari git commit: AMBARI-10840 Exception appears on clicking retry button (sometimes). (ababiichuk)

2015-04-29 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 6cfff2107 - 1e3afa867


AMBARI-10840 Exception appears on clicking retry button (sometimes). 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 1e3afa8678fd9513d77b559b7f8882a6bc15d2f5
Parents: 705a0fb
Author: aBabiichuk ababiic...@hortonworks.com
Authored: Wed Apr 29 19:43:07 2015 +0300
Committer: aBabiichuk ababiic...@hortonworks.com
Committed: Wed Apr 29 19:59:21 2015 +0300

--
 .../app/controllers/wizard/step9_controller.js  | 17 +
 .../test/controllers/wizard/step9_test.js   | 36 
 2 files changed, 32 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1e3afa86/ambari-web/app/controllers/wizard/step9_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js 
b/ambari-web/app/controllers/wizard/step9_controller.js
index 67ed385..bb557e2 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -45,13 +45,13 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
*/
   progress: '0',
 
-  /*
+  /**
* Json file for the mock data to be used in mock mode
* @type {string}
*/
   mockDataPrefix: '/data/wizard/deploy/5_hosts',
 
-  /*
+  /**
* Current Request data polled from the API: 
api/v1/clusters/{clusterName}/requests/{RequestId}?fields=tasks/Tasks/command,
* 
tasks/Tasks/exit_code,tasks/Tasks/start_time,tasks/Tasks/end_time,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,
* tasks/Tasks/statusminimal_response=true
@@ -59,7 +59,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
*/
   polledData: [],
 
-  /*
+  /**
* This flag is only used in UI mock mode as a counter for number of polls.
* @type {number}
*/
@@ -89,7 +89,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
*/
   startCallFailed: false,
 
-  /*
+  /**
* Status of the page. Possible values: info, warning, failed and success.
* This property is used in the step-9 view for displaying the appropriate 
color of the overall progress bar and
* the appropriate result message at the bottom of the page
@@ -130,7 +130,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
 }
   }.observes('content.cluster.status', 'content.controllerName'),
 
-  /*
+  /**
* Computed property to determine if the Retry button should be made visible 
on the page.
* @type {bool}
*/
@@ -829,7 +829,10 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
   if (this.get('status') === 'failed') {
 clusterStatus.status = 'INSTALL FAILED';
 this.saveClusterStatus(clusterStatus);
-this.set('progress', '100');
+this.setProperties({
+  progress: '100',
+  isPolling: false
+});
 this.get('hosts').forEach(function (host) {
   host.set('progress', '100');
 });
@@ -1142,7 +1145,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
   });
   this.set('progress', '100');
   this.saveClusterStatus(clusterStatus);
-} else if (this.get('content.cluster.status') === 'PENDING') {
+} else if (this.get('content.cluster.status') === 'PENDING'  
this.get('isPolling')) {
   this.launchStartServices();
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1e3afa86/ambari-web/test/controllers/wizard/step9_test.js
--
diff --git a/ambari-web/test/controllers/wizard/step9_test.js 
b/ambari-web/test/controllers/wizard/step9_test.js
index d0a895a..71f35a6 100644
--- a/ambari-web/test/controllers/wizard/step9_test.js
+++ b/ambari-web/test/controllers/wizard/step9_test.js
@@ -473,14 +473,18 @@ describe('App.InstallerStep9Controller', function () {
   })
 })
   ]);
-  c.set('status', 'failed');
-  c.set('hosts', Em.A([
-Em.Object.create({
-  progress: 0
-})
-  ]));
+  c.setProperties({
+status: 'failed',
+isPolling: true,
+hosts: Em.A([
+  Em.Object.create({
+progress: 0
+  })
+])
+  });
   c.setIsServicesInstalled(polledData);
   expect(c.get('progress')).to.equal('100');
+  expect(c.get('isPolling')).to.be.false;
 });
 it('Should return 34% completed', function () {
   var 

[2/2] ambari git commit: AMBARI-10576. Add the ability to obtain details about required Kerberos identities (rlevas)

2015-04-29 Thread rlevas
AMBARI-10576. Add the ability to obtain details about required Kerberos 
identities (rlevas)


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

Branch: refs/heads/trunk
Commit: 66e42cbab8a714eac49b4ae84eb238d0c08accb5
Parents: 1e3afa8
Author: Robert Levas rle...@hortonworks.com
Authored: Wed Apr 29 13:01:52 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Wed Apr 29 13:02:01 2015 -0400

--
 .../query/render/ClusterBlueprintRenderer.java  |   2 +-
 .../render/HostKerberosIdentityCsvRenderer.java |  83 +++
 .../api/resources/BaseResourceDefinition.java   |  28 +-
 .../HostComponentResourceDefinition.java|   2 +-
 .../HostKerberosIdentityResourceDefinition.java |  56 ++
 .../api/resources/HostResourceDefinition.java   |   1 +
 .../resources/ResourceInstanceFactoryImpl.java  |   4 +
 .../ambari/server/api/services/BaseService.java |   6 +
 .../server/api/services/ClusterService.java |  16 +
 .../services/HostKerberosIdentityService.java   | 121 
 .../ambari/server/api/services/HostService.java |  11 +
 .../api/services/ResultPostProcessorImpl.java   |   4 +-
 .../api/services/serializers/CsvSerializer.java | 224 +++
 .../services/serializers/JsonSerializer.java|   4 +-
 .../apache/ambari/server/api/util/TreeNode.java |  12 +-
 .../ambari/server/api/util/TreeNodeImpl.java|  14 +-
 .../server/controller/ControllerModule.java |   2 +
 .../server/controller/KerberosHelper.java   | 167 +
 .../controller/ResourceProviderFactory.java |   3 +
 .../AbstractControllerResourceProvider.java |   2 +
 .../HostKerberosIdentityResourceProvider.java   | 243 +++
 .../ambari/server/controller/spi/Resource.java  |   4 +-
 .../kerberos/KerberosIdentityDescriptor.java|  13 +
 .../kerberos/KerberosKeytabDescriptor.java  |  21 +
 .../kerberos/KerberosPrincipalDescriptor.java   |  58 +-
 .../render/ClusterBlueprintRendererTest.java|   4 +-
 .../api/query/render/MinimalRendererTest.java   |   4 +-
 .../resources/BaseResourceDefinitionTest.java   |   4 +-
 ...tKerberosIdentityResourceDefinitionTest.java |  48 ++
 .../resources/HostResourceDefinitionTest.java   |   3 +-
 .../ResourceInstanceFactoryImplTest.java|  10 +
 .../HostKerberosIdentityServiceTest.java|  93 +++
 .../services/serializers/CsvSerializerTest.java | 258 
 .../server/controller/KerberosHelperTest.java   | 631 +++
 ...ostKerberosIdentityResourceProviderTest.java | 362 +++
 35 files changed, 2482 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/66e42cba/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
index 5c84d4c..351f6b4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
@@ -264,7 +264,7 @@ public class ClusterBlueprintRenderer extends BaseRenderer 
implements Renderer {
* @return true if the node represents a collection; false otherwise
*/
   private boolean isCollection(TreeNodeResource node) {
-String isCollection = node.getProperty(isCollection);
+String isCollection = node.getStringProperty(isCollection);
 return isCollection != null  isCollection.equals(true);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/66e42cba/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/HostKerberosIdentityCsvRenderer.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/HostKerberosIdentityCsvRenderer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/HostKerberosIdentityCsvRenderer.java
new file mode 100644
index 000..31e95e1
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/HostKerberosIdentityCsvRenderer.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you 

[1/2] ambari git commit: AMBARI-10576. Add the ability to obtain details about required Kerberos identities (rlevas)

2015-04-29 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 1e3afa867 - 66e42cbab


http://git-wip-us.apache.org/repos/asf/ambari/blob/66e42cba/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
new file mode 100644
index 000..012272c
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostKerberosIdentityServiceTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.ambari.server.api.services;
+
+
+import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
+import org.apache.ambari.server.api.services.serializers.ResultSerializer;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Unit tests for HostKerberosIdentity.
+ */
+public class HostKerberosIdentityServiceTest extends BaseServiceTest {
+
+  public ListServiceTestInvocation getTestInvocations() throws Exception {
+ListServiceTestInvocation listInvocations = new 
ArrayListServiceTestInvocation();
+
+//getComponent
+HostKerberosIdentityService service = new 
TestHostKerberosIdentityService(clusterName, hostName, identityId);
+Method m = service.getClass().getMethod(getKerberosIdentity, 
String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), 
identityId, null};
+listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, 
m, args, null));
+
+//getComponents
+service = new TestHostKerberosIdentityService(clusterName, hostName, 
null);
+m = service.getClass().getMethod(getKerberosIdentities, String.class, 
HttpHeaders.class, UriInfo.class, String.class);
+args = new Object[] {null, getHttpHeaders(), getUriInfo(), null};
+listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, 
m, args, null));
+
+return listInvocations;
+  }
+
+  private class TestHostKerberosIdentityService extends 
HostKerberosIdentityService {
+private String clusterId;
+private String hostId;
+private String identityId;
+
+private TestHostKerberosIdentityService(String clusterId, String hostId, 
String identityId) {
+  super(clusterId, hostId);
+  this.clusterId = clusterId;
+  this.hostId = hostId;
+  this.identityId = identityId;
+}
+
+@Override
+ResourceInstance createResource(String clusterId, String hostId, String 
identityId) {
+  assertEquals(this.clusterId, clusterId);
+  assertEquals(this.hostId, hostId);
+  assertEquals(this.identityId, identityId);
+  return getTestResource();
+}
+
+@Override
+RequestFactory getRequestFactory() {
+  return getTestRequestFactory();
+}
+
+@Override
+protected RequestBodyParser getBodyParser() {
+  return getTestBodyParser();
+}
+
+@Override
+protected ResultSerializer getResultSerializer() {
+  return getTestResultSerializer();
+}
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/66e42cba/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/CsvSerializerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/CsvSerializerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/CsvSerializerTest.java
new file mode 100644
index 000..4647899
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/CsvSerializerTest.java
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more 

ambari git commit: AMBARI-10809. AMS: navigating graph time ranges are not correct. (swagle)

2015-04-29 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 6f00dd8a1 - 7f753b444


AMBARI-10809. AMS: navigating graph time ranges are not correct. (swagle)


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

Branch: refs/heads/trunk
Commit: 7f753b4448e4b370c100d663e8a4f4fd1f0ec5b0
Parents: 6f00dd8
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Wed Apr 29 11:34:31 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Wed Apr 29 11:34:31 2015 -0700

--
 .../metrics/MetricsPaddingMethod.java   | 106 ++
 .../metrics/MetricsPropertyProvider.java|  17 +-
 .../metrics/timeline/AMSPropertyProvider.java   |   4 +-
 .../timeline/MetricsPaddingMethodTest.java  | 208 +++
 4 files changed, 332 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f753b44/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
new file mode 100644
index 000..a78beee
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
@@ -0,0 +1,106 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.controller.metrics;
+
+import org.apache.ambari.server.controller.spi.TemporalInfo;
+import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
+import java.util.Iterator;
+import java.util.TreeMap;
+
+public class MetricsPaddingMethod {
+  private final PADDING_STRATEGY strategy;
+  public static final String ZERO_PADDING_PARAM = params/padding;
+  public static enum PADDING_STRATEGY {
+ZEROS,
+NULLS,
+NONE
+  }
+
+  public MetricsPaddingMethod(PADDING_STRATEGY strategy) {
+this.strategy = strategy;
+  }
+
+  /**
+   * Adds zero/null values towards the end of metrics sequence as well as the
+   * beginning to support backward compatibility with Ganglia.
+   * We use step if only a single datapoint is found.
+   * It is assumed that @TimelineMetric.metricsValues are sorted in ascending
+   * order and thee is no padding between the interval.
+   *
+   * @param metric AMS @TimelineMetric
+   * @param temporalInfo @TemporalInfo Requested interval
+   */
+  public void applyPaddingStrategy(TimelineMetric metric, TemporalInfo 
temporalInfo) {
+if (strategy.equals(PADDING_STRATEGY.NONE) || temporalInfo == null) {
+  return;
+}
+
+// TODO: JSON dser returns LinkedHashMap that is not Navigable
+TreeMapLong, Double values = new TreeMapLong, 
Double(metric.getMetricValues());
+
+long dataInterval = getTimelineMetricInterval(values);
+
+if (dataInterval == -1) {
+  dataInterval = temporalInfo.getStep() != null ? temporalInfo.getStep() : 
-1;
+}
+// Unable to determine what interval to use for padding
+if (dataInterval == -1) {
+  return;
+}
+
+long intervalStartTime = longToMillis(temporalInfo.getStartTime());
+long intervalEndTime = longToMillis(temporalInfo.getEndTime());
+long dataStartTime = longToMillis(values.firstKey());
+long dataEndTime = longToMillis(values.lastKey());
+
+Double paddingValue = 0.0d;
+
+if (strategy.equals(PADDING_STRATEGY.NULLS)) {
+  paddingValue = null;
+}
+// Pad before data interval
+for (long counter = intervalStartTime; counter  dataStartTime; counter += 
dataInterval) {
+  // Until counter approaches or goes past dataStartTime : pad
+  values.put(counter, paddingValue);
+}
+// Pad after data interval
+for (long counter = dataEndTime + dataInterval; counter = 
intervalEndTime; 

ambari git commit: AMBARI-10720: [WinTP2] Create chocolatey packages for ambari artifacts and update agent bootstrap (jluniya)

2015-04-29 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/trunk 742f3f863 - 36f92c70b


AMBARI-10720: [WinTP2] Create chocolatey packages for ambari artifacts and 
update agent bootstrap (jluniya)


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

Branch: refs/heads/trunk
Commit: 36f92c70b628ff8f0f71635f0af8edff13ceee06
Parents: 742f3f8
Author: Jayush Luniya jlun...@hortonworks.com
Authored: Wed Apr 29 14:17:01 2015 -0700
Committer: Jayush Luniya jlun...@hortonworks.com
Committed: Wed Apr 29 14:17:01 2015 -0700

--
 ambari-agent/pom.xml|  34 ++-
 .../src/main/package/choco/ambari-agent.nuspec  |  25 ++
 .../main/package/choco/chocolateyinstall.ps1|  30 +++
 .../main/package/choco/chocolateyuninstall.ps1  |  23 ++
 ambari-agent/src/packages/windows-choco.xml |  42 +++
 ambari-agent/src/packages/windows.xml   |   1 +
 ambari-server/pom.xml   |  34 ++-
 .../main/assemblies/server-windows-choco.xml|  42 +++
 .../src/main/assemblies/server-windows.xml  |   1 +
 .../src/main/package/choco/ambari-server.nuspec |  25 ++
 .../main/package/choco/chocolateyinstall.ps1|  30 +++
 .../main/package/choco/chocolateyuninstall.ps1  |  23 ++
 ambari-server/src/main/python/bootstrap.py  |   5 +-
 ambari-server/src/main/python/setupAgent.py | 266 ---
 ambari-server/src/test/python/TestSetupAgent.py |  28 +-
 15 files changed, 377 insertions(+), 232 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/36f92c70/ambari-agent/pom.xml
--
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index a57e760..a08e81c 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -703,7 +703,7 @@
 artifactIdapache-rat-plugin/artifactId
 configuration
   excludes
-   excludesrc/test/python/tmp_hostcheck.result/exclude
+excludesrc/test/python/tmp_hostcheck.result/exclude
 excludesrc/examples/*/exclude
 excludesrc/test/python/dummy*.txt/exclude
 excludesrc/test/python/ambari_agent/dummy_files/*/exclude
@@ -715,6 +715,7 @@
 exclude**/*.json/exclude
 exclude**/*.pydevproject/exclude
 exclude**/*.wxs/exclude
+excludesrc/main/package/choco/ambari-agent.nuspec/exclude
   /excludes
 /configuration
 executions
@@ -815,6 +816,21 @@
   goalsingle/goal
 /goals
   /execution
+  execution
+idbuild-choco-dir/id
+phasepackage/phase
+goals
+  goalsingle/goal
+/goals
+configuration
+  attachfalse/attach
+  appendAssemblyIdtrue/appendAssemblyId
+  tarLongFileModegnu/tarLongFileMode
+  descriptors
+descriptorsrc/packages/windows-choco.xml/descriptor
+  /descriptors
+/configuration
+  /execution
 /executions
   /plugin
   !-- msi creation --
@@ -849,6 +865,22 @@
   
workingDirectory${basedir}/target/${final.name}-windows-dist/workingDirectory
 /configuration
   /execution
+  execution
+idbuild-choco-package/id
+phasepackage/phase
+goals
+  goalexec/goal
+/goals
+configuration
+  executablechoco.exe/executable
+  arguments
+argumentpack/argument
+argument--version=${project.version}/argument
+
argument${basedir}/target/ambari-agent-${project.version}-choco/ambari-agent.nuspec/argument
+  /arguments
+  
workingDirectorytarget/ambari-agent-${project.version}-choco/workingDirectory
+/configuration
+  /execution
 /executions
   /plugin
   plugin

http://git-wip-us.apache.org/repos/asf/ambari/blob/36f92c70/ambari-agent/src/main/package/choco/ambari-agent.nuspec
--
diff --git a/ambari-agent/src/main/package/choco/ambari-agent.nuspec 
b/ambari-agent/src/main/package/choco/ambari-agent.nuspec
new file mode 100644
index 000..d7efb4d
--- /dev/null
+++ b/ambari-agent/src/main/package/choco/ambari-agent.nuspec
@@ -0,0 +1,25 @@
+?xml version=1.0 encoding=utf-8?
+!-- Do not remove this test for 

ambari git commit: AMBARI-10850. Save button doesn't disable when invalid configs present on enhanced config tab. (alexantonenko)

2015-04-29 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 4189dcca8 - 742f3f863


AMBARI-10850. Save button doesn't disable when invalid configs present on 
enhanced config tab. (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 742f3f86392f02468066abf0535a371e05956220
Parents: 4189dcc
Author: Alex Antonenko hiv...@gmail.com
Authored: Wed Apr 29 22:48:01 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 30 00:05:54 2015 +0300

--
 .../models/configs/objects/service_config.js|  8 +++--
 .../wizard/slave_component_groups_controller.js |  5 ++-
 .../configs/objects/service_config_test.js  | 34 
 3 files changed, 44 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/742f3f86/ambari-web/app/models/configs/objects/service_config.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config.js 
b/ambari-web/app/models/configs/objects/service_config.js
index b83b781..fe4c8f0 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -32,7 +32,8 @@ App.ServiceConfig = Ember.Object.extend({
   masterErrors = 0,
   slaveErrors = 0,
   configs = this.get('configs'),
-  configCategories = this.get('configCategories');
+  configCategories = this.get('configCategories'),
+  enhancedConfigsErrors = 0;
 configCategories.forEach(function (_category) {
   slaveErrors += _category.get('slaveErrorCount');
   _category.set('nonSlaveErrorCount', 0);
@@ -43,6 +44,9 @@ App.ServiceConfig = Ember.Object.extend({
 category.incrementProperty('nonSlaveErrorCount');
 masterErrors++;
   }
+  if (!item.get('isValid')  item.get('widget')  item.get('isVisible')) 
{
+enhancedConfigsErrors++;
+  }
   if (item.get('overrides')) {
 item.get('overrides').forEach(function (e) {
   if (e.error) {
@@ -54,7 +58,7 @@ App.ServiceConfig = Ember.Object.extend({
 });
   }
 });
-return masterErrors + slaveErrors + overrideErrors;
+return masterErrors + slaveErrors + overrideErrors + enhancedConfigsErrors;
   }.property('configs.@each.isValid', 'configs.@each.isVisible', 
'configCategories.@each.slaveErrorCount', 'configs.@each.overrideErrorTrigger'),
 
   isPropertiesChanged: function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/742f3f86/ambari-web/test/controllers/wizard/slave_component_groups_controller.js
--
diff --git 
a/ambari-web/test/controllers/wizard/slave_component_groups_controller.js 
b/ambari-web/test/controllers/wizard/slave_component_groups_controller.js
index d26812a..e692a4f 100644
--- a/ambari-web/test/controllers/wizard/slave_component_groups_controller.js
+++ b/ambari-web/test/controllers/wizard/slave_component_groups_controller.js
@@ -21,6 +21,7 @@ var App = require('app');
 require('utils/helper');
 require('controllers/wizard/slave_component_groups_controller');
 
+var configPropertyHelper = require('utils/configs/config_property_helper');
 var controller;
 describe('App.SlaveComponentGroupsController', function () {
 
@@ -225,12 +226,14 @@ describe('App.SlaveComponentGroupsController', function 
() {
 initialValue: Em.K,
 validate: Em.K
   });
-}   
+}
   });
+  sinon.stub(configPropertyHelper, 'initialValue', Em.K);
 });
 afterEach(function () {
   App.ServiceConfigProperty.create.restore();
   App.config.get.restore();
+  configPropertyHelper.initialValue.restore();
 });
 it('should return created config', function () {
   var res = 
JSON.parse(JSON.stringify(controller.componentProperties('HBASE')));

http://git-wip-us.apache.org/repos/asf/ambari/blob/742f3f86/ambari-web/test/models/configs/objects/service_config_test.js
--
diff --git a/ambari-web/test/models/configs/objects/service_config_test.js 
b/ambari-web/test/models/configs/objects/service_config_test.js
index cfa015c..ff848b2 100644
--- a/ambari-web/test/models/configs/objects/service_config_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_test.js
@@ -141,6 +141,40 @@ describe('App.ServiceConfig', function () {
   expect(serviceConfig.get('configCategories').findProperty('name', 
'c0').get('nonSlaveErrorCount')).to.equal(2);
   

ambari git commit: AMBARI-10809. AMS: navigating graph time ranges are not correct. Unit test fix. (swagle)

2015-04-29 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f753b444 - 4189dcca8


AMBARI-10809. AMS: navigating graph time ranges are not correct. Unit test fix. 
(swagle)


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

Branch: refs/heads/trunk
Commit: 4189dcca8ea334b099aed550191148fbc2c7395e
Parents: 7f753b4
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Wed Apr 29 13:59:47 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Wed Apr 29 13:59:47 2015 -0700

--
 .../metrics/MetricsPaddingMethod.java   |   3 +-
 .../timeline/AMSPropertyProviderTest.java   |   2 +-
 .../resources/ams/multiple_host_metrics.json| 172 +--
 3 files changed, 89 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4189dcca/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
index a78beee..32d214d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
@@ -25,6 +25,7 @@ import java.util.TreeMap;
 public class MetricsPaddingMethod {
   private final PADDING_STRATEGY strategy;
   public static final String ZERO_PADDING_PARAM = params/padding;
+  private static final long MINIMUM_STEP_INTERVAL = 999l; // ~ 1 second
   public static enum PADDING_STRATEGY {
 ZEROS,
 NULLS,
@@ -55,7 +56,7 @@ public class MetricsPaddingMethod {
 
 long dataInterval = getTimelineMetricInterval(values);
 
-if (dataInterval == -1) {
+if (dataInterval == -1 || dataInterval  MINIMUM_STEP_INTERVAL) {
   dataInterval = temporalInfo.getStep() != null ? temporalInfo.getStep() : 
-1;
 }
 // Unable to determine what interval to use for padding

http://git-wip-us.apache.org/repos/asf/ambari/blob/4189dcca/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
index 78e1831..b72dcaf 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
@@ -364,7 +364,7 @@ public class AMSPropertyProviderTest {
 uriBuilder.addParameter(endTime, 1421697600);
 Assert.assertEquals(uriBuilder.toString(), streamProvider.getLastSpec());
 Number[][] val = (Number[][]) res.getPropertyValue(propertyId);
-Assert.assertEquals(188, val.length);
+Assert.assertEquals(189, val.length);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/4189dcca/ambari-server/src/test/resources/ams/multiple_host_metrics.json
--
diff --git a/ambari-server/src/test/resources/ams/multiple_host_metrics.json 
b/ambari-server/src/test/resources/ams/multiple_host_metrics.json
index 019dc62..2868573 100644
--- a/ambari-server/src/test/resources/ams/multiple_host_metrics.json
+++ b/ambari-server/src/test/resources/ams/multiple_host_metrics.json
@@ -125,92 +125,92 @@
 appid: HOST,
 starttime: 1416445244801,
 metrics: {
-  1416486250037: 2.46272E8,
-  1416486255040: 2.46145024E8,
-  1416486260042: 2.46280192E8,
-  1416486265047: 2.4641536E8,
-  1416486270053: 2.44318208E8,
-  1416486275058: 2.464768E8,
-  1416486280063: 2.464768E8,
-  1416486285067: 2.464768E8,
-  1416486290072: 2.46898688E8,
-  1416486295077: 2.46898688E8,
-  1416486300083: 2.46898688E8,
-  1416486305088: 2.46898688E8,
-  1416486310093: 2.4676352E8,
-  1416486315097: 2.4676352E8,
-  1416486320102: 2.46898688E8,
-  1416486325105: 2.46898688E8,
-  1416486330107: 2.46898688E8,
-  1416486335113: 2.47025664E8,
-  1416486340118: 2.47025664E8,
-  1416486345123: 2.46898688E8,
-  

ambari git commit: AMBARI-10825. Missed Support for Wire Encyption (alexantonenko)

2015-04-29 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 36f92c70b - 53bc491ca


AMBARI-10825. Missed Support for Wire Encyption (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 53bc491ca4d8bf828e699bbe1587e12687efe1eb
Parents: 36f92c7
Author: Alex Antonenko hiv...@gmail.com
Authored: Thu Apr 30 00:25:10 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Thu Apr 30 00:25:21 2015 +0300

--
 .../HDFS/2.1.0.2.0/configuration/ssl-client.xml | 24 -
 .../HDFS/2.1.0.2.0/configuration/ssl-server.xml | 28 ++--
 .../YARN/configuration-mapred/ssl-client.xml| 24 -
 .../YARN/configuration-mapred/ssl-server.xml| 28 ++--
 .../YARN/configuration-mapred/ssl-client.xml| 24 -
 .../YARN/configuration-mapred/ssl-server.xml| 28 ++--
 6 files changed, 111 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/53bc491c/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-client.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-client.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-client.xml
index ec8cfac..74f89f5 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-client.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-client.xml
@@ -21,11 +21,33 @@
 property
 namessl.client.truststore.location/name
 value/etc/security/clientKeys/all.jks/value
-descriptionTruststore to be used by clients. Must be 
specified./description
+descriptionLocation of the trust store file./description
 /property
 property
 namessl.client.truststore.type/name
 valuejks/value
 descriptionOptional. Default value is jks./description
 /property
+property
+namesssl.client.truststore.password/name
+valuebigdata/value
+property-typePASSWORD/property-type
+descriptionPassword to open the trust store file./description
+/property
+property
+namessl.client.truststore.reload.interval/name
+value1/value
+descriptionTruststore reload interval, in milliseconds./description
+/property
+property
+namessl.client.keystore.location/name
+value/etc/security/clientKeys/keystore.jks/value
+descriptionLocation of the keystore file./description
+/property
+property
+namessl.client.keystore.password/name
+valuebigdata/value
+property-typePASSWORD/property-type
+descriptionPassword to open the keystore file./description
+/property
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/53bc491c/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-server.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-server.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-server.xml
index 20b8b1e..c152711 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-server.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/ssl-server.xml
@@ -20,8 +20,8 @@
 configuration
 property
 namessl.server.truststore.location/name
-value/etc/security/serverKeys/truststore.jks/value
-descriptionTruststore to be used by NN and DN. Must be 
specified./description
+value/etc/security/clientKeys/all.jks/value
+descriptionLocation of the trust store file./description
 /property
 property
 namessl.server.truststore.type/name
@@ -29,25 +29,25 @@
 descriptionOptional. Default value is jks./description
 /property
 property
-namessl.server.keystore.location/name
-value/etc/security/serverKeys/keystore.jks/value
-descriptionKeystore to be used by NN and DN. Must be 
specified./description
+namesssl.server.truststore.password/name
+valuebigdata/value
+property-typePASSWORD/property-type
+descriptionPassword to open the trust store file./description
 /property
 property
-namessl.server.keystore.password/name
-property-typePASSWORD/property-type
-

ambari git commit: AMBARI-10809. AMS: navigating graph time ranges are not correct. (swagle)

2015-04-29 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 5eab7803f - fa96df533


AMBARI-10809. AMS: navigating graph time ranges are not correct. (swagle)


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

Branch: refs/heads/branch-2.0.maint
Commit: fa96df5332b0da27b51e76a018a9e5400f38b9ec
Parents: 5eab780
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Wed Apr 29 13:50:05 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Wed Apr 29 13:50:05 2015 -0700

--
 .../metrics/MetricsPaddingMethod.java   | 107 ++
 .../metrics/MetricsPropertyProvider.java|  17 +-
 .../metrics/timeline/AMSPropertyProvider.java   |   8 +-
 .../timeline/AMSPropertyProviderTest.java   |   2 +-
 .../timeline/MetricsPaddingMethodTest.java  | 208 +++
 .../resources/ams/multiple_host_metrics.json| 172 +++
 6 files changed, 422 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa96df53/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
new file mode 100644
index 000..6093aaf
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPaddingMethod.java
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.controller.metrics;
+
+import org.apache.ambari.server.controller.spi.TemporalInfo;
+import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
+import java.util.Iterator;
+import java.util.TreeMap;
+
+public class MetricsPaddingMethod {
+  private final PADDING_STRATEGY strategy;
+  private static final long MINIMUM_STEP_INTERVAL = 999l; // ~ 1 second
+  public static final String ZERO_PADDING_PARAM = params/padding;
+  public static enum PADDING_STRATEGY {
+ZEROS,
+NULLS,
+NONE
+  }
+
+  public MetricsPaddingMethod(PADDING_STRATEGY strategy) {
+this.strategy = strategy;
+  }
+
+  /**
+   * Adds zero/null values towards the end of metrics sequence as well as the
+   * beginning to support backward compatibility with Ganglia.
+   * We use step if only a single datapoint is found.
+   * It is assumed that @TimelineMetric.metricsValues are sorted in ascending
+   * order and thee is no padding between the interval.
+   *
+   * @param metric AMS @TimelineMetric
+   * @param temporalInfo @TemporalInfo Requested interval
+   */
+  public void applyPaddingStrategy(TimelineMetric metric, TemporalInfo 
temporalInfo) {
+if (strategy.equals(PADDING_STRATEGY.NONE) || temporalInfo == null) {
+  return;
+}
+
+// TODO: JSON dser returns LinkedHashMap that is not Navigable
+TreeMapLong, Double values = new TreeMapLong, 
Double(metric.getMetricValues());
+
+long dataInterval = getTimelineMetricInterval(values);
+
+if (dataInterval == -1 || dataInterval  MINIMUM_STEP_INTERVAL) {
+  dataInterval = temporalInfo.getStep() != null ? temporalInfo.getStep() : 
-1;
+}
+// Unable to determine what interval to use for padding
+if (dataInterval == -1) {
+  return;
+}
+
+long intervalStartTime = longToMillis(temporalInfo.getStartTime());
+long intervalEndTime = longToMillis(temporalInfo.getEndTime());
+long dataStartTime = longToMillis(values.firstKey());
+long dataEndTime = longToMillis(values.lastKey());
+
+Double paddingValue = 0.0d;
+
+if (strategy.equals(PADDING_STRATEGY.NULLS)) {
+  paddingValue = null;
+}
+// Pad before data interval
+for (long counter = intervalStartTime; counter  

[2/2] ambari git commit: AMBARI-10604 - [WinTP2] StackAdvisor for HDPWIN needs to be revisited

2015-04-29 Thread abaranchuk
AMBARI-10604 - [WinTP2] StackAdvisor for HDPWIN needs to be revisited


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

Branch: refs/heads/trunk
Commit: e866f0426b16bfcae664ab81bbed95a73517685e
Parents: 8346b21
Author: Artem Baranchuk abaranc...@hortonworks.con
Authored: Thu Apr 30 01:21:19 2015 +0300
Committer: Artem Baranchuk abaranc...@hortonworks.con
Committed: Thu Apr 30 01:21:47 2015 +0300

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |   2 +-
 .../stacks/HDPWIN/2.1/services/stack_advisor.py | 475 ++-
 .../stacks/HDPWIN/2.2/services/stack_advisor.py | 571 ++-
 3 files changed, 1019 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e866f042/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 7892c02..afefa5d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -335,7 +335,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   HBASE: {hbase-env: self.validateHbaseEnvConfigurations},
   AMBARI_METRICS: {ams-hbase-site: 
self.validateAmsHbaseSiteConfigurations,
   ams-hbase-env: self.validateAmsHbaseEnvConfigurations,
-  ams-site: self.validateAmsSiteConfigurations},
+  ams-site: self.validateAmsSiteConfigurations}
 }
 
   def validateMinMax(self, items, recommendedDefaults, configurations):

http://git-wip-us.apache.org/repos/asf/ambari/blob/e866f042/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
index ce0739d..c8c0c72 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
@@ -19,6 +19,7 @@ limitations under the License.
 
 import re
 import sys
+import os
 from math import ceil
 
 from stack_advisor import DefaultStackAdvisor
@@ -82,25 +83,60 @@ class HDPWIN21StackAdvisor(DefaultStackAdvisor):
 return {
   YARN: self.recommendYARNConfigurations,
   MAPREDUCE2: self.recommendMapReduce2Configurations,
+  HDFS: self.recommendHDFSConfigurations,
+  HBASE: self.recommendHbaseEnvConfigurations,
   OOZIE: self.recommendOozieConfigurations,
   HIVE: self.recommendHiveConfigurations,
-  TEZ: self.recommendTezConfigurations
+  TEZ: self.recommendTezConfigurations,
+  AMBARI_METRICS: self.recommendAmsConfigurations
 }
 
-  def putProperty(self, config, configType):
-config[configType] = {properties: {}}
+  def putProperty(self, config, configType, services=None):
+userConfigs = {}
+changedConfigs = []
+# if services parameter, prefer values, set by user
+if services:
+  if 'configurations' in services.keys():
+userConfigs = services['configurations']
+  if 'changed-configurations' in services.keys():
+changedConfigs = services[changed-configurations]
+
+if configType not in config:
+  config[configType] = {}
+ifproperties not in config[configType]:
+  config[configType][properties] = {}
 def appendProperty(key, value):
-  config[configType][properties][key] = str(value)
+  if {'type': configType, 'name': key} in changedConfigs:
+config[configType][properties][key] = 
userConfigs[configType]['properties'][key]
+  else:
+config[configType][properties][key] = str(value)
 return appendProperty
 
+  def putPropertyAttribute(self, config, configType):
+if configType not in config:
+  config[configType] = {}
+def appendPropertyAttribute(key, attribute, attributeValue):
+  if property_attributes not in config[configType]:
+config[configType][property_attributes] = {}
+  if key not in config[configType][property_attributes]:
+config[configType][property_attributes][key] = {}
+  config[configType][property_attributes][key][attribute] = 
attributeValue if isinstance(attributeValue, list) else str(attributeValue)
+return appendPropertyAttribute
+
+  def recommendHDFSConfigurations(self, configurations, 

ambari git commit: AMBARI-10837. HDFS Review: Multiple recommendation API updates for HDFS configs (mpapirkovskyy via srimanth)

2015-04-29 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk e866f0426 - 54be9c4e6


AMBARI-10837. HDFS Review: Multiple recommendation API updates for HDFS configs 
(mpapirkovskyy via srimanth)


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

Branch: refs/heads/trunk
Commit: 54be9c4e67a035a4316ff8784c5686fd84f04141
Parents: e866f04
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Wed Apr 29 16:45:44 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Wed Apr 29 16:45:49 2015 -0700

--
 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 12 +++
 .../HDFS/2.1.0.2.0/configuration/hdfs-site.xml  | 18 +++---
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |  9 +
 .../HDP/2.2/services/HDFS/themes/theme.json |  7 +++-
 .../stacks/HDP/2.2/services/stack_advisor.py| 37 
 .../stacks/2.2/common/test_stack_advisor.py | 22 ++--
 6 files changed, 65 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/54be9c4e/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
index 99e1130..5d363b5 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
@@ -59,6 +59,12 @@
 value200/value
 descriptionNameNode new generation size/description
 display-nameNameNode new generation size/display-name
+depends-on
+  property
+typehadoop-env/type
+namenamenode_heapsize/name
+  /property
+/depends-on
 value-attributes
   typeint/type
   minimum0/minimum
@@ -72,6 +78,12 @@
 value200/value
 descriptionNameNode maximum new generation size/description
 display-nameNameNode maximum new generation size/display-name
+depends-on
+  property
+typehadoop-env/type
+namenamenode_heapsize/name
+  /property
+/depends-on
 value-attributes
   typeint/type
   minimum0/minimum

http://git-wip-us.apache.org/repos/asf/ambari/blob/54be9c4e/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
index 0108b27..68bd0f7 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml
@@ -167,7 +167,7 @@
 
   property
 namedfs.namenode.safemode.threshold-pct/name
-value1.0f/value
+value0.999/value
 description
   Specifies the percentage of blocks that should satisfy
   the minimal replication requirement defined by 
dfs.namenode.replication.min.
@@ -176,18 +176,10 @@
 /description
 display-nameMinimum replicated blocks %ge/display-name
 value-attributes
-  typevalue-list/type
-  entries
-entry
-  value0.99/value
-  label0.99f/label
-/entry
-entry
-  value1.0/value
-  label1.0f/label
-/entry
-  /entries
-  selection-cardinality1/selection-cardinality
+  typefloat/type
+  minimum0.990/minimum
+  maximum1.000/maximum
+  increment-step0.001/increment-step
 /value-attributes
   /property
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/54be9c4e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index afefa5d..32678a8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -224,6 +224,15 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   return componentHosts[0]
 return None
 
+  def getHostComponentsByCategories(self, hostname, categories, services, 
hosts):
+components = []
+ 

[1/2] ambari git commit: AMBARI-10831 - [WinTP2] server log contains lots of errors due to host OS family couldn't be found

2015-04-29 Thread abaranchuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 53bc491ca - e866f0426


AMBARI-10831 - [WinTP2] server log contains lots of errors due to host OS 
family couldn't be found


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

Branch: refs/heads/trunk
Commit: 8346b21c85598f6a040967751edaff9f36fdc51a
Parents: 53bc491
Author: Artem Baranchuk abaranc...@hortonworks.con
Authored: Wed Apr 29 15:00:25 2015 +0300
Committer: Artem Baranchuk abaranc...@hortonworks.con
Committed: Thu Apr 30 01:21:46 2015 +0300

--
 .../java/org/apache/ambari/server/state/stack/OsFamily.java   | 4 ++--
 .../org/apache/ambari/server/state/stack/OSFamilyTest.java| 7 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8346b21c/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
index 3cdc2ce..37a6db3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
@@ -45,7 +45,7 @@ public class OsFamily {
 private final static String OS_FAMILY_SUSE = suse;
 private final static String OS_FAMILY_REDHAT = redhat;
 
-private final String os_pattern = ([^\\d]*)([\\d]*);
+private final String os_pattern = 
([\\D]+|(?:[\\D]+[\\d]+[\\D]+))([\\d]*);
 private final String OS_DISTRO = distro;
 private final String OS_VERSION = versions;
 private final String LOAD_CONFIG_MSG = Could not load OS family 
definition from %s file;
@@ -99,7 +99,7 @@ public class OsFamily {
   Pattern r = Pattern.compile(os_pattern);
   Matcher m = r.matcher(os);
 
-  if (m.find()){
+  if (m.matches()){
 pos.put(OS_DISTRO, m.group(1));
 pos.put(OS_VERSION, m.group(2));
   } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8346b21c/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
index 7957860..9654dc3 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
@@ -101,8 +101,13 @@ public class OSFamilyTest {
 
 Assert.assertNotNull(actual_result);
 Assert.assertEquals(expected_result, actual_result);
-  }
 
+// for windows
+expected_result = winsrv6;
+actual_result = os_family.find(win2012server6);
 
+Assert.assertNotNull(actual_result);
+Assert.assertEquals(expected_result, actual_result);
+  }
 }
 



ambari git commit: AMBARI-10457. Storm Nimbus HA. (Sriharsha Chintalapani via yusaku)

2015-04-29 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 5f95f11bc - 97c524d96


AMBARI-10457. Storm Nimbus HA. (Sriharsha Chintalapani via yusaku)


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

Branch: refs/heads/trunk
Commit: 97c524d969fb7b1d405ade65e3237bf7cb8ccb78
Parents: 5f95f11
Author: Yusaku Sako yus...@hortonworks.com
Authored: Wed Apr 29 19:38:54 2015 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Wed Apr 29 19:38:54 2015 -0700

--
 .../stacks/HDP/2.3/services/STORM/metainfo.xml  |  23 +++
 ambari-web/app/controllers/main/host/details.js | 148 +++
 ambari-web/app/data/HDP2/site_properties.js |  13 ++
 ambari-web/app/messages.js  |   2 +
 .../app/utils/configs/config_property_helper.js |   3 +
 ambari-web/test/utils/config_test.js|   2 +-
 6 files changed, 190 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/97c524d9/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
index b4dc4a1..092a4d0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metainfo.xml
@@ -40,6 +40,29 @@
   /packages
 /osSpecific
   /osSpecifics
+  components
+component
+  nameNIMBUS/name
+  displayNameNimbus/displayName
+  categoryMASTER/category
+  cardinality1+/cardinality
+  versionAdvertisedtrue/versionAdvertised
+  dependencies
+dependency
+  nameZOOKEEPER/ZOOKEEPER_SERVER/name
+  scopecluster/scope
+  auto-deploy
+enabledtrue/enabled
+  /auto-deploy
+/dependency
+  /dependencies
+  commandScript
+scriptscripts/nimbus.py/script
+scriptTypePYTHON/scriptType
+timeout1200/timeout
+  /commandScript
+/component
+  /components
 /service
   /services
 /metainfo

http://git-wip-us.apache.org/repos/asf/ambari/blob/97c524d9/ambari-web/app/controllers/main/host/details.js
--
diff --git a/ambari-web/app/controllers/main/host/details.js 
b/ambari-web/app/controllers/main/host/details.js
index d23fc79..15df59f 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -233,6 +233,12 @@ App.MainHostDetailsController = Em.Controller.extend({
   deleteHiveMetastoreMsg: Em.View.extend({
 template: 
Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteHiveMetastore'))
   }),
+  isNimbus: function () {
+return componentName == 'NIMBUS';
+  }.property(),
+  deleteNimbusMsg: Em.View.extend({
+template: 
Em.Handlebars.compile(Em.I18n.t('hosts.host.deleteComponent.popup.deleteNimbus'))
+  }),
   isChecked: false,
   disablePrimary: function () {
 return !this.get('isChecked');
@@ -329,6 +335,9 @@ App.MainHostDetailsController = Em.Controller.extend({
 } else if (data.componentName == 'HIVE_METASTORE') {
   this.set('deleteHiveMetaStore', true);
   this.loadConfigs('loadHiveConfigs');
+} else if(data.componentName == 'NIMBUS') {
+  this.set('deleteNimbusHost', true);
+  this.loadConfigs('loadStormConfigs');
 }
   },
 
@@ -449,6 +458,7 @@ App.MainHostDetailsController = Em.Controller.extend({
   self = this,
   hiveHost = event.hiveMetastoreHost ? event.hiveMetastoreHost : ;
   component = event.context,
+  hostName = this.get('content.hostName'),
   componentName = component.get('componentName'),
   missedComponents = !!hiveHost ? [] : 
componentsUtils.checkComponentDependencies(componentName, {
 scope: 'host',
@@ -474,6 +484,12 @@ App.MainHostDetailsController = Em.Controller.extend({
   self.loadConfigs(loadHiveConfigs);
 }, Em.I18n.t('hosts.host.addComponent.' + componentName ));
 break;
+  case 'NIMBUS':
+returnFunc = App.showConfirmationPopup(function() {
+self.set('nimbusHost', hostName);
+self.loadConfigs(loadStormConfigs);
+}, Em.I18n.t('hosts.host.addComponent.' + componentName));
+break;
   default:
 returnFunc = 

[1/2] ambari git commit: AMBARI-10854. Edit widget wizard: Long expressions overflows from the expression builder.(XIWANG)

2015-04-29 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 54be9c4e6 - 0e741d6a2


AMBARI-10854. Edit widget wizard: Long expressions overflows from the 
expression builder.(XIWANG)


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

Branch: refs/heads/trunk
Commit: 0e741d6a22b0537df5ad478e41981eff07679482
Parents: 73a9275
Author: Xi Wang xiw...@apache.org
Authored: Wed Apr 29 17:00:43 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Wed Apr 29 17:00:54 2015 -0700

--
 ambari-web/app/styles/enhanced_service_dashboard.less | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e741d6a/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index 2b8d3c7..aa424c1 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -337,6 +337,7 @@
   .metric-field {
 height: 100%;
 background-color: #f5f5f5;
+overflow: scroll;
   }
   .metric-instance {
 font-weight: bold;



[2/2] ambari git commit: AMBARI-10812. Widgets: ui changes v2.(xiwang)

2015-04-29 Thread xiwang
AMBARI-10812. Widgets: ui changes v2.(xiwang)


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

Branch: refs/heads/trunk
Commit: 73a9275c3e15c75c224ea2e1e4ef63e4e177ee28
Parents: 54be9c4
Author: Xi Wang xiw...@apache.org
Authored: Tue Apr 28 17:53:27 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Wed Apr 29 17:00:54 2015 -0700

--
 .../service/widgets/create/step3_controller.js  | 40 ++--
 ambari-web/app/messages.js  |  4 +-
 .../app/styles/enhanced_service_dashboard.less  | 23 ++-
 .../main/service/widgets/create/step3.hbs   | 18 -
 .../main/service/widgets/create/step3_view.js   | 12 --
 5 files changed, 37 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/73a9275c/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
index 02d677e..41897cc 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
@@ -22,20 +22,6 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
   name: widgetWizardStep3Controller,
 
   /**
-   * @type {Array}
-   */
-  scopes: [
-Em.Object.create({
-  name: 'User',
-  checked: false
-}),
-Em.Object.create({
-  name: 'Cluster',
-  checked: false
-})
-  ],
-
-  /**
* @type {string}
*/
   widgetName: '',
@@ -46,11 +32,16 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
   widgetAuthor: '',
 
   /**
+   * @type {boolean}
+   */
+  isSharedChecked: false,
+
+  /**
* @type {string}
*/
   widgetScope: function () {
-return this.get('scopes').findProperty('checked');
-  }.property('scopes.@each.checked'),
+return this.get('isSharedChecked')? 'Cluster': 'User';
+  }.property('isSharedChecked'),
 
   /**
* @type {string}
@@ -83,19 +74,12 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
 this.set('widgetAuthor', App.router.get('loginName'));
 this.set('widgetName', this.get('content.widgetName'));
 this.set('widgetDescription', this.get('content.widgetDescription'));
-this.get('scopes').forEach(function (scope) {
-  scope.set('checked', scope.get('name').toUpperCase() == 
this.get('content.widgetScope'));
-}, this);
-//if no scope selected, choose User by default
-if (!this.get('scopes').someProperty('checked')) {
-  this.get('scopes').findProperty('name', 'User').set('checked', true);
-}
+this.set('isSharedChecked', this.get('content.widgetScope') == 'CLUSTER');
   },
 
-  //TODO: Following computed property needs to be implemented. Next button 
should be enabled when there is no validation error and all required fields are 
filled
   isSubmitDisabled: function () {
-return !(this.get('widgetName')  this.get('widgetDescription'));
-  }.property('widgetName', 'widgetDescription'),
+return !(this.get('widgetName'));
+  }.property('widgetName'),
 
   /**
* collect all needed data to create new widget
@@ -106,8 +90,8 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
   WidgetInfo: {
 widget_name: this.get('widgetName'),
 widget_type: this.get('content.widgetType'),
-description: this.get('widgetDescription'),
-scope: this.get('widgetScope.name').toUpperCase(),
+description: this.get('widgetDescription') ||  ,
+scope: this.get('widgetScope').toUpperCase(),
 metrics: this.get('widgetMetrics').map(function (metric) {
   return {
 name: metric.name,

http://git-wip-us.apache.org/repos/asf/ambari/blob/73a9275c/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 7b032b3..3b4105b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2519,7 +2519,9 @@ Em.I18n.translations = {
   'widget.create.wizard.step2.allComponents': 'All {0}',
   'widget.create.wizard.step2.activeComponents': 'Active {0}',
   'widget.create.wizard.step2.noMetricFound': 'No metric found',
-  'widget.create.wizard.step3.widgetName': 'Widget Name',
+  'widget.create.wizard.step3.widgetName': 'Name',
+  'widget.create.wizard.step3.sharing': 'Sharing',
+  'widget.create.wizard.step3.sharing.msg': 'Share this widget in the widget 
library',
   

ambari git commit: AMBARI-10857. Widget Browser load duplicated widgets if it is user created and CLUSTER scope.(XIWANG)

2015-04-29 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 0e741d6a2 - 5f95f11bc


AMBARI-10857. Widget Browser load duplicated widgets if it is user created and 
CLUSTER scope.(XIWANG)


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

Branch: refs/heads/trunk
Commit: 5f95f11bc2f57f56521145c80e839cffb682dfbe
Parents: 0e741d6
Author: Xi Wang xiw...@apache.org
Authored: Wed Apr 29 17:50:58 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Wed Apr 29 17:50:58 2015 -0700

--
 .../app/controllers/main/service/info/summary.js  | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5f95f11b/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 9223cc0..df49e8c 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -420,7 +420,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 iconPath: /img/widget- + widgetType.toLowerCase() + .png,
 serviceName: 
JSON.parse(widget.WidgetInfo.metrics).mapProperty('service_name').uniq().join('-'),
 added: addedWidgetsNames.contains(widgetName),
-isShared: false
+isShared: widget.WidgetInfo.scope == CLUSTER
   });
 })
   );
@@ -634,7 +634,17 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   if (this.get('parentView.isShowMineOnly')) {
 return this.get('controller.mineWidgets');
   } else {
-return 
this.get('controller.mineWidgets').concat(this.get('controller.allSharedWidgets'));
+// merge my widgets and all shared widgets, no duplicated is 
allowed
+var content = [];
+var widgetMap = {};
+var allWidgets = 
this.get('controller.allSharedWidgets').concat(this.get('controller.mineWidgets'));
+allWidgets.forEach(function(widget) {
+  if (!widgetMap[widget.get(id)]) {
+content.pushObject(widget);
+widgetMap[widget.get(id)] = true;
+  }
+});
+return content;
   }
 }.property('controller.allSharedWidgets.length', 
'controller.isAllSharedWidgetsLoaded',
   'controller.mineWidgets.length', 'controller.isMineWidgetsLoaded', 
'parentView.isShowMineOnly'),



ambari git commit: AMBARI-10856. Cloned widget should show in widget layout and widget browser. (jaimin)

2015-04-29 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk 97c524d96 - 89144ad4e


AMBARI-10856. Cloned widget should show in widget layout and widget browser. 
(jaimin)


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

Branch: refs/heads/trunk
Commit: 89144ad4e04223d46571d6f7e9124c35ee48c791
Parents: 97c524d
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Wed Apr 29 22:41:31 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Wed Apr 29 22:41:31 2015 -0700

--
 .../common-services/HDFS/2.1.0.2.0/widgets.json |  1 +
 .../controllers/main/service/info/summary.js| 20 +---
 .../app/mixins/common/widgets/widget_mixin.js   | 15 ++-
 3 files changed, 24 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89144ad4/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json
index 1ff75ec..5e910ae 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json
@@ -243,6 +243,7 @@
 {
   layout_name: default_hdfs_heatmap,
   section_name: HDFS_HEATMAPS,
+  display_name: HDFS Heatmaps,
   widgetLayoutInfo: [
 {
   widget_name: HDFS Bytes Read,

http://git-wip-us.apache.org/repos/asf/ambari/blob/89144ad4/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index df49e8c..22eae54 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -354,7 +354,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @param {object|null} data
*/
   loadAllSharedWidgetsSuccessCallback: function (data) {
-var addedWidgetsNames = this.get('widgets').mapProperty('widgetName');
+var widgetIds = this.get('widgets').mapProperty('id');
 if (data.items[0]  data.items.length) {
   this.set(allSharedWidgets,
 data.items.filter(function (widget) {
@@ -362,16 +362,17 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 }).map(function (widget) {
   var widgetType = widget.WidgetInfo.widget_type;
   var widgetName = widget.WidgetInfo.widget_name;
+  var widgetId =  widget.WidgetInfo.id;
   return Em.Object.create({
-id: widget.WidgetInfo.id,
+id: widgetId,
 widgetName: widgetName,
 displayName: widget.WidgetInfo.display_name,
 description: widget.WidgetInfo.description,
 widgetType: widgetType,
 iconPath: /img/widget- + widgetType.toLowerCase() + .png,
 serviceName: 
JSON.parse(widget.WidgetInfo.metrics).mapProperty('service_name').uniq().join('-'),
-added: addedWidgetsNames.contains(widgetName),
-isShared: true
+added: widgetIds.contains(widgetId),
+isShared: widget.WidgetInfo.scope == CLUSTER
   });
 })
   );
@@ -403,7 +404,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* @param {object|null} data
*/
   loadMineWidgetsSuccessCallback: function (data) {
-var addedWidgetsNames = this.get('widgets').mapProperty('widgetName');
+var widgetIds = this.get('widgets').mapProperty('id');
 if (data.items[0]  data.items.length) {
   this.set(mineWidgets,
 data.items.filter(function (widget) {
@@ -411,6 +412,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 }).map(function (widget) {
   var widgetType = widget.WidgetInfo.widget_type;
   var widgetName = widget.WidgetInfo.widget_name;
+  var widgetId =  widget.WidgetInfo.id;
   return Em.Object.create({
 id: widget.WidgetInfo.id,
 widgetName: widgetName,
@@ -419,7 +421,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 widgetType: widgetType,
 iconPath: /img/widget- + widgetType.toLowerCase() + .png,
 serviceName: 

[2/2] ambari git commit: AMBARI-10816 - Expose Customizable Parameters For SCRIPT Alerts (jonathanhurley)

2015-04-29 Thread jonathanhurley
AMBARI-10816 - Expose Customizable Parameters For SCRIPT Alerts (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 6727c1dc8c32abbc4ea1a7e3c9652707bb4fd23d
Parents: bc55f2d
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Wed Apr 29 11:51:57 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Wed Apr 29 11:52:04 2015 -0400

--
 .../python/ambari_agent/alerts/script_alert.py  |  22 ++-
 .../src/test/python/ambari_agent/TestAlerts.py  |  55 ++
 .../ambari_agent/dummy_files/test_script.py |  19 +-
 .../ambari/server/state/alert/ScriptSource.java | 197 ++-
 ambari-server/src/main/resources/alerts.json|  31 ++-
 .../alerts/alert_ambari_metrics_monitor.py  |  13 +-
 .../common-services/FLUME/1.4.0.2.0/alerts.json |  11 +-
 .../package/alerts/alert_flume_agent_status.py  |  23 ++-
 .../common-services/HDFS/2.1.0.2.0/alerts.json  |  44 -
 .../package/alerts/alert_checkpoint_time.py |  68 ---
 .../package/alerts/alert_ha_namenode_health.py  |  36 ++--
 .../common-services/HIVE/0.12.0.2.0/alerts.json |  63 +-
 .../package/alerts/alert_hive_metastore.py  |  66 ---
 .../package/alerts/alert_hive_thrift_port.py|  81 +---
 .../package/alerts/alert_webhcat_server.py  |  49 +++--
 .../package/alerts/alert_check_oozie_server.py  |  35 ++--
 .../alerts/check_supervisor_process_win.py  |   5 +-
 .../common-services/YARN/2.1.0.2.0/alerts.json  |  26 ++-
 .../package/alerts/alert_nodemanager_health.py  |  33 ++--
 .../alerts/alert_nodemanagers_summary.py|  38 ++--
 .../resources/host_scripts/alert_disk_space.py  |  55 --
 .../BIGTOP/0.8/services/FLUME/alerts.json   |  11 +-
 .../package/files/alert_flume_agent_status.py   |  25 ++-
 .../stacks/BIGTOP/0.8/services/HDFS/alerts.json |  44 -
 .../HDFS/package/files/alert_checkpoint_time.py |  68 ---
 .../package/files/alert_ha_namenode_health.py   |  40 ++--
 .../package/files/alert_hive_thrift_port.py |  82 +---
 .../package/files/alert_check_oozie_server.py   | 130 +++-
 .../package/files/alert_webhcat_server.py   |  49 +++--
 .../stacks/BIGTOP/0.8/services/YARN/alerts.json |  13 +-
 .../package/files/alert_nodemanager_health.py   |  37 ++--
 31 files changed, 1096 insertions(+), 373 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6727c1dc/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py 
b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
index d79e0a7..b8b4daf 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py
@@ -46,6 +46,7 @@ class ScriptAlert(BaseAlert):
 self.common_services_dir = None
 self.host_scripts_dir = None
 self.path_to_script = None
+self.parameters = {}
 
 if 'path' in alert_source_meta:
   self.path = alert_source_meta['path']
@@ -59,11 +60,24 @@ class ScriptAlert(BaseAlert):
 if 'host_scripts_directory' in alert_source_meta:
   self.host_scripts_dir = alert_source_meta['host_scripts_directory']
 
+# convert a list of script parameters, like timeouts, into a dictionary
+# so the the scripts can easily lookup the data
+if 'parameters' in alert_source_meta:
+  parameters = alert_source_meta['parameters']
+  for parameter in parameters:
+if 'name' not in parameter or 'value' not in parameter:
+  continue
+
+# create the dictionary value
+parameter_name = parameter['name']
+parameter_value = parameter['value']
+self.parameters[parameter_name] = parameter_value
+
   def _collect(self):
 cmd_module = self._load_source()
 
 if cmd_module is not None:
-  parameters = {}
+  configurations = {}
 
   try:
 tokens = cmd_module.get_tokens()
@@ -73,7 +87,7 @@ class ScriptAlert(BaseAlert):
   for token in tokens:
 value = self._get_configuration_value(token)
 if value is not None:
-  parameters[token] = value
+  configurations[token] = value
   except AttributeError:
 # it's OK if the module doesn't have get_tokens() ; no tokens will
 # be passed in so hopefully the script doesn't need any
@@ -85,9 +99,9 @@ class ScriptAlert(BaseAlert):
   if matchObj:
 basedir = matchObj.group(1)
 with Environment(basedir, 

ambari git commit: AMBARI-10830 Create/Edit widget wizard: Preview section should show real data. (atkach)

2015-04-29 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk de06e8e08 - bc55f2d4e


AMBARI-10830 Create/Edit widget wizard: Preview section should show real data. 
(atkach)


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

Branch: refs/heads/trunk
Commit: bc55f2d4e76bedeb79db44199fbf3e588329699c
Parents: de06e8e
Author: Andrii Tkach atk...@hortonworks.com
Authored: Wed Apr 29 15:55:11 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Wed Apr 29 15:55:11 2015 +0300

--
 .../app/mixins/common/widgets/widget_mixin.js   | 27 ++--
 .../views/common/widget/gauge_widget_view.js|  4 +--
 .../main/service/widgets/create/wizard_view.js  | 27 +++-
 3 files changed, 20 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc55f2d4/ambari-web/app/mixins/common/widgets/widget_mixin.js
--
diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js 
b/ambari-web/app/mixins/common/widgets/widget_mixin.js
index 3a4d8f8..c9b2614 100644
--- a/ambari-web/app/mixins/common/widgets/widget_mixin.js
+++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js
@@ -510,26 +510,27 @@ App.WidgetPreviewMixin = Ember.Mixin.create({
   isLoaded: true,
   metrics: [],
   content: Em.Object.create({
-widgetName: 'mock-widget',
+id: 1,
 values: []
   }),
   drawWidget: function () {
-this.loadMetrics();
 this.get('content').setProperties({
   'values': this.get('controller.widgetValues'),
   'properties': this.get('controller.widgetProperties'),
-  'displayName': this.get('controller.widgetName')
+  'widgetName': this.get('controller.widgetName'),
+  'metrics': this.get('controller.widgetMetrics').map(function (metric) {
+return {
+  name: metric.name,
+  service_name: metric.serviceName,
+  component_name: metric.componentName,
+  metric_path: metric.metricPath,
+  host_component_criteria: metric.hostComponentCriteria,
+  category: metric.category
+}
+  })
 });
+this.loadMetrics();
 this._super();
   }.observes('controller.widgetProperties', 'controller.widgetValues', 
'controller.widgetMetrics', 'controller.widgetName'),
-  loadMetrics: function () {
-var metrics = [];
-this.get('controller.widgetMetrics').forEach(function (metric) {
-  metrics.push({
-name: metric.name,
-data: this.get('MOCK_VALUE')
-  });
-}, this);
-this.set('metrics', metrics);
-  }
+  onMetricsLoaded: Em.K
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc55f2d4/ambari-web/app/views/common/widget/gauge_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/gauge_widget_view.js 
b/ambari-web/app/views/common/widget/gauge_widget_view.js
index 3e951cb..4ce8ebb 100644
--- a/ambari-web/app/views/common/widget/gauge_widget_view.js
+++ b/ambari-web/app/views/common/widget/gauge_widget_view.js
@@ -59,8 +59,8 @@ App.GaugeWidgetView = Em.View.extend(App.WidgetMixin, {
 }.property('parentView.content.properties.error_threshold'),
 
 id: function() {
-  return this.get('parentView.content.widgetName');
-}.property('parentView.content.widgetName'),
+  return 'gauge-widget-' + this.get('parentView.content.id');
+}.property('parentView.content.id'),
 
 existCenterText: true,
 centerTextColor: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc55f2d4/ambari-web/app/views/main/service/widgets/create/wizard_view.js
--
diff --git a/ambari-web/app/views/main/service/widgets/create/wizard_view.js 
b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
index 7741697..e39d494 100644
--- a/ambari-web/app/views/main/service/widgets/create/wizard_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
@@ -28,32 +28,13 @@ App.WidgetWizardView = Em.View.extend(App.WizardMenuMixin, {
   previewWidgetClass: function () {
 switch (this.get('controller.content.widgetType')) {
   case 'GRAPH':
-return App.GraphWidgetView.extend(App.WidgetPreviewMixin, {
-  MOCK_VALUE: function () {
-var nowTime = App.dateTime();
-var mock = [];
-
-for (var i = 0; i  240; i++) {
-  mock.push([
-1,
-(nowTime + (15 * i))
-  ])
-}
-return mock;
-