ambari git commit: AMBARI-11019 AMS config warning message is confusing. (atkach)

2015-05-08 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk f8d75a608 - 684ffd294


AMBARI-11019 AMS config warning message is confusing. (atkach)


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

Branch: refs/heads/trunk
Commit: 684ffd294ded1375b0212b54907f74b27a45ab4e
Parents: f8d75a6
Author: Andrii Tkach atk...@hortonworks.com
Authored: Fri May 8 13:47:33 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Fri May 8 13:47:33 2015 +0300

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 43 +---
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/mixins/common/serverValidator.js | 11 +++--
 .../config_recommendation_popup.hbs | 16 +---
 4 files changed, 48 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/684ffd29/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 c67c39d..e27236f 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
@@ -340,9 +340,37 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   print(Recommendations: %s\n\n % 
str(siteRecommendations))
   resultItems = method(siteProperties, siteRecommendations, 
configurations, services, hosts)
   items.extend(resultItems)
+clusterWideItems = self.validateClusterConfigurations(configurations, 
services, hosts)
+items.extend(clusterWideItems)
 self.validateMinMax(items, recommendedDefaults, configurations)
 return items
 
+  def validateClusterConfigurations(self, configurations, services, hosts):
+validationItems = []
+hostComponents = {}
+failureMessage = 
+
+for service in services[services]:
+  for component in service[components]:
+if component[StackServiceComponents][hostnames] is not None:
+  for hostName in component[StackServiceComponents][hostnames]:
+if hostName not in hostComponents.keys():
+  hostComponents[hostName] = []
+
hostComponents[hostName].append(component[StackServiceComponents][component_name])
+
+for host in hosts[items]:
+  # Not enough physical memory
+  requiredMemory = 
getMemorySizeRequired(hostComponents[host[Hosts][host_name]], 
configurations)
+  if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
+failureMessage += Not enough physical RAM on the host {0}.  \
+  At least {1} MB is recommended based on components 
assigned.\n \
+  .format(host[Hosts][host_name], requiredMemory/1048576)  # MB
+if failureMessage:
+  notEnoughMemoryItem = self.getWarnItem(failureMessage)
+  validationItems.extend([{config-name: , item: 
notEnoughMemoryItem}])
+
+return self.toConfigurationValidationProblems(validationItems, )
+
   def getServiceConfigurationValidators(self):
 return {
   HDFS: {hadoop-env: self.validateHDFSConfigurationsEnv},
@@ -447,16 +475,12 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 masterHostItem = None
 
 if masterItem is None:
-  hostComponents = {}
   hostMasterComponents = {}
 
   for service in services[services]:
 for component in service[components]:
   if component[StackServiceComponents][hostnames] is not None:
 for hostName in component[StackServiceComponents][hostnames]:
-  if hostName not in hostComponents.keys():
-hostComponents[hostName] = []
-  
hostComponents[hostName].append(component[StackServiceComponents][component_name])
   if self.isMasterComponent(component):
 if hostName not in hostMasterComponents.keys():
   hostMasterComponents[hostName] = []
@@ -478,17 +502,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   masterHostItem = self.getWarnItem(
 masterHostMessage.format(
   collectorHostName, str(, 
.join(hostMasterComponents[collectorHostName]
-
-# Not enough physical memory
-requiredMemory = 
getMemorySizeRequired(hostComponents[collectorHostName], configurations)
-if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
-  message = Not enough total RAM on the host {0},  \
-

ambari git commit: AMBARI-11015 JS error after Host configs page reload. (ababiichuk)

2015-05-08 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 8c3d2acd4 - f8d75a608


AMBARI-11015 JS error after Host configs page reload. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: f8d75a60870d1942d85f1ed1d3d2e393b681a7d8
Parents: 8c3d2ac
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Fri May 8 12:16:54 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Fri May 8 12:16:54 2015 +0300

--
 .../controllers/global/cluster_controller.js| 34 ++--
 1 file changed, 17 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d75a60/ambari-web/app/controllers/global/cluster_controller.js
--
diff --git a/ambari-web/app/controllers/global/cluster_controller.js 
b/ambari-web/app/controllers/global/cluster_controller.js
index 954f155..1c064c8 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -283,24 +283,24 @@ App.ClusterController = Em.Controller.extend({
 });
 
 updater.updateServiceMetric(function () {
-  
App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName'));
-
-  updater.updateComponentConfig(function () {
-self.updateLoadStatus('componentConfigs');
-  });
+  
App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function()
 {
+updater.updateComponentConfig(function () {
+  self.updateLoadStatus('componentConfigs');
+});
 
-  updater.updateComponentsState(function () {
-self.updateLoadStatus('componentsState');
-  });
-  self.updateLoadStatus('serviceMetrics');
-
-  updater.updateAlertGroups(function () {
-updater.updateAlertDefinitions(function() {
-  updater.updateAlertDefinitionSummary(function () {
-updater.updateUnhealthyAlertInstances(function () {
-  self.updateLoadStatus('alertGroups');
-  self.updateLoadStatus('alertDefinitions');
-  self.updateLoadStatus('alertInstancesUnhealthy');
+updater.updateComponentsState(function () {
+  self.updateLoadStatus('componentsState');
+});
+self.updateLoadStatus('serviceMetrics');
+
+updater.updateAlertGroups(function () {
+  updater.updateAlertDefinitions(function() {
+updater.updateAlertDefinitionSummary(function () {
+  updater.updateUnhealthyAlertInstances(function () {
+self.updateLoadStatus('alertGroups');
+self.updateLoadStatus('alertDefinitions');
+self.updateLoadStatus('alertInstancesUnhealthy');
+  });
 });
   });
 });



ambari git commit: AMBARI-11021. 'Set Recommended Value' is active for parent config while override is active (onechiporenko)

2015-05-08 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 684ffd294 - 2a09dfeeb


AMBARI-11021. 'Set Recommended Value' is active for parent config while 
override is active (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 2a09dfeebf271a462a955f25c0ff42618be21462
Parents: 684ffd2
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri May 8 14:12:36 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri May 8 14:14:50 2015 +0300

--
 .../main/service/configs/config_overridable.js   |  1 +
 .../common/configs/service_config_category.hbs   | 14 --
 .../templates/common/configs/widgets/controls.hbs| 12 +++-
 .../common/configs/widgets/config_widget_view.js | 15 +++
 4 files changed, 27 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a09dfee/ambari-web/app/mixins/main/service/configs/config_overridable.js
--
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js 
b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 5012c5b..57910f4 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -30,6 +30,7 @@ App.ConfigOverridable = Em.Mixin.create({
* @method createOverrideProperty
*/
   createOverrideProperty: function (event) {
+$('.tooltip').remove();
 var serviceConfigProperty = event.contexts[0];
 var serviceConfigController = this.get('isView') ? this.get('controller') 
: this;
 var selectedConfigGroup = 
serviceConfigController.get('selectedConfigGroup');

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a09dfee/ambari-web/app/templates/common/configs/service_config_category.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_category.hbs 
b/ambari-web/app/templates/common/configs/service_config_category.hbs
index e879871..fbc5c2a 100644
--- a/ambari-web/app/templates/common/configs/service_config_category.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_category.hbs
@@ -116,12 +116,14 @@
   /a
 {{/if}}
   {{/unless}}
-  {{#if recommendedValueExists}}
-a class=btn btn-small href=# data-toggle=tooltip
-  {{action setRecommendedValue this target=view}}
-  {{translateAttr 
data-original-title=services.service.config.setRecommendedValue}}
-  i class=icon-repeat/i
-/a
+  {{#if isEditable}}
+{{#if recommendedValueExists}}
+  a class=btn btn-small href=# data-toggle=tooltip
+{{action setRecommendedValue this target=view}}
+{{translateAttr 
data-original-title=services.service.config.setRecommendedValue}}
+i class=icon-repeat/i
+  /a
+{{/if}}
   {{/if}}
 {{/if}}
 span class=help-inline{{errorMessage}}/span

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a09dfee/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs 
b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index b7541c8..7ad07ac 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -42,11 +42,13 @@
  data-toggle=tooltip {{translateAttr 
data-original-title=config.infoMessage.wrong.value.for.widget}}/i
 {{/if}}
   {{/if}}
-  {{#if config.recommendedValueExists}}
-a href=#
-  {{bindAttr class=:icon-repeat :widget-action-set-recommended 
view.isHover::hide :widget-action}}
-  {{action setRecommendedValue target=view}} data-toggle=tooltip 
{{translateAttr 
data-original-title=services.service.config.setRecommendedValue}}
-/a
+  {{#if view.config.recommendedValueExists}}
+{{#unless view.disabled}}
+  a href=#
+{{bindAttr class=:icon-repeat :widget-action-set-recommended 
view.isHover::hide :widget-action}}
+{{action setRecommendedValue target=view}} 
data-toggle=tooltip 

ambari git commit: AMBARI-11019 AMS config warning message is confusing. (atkach)

2015-05-08 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 f35e06fe2 - 0af759d99


AMBARI-11019 AMS config warning message is confusing. (atkach)


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

Branch: refs/heads/branch-2.0.0
Commit: 0af759d99bc9941faeffa16b8d85a3a4c4ebd0cd
Parents: f35e06f
Author: Andrii Tkach atk...@hortonworks.com
Authored: Fri May 8 14:20:55 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Fri May 8 14:20:55 2015 +0300

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 44 +---
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/mixins/common/serverValidator.js | 11 +++--
 .../configs/config_recommendation_popup.hbs | 16 ---
 4 files changed, 48 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0af759d9/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 5e42b50..ce90bc9 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
@@ -272,8 +272,36 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 if siteProperties is not None:
   resultItems = method(siteProperties, 
recommendedDefaults[siteName][properties], configurations, services, hosts)
   items.extend(resultItems)
+clusterWideItems = self.validateClusterConfigurations(configurations, 
services, hosts)
+items.extend(clusterWideItems)
 return items
 
+  def validateClusterConfigurations(self, configurations, services, hosts):
+validationItems = []
+hostComponents = {}
+failureMessage = 
+
+for service in services[services]:
+  for component in service[components]:
+if component[StackServiceComponents][hostnames] is not None:
+  for hostName in component[StackServiceComponents][hostnames]:
+if hostName not in hostComponents.keys():
+  hostComponents[hostName] = []
+
hostComponents[hostName].append(component[StackServiceComponents][component_name])
+
+for host in hosts[items]:
+  # Not enough physical memory
+  requiredMemory = 
getMemorySizeRequired(hostComponents[host[Hosts][host_name]], 
configurations)
+  if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
+failureMessage += Not enough physical RAM on the host {0}.  \
+  At least {1} MB is recommended based on components 
assigned.\n \
+  .format(host[Hosts][host_name], requiredMemory/1048576)  # MB
+if failureMessage:
+  notEnoughMemoryItem = self.getWarnItem(failureMessage)
+  validationItems.extend([{config-name: , item: 
notEnoughMemoryItem}])
+
+return self.toConfigurationValidationProblems(validationItems, )
+
   def getServiceConfigurationValidators(self):
 return {
   HDFS: {hadoop-env: self.validateHDFSConfigurationsEnv},
@@ -349,16 +377,12 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 masterHostItem = None
 
 if masterItem is None:
-  hostComponents = {}
   hostMasterComponents = {}
 
   for service in services[services]:
 for component in service[components]:
   if component[StackServiceComponents][hostnames] is not None:
 for hostName in component[StackServiceComponents][hostnames]:
-  if hostName not in hostComponents.keys():
-hostComponents[hostName] = []
-  
hostComponents[hostName].append(component[StackServiceComponents][component_name])
   if self.isMasterComponent(component):
 if hostName not in hostMasterComponents.keys():
   hostMasterComponents[hostName] = []
@@ -381,18 +405,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 masterHostMessage.format(
   collectorHostName, str(, 
.join(hostMasterComponents[collectorHostName]
 
-# No enough physical memory
-# TODO Add AMBARI_METRICS Collector Xmx property to ams-env
-requiredMemory = 
getMemorySizeRequired(hostComponents[collectorHostName], configurations)
-if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
-  message = No enough total RAM on the host {0},  \
-at least {1} MB required for the 

ambari git commit: AMBARI-11013. HDFS Upgrade Pack For HDP-2.2 to HDP-2.3 (ncole)

2015-05-08 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk 8de5bf38f - 258837693


AMBARI-11013. HDFS Upgrade Pack For HDP-2.2 to HDP-2.3 (ncole)


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

Branch: refs/heads/trunk
Commit: 258837693cd70b57bb26adf6f8db92decbd03986
Parents: 8de5bf3
Author: Nate Cole nc...@hortonworks.com
Authored: Fri May 8 07:44:24 2015 -0400
Committer: Nate Cole nc...@hortonworks.com
Committed: Fri May 8 10:42:35 2015 -0400

--
 .../libraries/functions/conf_select.py  |  35 ++-
 .../ambari/server/checks/CheckDescription.java  |   7 ++
 .../checks/ServicesNamenodeTruncateCheck.java   |  80 +++
 .../1.6.1.2.2.0/package/scripts/params.py   |   3 +-
 .../0.1.0/package/scripts/params_linux.py   |   3 +-
 .../0.5.0.2.1/package/scripts/status_params.py  |   5 +-
 .../0.96.0.2.0/package/scripts/params_linux.py  |   4 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   9 +-
 .../2.1.0.2.0/package/scripts/status_params.py  |   8 +-
 .../0.12.0.2.0/package/scripts/status_params.py |   4 +-
 .../MAHOUT/1.0.0.2.3/package/scripts/params.py  |   3 +-
 .../4.0.0.2.0/package/scripts/params_linux.py   |   7 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |   4 +-
 .../SLIDER/0.60.0.2.2/package/scripts/params.py |   3 +-
 .../SPARK/1.2.0.2.2/package/scripts/params.py   |   4 +-
 .../0.4.0.2.1/package/scripts/params_linux.py   |   4 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   7 +-
 .../2.1.0.2.0/package/scripts/status_params.py  |  11 +-
 .../2.0.6/hooks/before-ANY/scripts/params.py|   8 +-
 .../2.0.6/hooks/before-START/scripts/params.py  |   9 +-
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |   9 ++
 .../ServicesNamenodeTruncateCheckTest.java  | 102 +++
 .../stacks/2.3/MAHOUT/test_mahout_client.py |  21 +++-
 23 files changed, 289 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/25883769/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index f137a19..45888d7 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -22,6 +22,7 @@ __all__ = [select, create]
 
 import version
 from resource_management.core import shell
+from resource_management.libraries.script.script import Script
 
 TEMPLATE = conf-select {0} --package {1} --stack-version {2} --conf-version 0
 
@@ -45,8 +46,7 @@ def create(stack_name, package, version):
   if not _valid(stack_name, package, version):
 return
 
-  shell.call(TEMPLATE.format(create-conf-dir, package, version))
-
+  shell.call(TEMPLATE.format(create-conf-dir, package, version), 
logoutput=False, quiet=True)
 
 def select(stack_name, package, version, try_create=True):
   
@@ -64,5 +64,34 @@ def select(stack_name, package, version, try_create=True):
   if try_create:
 create(stack_name, package, version)
 
-  shell.call(TEMPLATE.format(set-conf-dir, package, version), logoutput=True)
+  shell.call(TEMPLATE.format(set-conf-dir, package, version), 
logoutput=False, quiet=False)
+
+def get_hadoop_conf_dir():
+  
+  Gets the shared hadoop conf directory using:
+  1.  Start with /etc/hadoop/conf
+  2.  When the stack is greater than HDP-2.2, use 
/usr/hdp/current/hadoop-client/conf
+  3.  Only when doing a RU and HDP-2.3 or higher, use the value as computed
+  by conf-select.  This is in the form /usr/hdp/VERSION/hadoop/conf to 
make sure
+  the configs are written in the correct place
+  
+
+  config = Script.get_config()
+  hadoop_conf_dir = /etc/hadoop/conf
+
+  if Script.is_hdp_stack_greater_or_equal(2.2):
+from resource_management.libraries.functions.default import default
+
+hadoop_conf_dir = /usr/hdp/current/hadoop-client/conf
+
+direction = default(/commandParams/upgrade_direction, None)
+ver = default(/commandParams/version, None)
+stack_name = default(/hostLevelParams/stack_name, None)
+
+if direction and ver and stack_name and 
Script.is_hdp_stack_greater_or_equal(2.3):
+  select(stack_name, hadoop, ver)
+  hadoop_conf_dir = /usr/hdp/{0}/hadoop/conf.format(ver)
+
+  return hadoop_conf_dir
 
+


ambari git commit: AMBARI-11017. Kerberos service check is named Create principals (rlevas)

2015-05-08 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk ec9684763 - 8de5bf38f


AMBARI-11017. Kerberos service check is named Create principals (rlevas)


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

Branch: refs/heads/trunk
Commit: 8de5bf38f1c56f3661b63064b422bed4c359bd49
Parents: ec96847
Author: Robert Levas rle...@hortonworks.com
Authored: Fri May 8 10:26:59 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Fri May 8 10:26:59 2015 -0400

--
 .../AmbariManagementControllerImpl.java |  5 +
 .../kerberos/MITKerberosOperationHandler.java   |  3 ++-
 .../AmbariManagementControllerTest.java | 23 +++-
 3 files changed, 29 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8de5bf38/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 7b77bfa..ccf1705 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -3119,6 +3119,11 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 ExecuteCommandJson jsons = 
customCommandExecutionHelper.getCommandJson(actionExecContext, cluster);
 String commandParamsForStage = jsons.getCommandParamsForStage();
 
+// Ensure that the specified requestContext (if any) is set as the request 
context
+if (!requestContext.isEmpty()) {
+  requestStageContainer.setRequestContext(requestContext);
+}
+
 // If the request is to perform the Kerberos service check, set up the 
stages to
 // ensure that the (cluster-level) smoke user principal and keytab is 
available on all hosts
 boolean kerberosServiceCheck = 
Role.KERBEROS_SERVICE_CHECK.name().equals(actionRequest.getCommandName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de5bf38/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java
index cd74c22..5614692 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java
@@ -179,7 +179,8 @@ public class MITKerberosOperationHandler extends 
KerberosOperationHandler {
   if ((stdOut != null)  stdOut.contains(String.format(Principal \%s\ 
created, principal))) {
 return getKeyNumber(principal);
   } else {
-throw new KerberosOperationException(String.format(Failed to create 
service principal for %s, principal));
+throw new KerberosOperationException(String.format(Failed to create 
service principal for %s\nSTDOUT: %s\nSTDERR: %s,
+principal, stdOut, result.getStderr()));
   }
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de5bf38/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index ebe0763..da61db2 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -2563,6 +2563,7 @@ public class AmbariManagementControllerTest {
 Assert.assertEquals(Role.HBASE_MASTER, command.getRole());
 Assert.assertEquals(RoleCommand.CUSTOM_COMMAND, command.getRoleCommand());
 Assert.assertEquals(DECOMMISSION, 
execCmd.getHostLevelParams().get(custom_command));
+assertEquals(requestProperties.get(REQUEST_CONTEXT_PROPERTY), 
response.getRequestContext());
 
 // RS stops
 

ambari git commit: AMBARI-11031. Widgets with same widgetName in different layout are not created.

2015-05-08 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk cf62f66a1 - 5c4e25e2b


AMBARI-11031. Widgets with same widgetName in different layout are not created.


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

Branch: refs/heads/trunk
Commit: 5c4e25e2b109c004bd2e85c038cf4aa04965c1e1
Parents: cf62f66
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri May 8 10:01:28 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri May 8 10:01:28 2015 -0700

--
 .../AmbariManagementControllerImpl.java  | 11 ---
 .../ambari/server/controller/WidgetResponse.java |  2 +-
 .../internal/WidgetResourceProvider.java |  6 --
 .../apache/ambari/server/orm/dao/WidgetDAO.java  |  3 ++-
 .../ambari/server/orm/entities/WidgetEntity.java | 19 ---
 .../server/state/stack/WidgetLayoutInfo.java | 14 +++---
 .../ambari/server/upgrade/UpgradeCatalog210.java |  2 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql   |  2 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql  |  2 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql |  2 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql  |  2 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql|  2 +-
 .../HBASE/0.96.0.2.0/widgets.json| 10 ++
 .../common-services/HDFS/2.1.0.2.0/widgets.json  |  4 ++--
 .../YARN/2.1.0.2.0/YARN_widgets.json |  9 ++---
 .../AmbariManagementControllerTest.java  |  1 +
 .../internal/WidgetResourceProviderTest.java | 13 +++--
 .../ambari/server/orm/dao/WidgetDAOTest.java |  8 +++-
 .../server/orm/dao/WidgetLayoutDAOTest.java  |  2 +-
 .../stacks/OTHER/2.0/services/HBASE/widgets.json |  8 +++-
 20 files changed, 69 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c4e25e2/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index ccf1705..bb8f088 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -4014,7 +4014,8 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   private WidgetEntity addIfNotExistsWidgetEntity(WidgetLayoutInfo layoutInfo, 
ClusterEntity clusterEntity,
   String user, long createTime) {
 ListWidgetEntity createdEntities =
-  widgetDAO.findByName(clusterEntity.getClusterId(), 
layoutInfo.getWidgetName(), user);
+  widgetDAO.findByName(clusterEntity.getClusterId(), 
layoutInfo.getWidgetName(),
+  user, layoutInfo.getDefaultSectionName());
 
 if (createdEntities == null || createdEntities.isEmpty()) {
   WidgetEntity widgetEntity = new WidgetEntity();
@@ -4022,7 +4023,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   widgetEntity.setClusterEntity(clusterEntity);
   widgetEntity.setScope(WidgetResourceProvider.SCOPE.CLUSTER.name());
   widgetEntity.setWidgetName(layoutInfo.getWidgetName());
-  widgetEntity.setDisplayName(layoutInfo.getDisplayName());
+  widgetEntity.setDefaultSectionName(layoutInfo.getDefaultSectionName());
   widgetEntity.setAuthor(user);
   widgetEntity.setDescription(layoutInfo.getDescription());
   widgetEntity.setTimeCreated(createTime);
@@ -4035,7 +4036,8 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 cluster =  + clusterEntity.getClusterName());
   widgetDAO.create(widgetEntity);
 
-  createdEntities = widgetDAO.findByName(clusterEntity.getClusterId(), 
layoutInfo.getWidgetName(), user);
+  createdEntities = widgetDAO.findByName(clusterEntity.getClusterId(), 
layoutInfo.getWidgetName(),
+  user, layoutInfo.getDefaultSectionName());
   if (createdEntities != null  !createdEntities.isEmpty()) {
 return createdEntities.iterator().next();
   }
@@ -4076,6 +4078,9 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   ListWidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntityList 
= new LinkedListWidgetLayoutUserWidgetEntity();
   int order = 0;
   for (WidgetLayoutInfo 

ambari git commit: AMBARI-11006 - YARN Upgrade Pack For HDP-2.2 To HDP-2.3 (part2) (jonathanhurley)

2015-05-08 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 5c4e25e2b - 41a41e64b


AMBARI-11006 - YARN Upgrade Pack For HDP-2.2 To HDP-2.3 (part2) (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 41a41e64b0bfe5c14479555c95dcab2680f25f1f
Parents: 5c4e25e
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Fri May 8 13:06:06 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Fri May 8 13:06:20 2015 -0400

--
 .../server/serveraction/upgrades/ConfigureAction.java   | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/41a41e64/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index c064ac4..5c17408 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
@@ -267,9 +267,14 @@ public class ConfigureAction extends AbstractServerAction {
   );
 }
   }
-}
 
-newValues.put(key, value);
+  // !!! only put a key/value into this map of new configurations if there
+  // was a key, otherwise this will put something like null=null into the
+  // configs which will cause NPEs after upgrade - this is a byproduct of
+  // the configure being able to take a list of transfers without a
+  // key/value to set
+  newValues.put(key, value);
+}
 
 // !!! check to see if we're going to a new stack and double check the
 // configs are for the target.  Then simply update the new properties 
instead



ambari git commit: AMBARI-11010. Aggregator function does not work for point in time service component metric query. (swagle)

2015-05-08 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 41a41e64b - c0da0a1d9


AMBARI-11010. Aggregator function does not work for point in time service 
component metric query. (swagle)


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

Branch: refs/heads/trunk
Commit: c0da0a1d9b295b2ac7f0ac5638b255852e816feb
Parents: 41a41e6
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri May 8 10:08:16 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri May 8 10:42:26 2015 -0700

--
 .../timeline/SingleValuedTimelineMetric.java| 107 +++
 .../metrics2/sink/timeline/TimelineMetrics.java |  26 +++
 .../timeline/HBaseTimelineMetricStore.java  |   3 +-
 .../metrics/timeline/PhoenixHBaseAccessor.java  | 191 +++
 .../TimelineMetricHostAggregator.java   |   9 +-
 .../aggregators/TimelineMetricReadHelper.java   |  29 ++-
 .../metrics/timeline/ITClusterAggregator.java   |   1 -
 .../metrics/timeline/ITMetricAggregator.java|  20 +-
 .../timeline/ITPhoenixHBaseAccessor.java|  52 -
 9 files changed, 292 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c0da0a1d/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/SingleValuedTimelineMetric.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/SingleValuedTimelineMetric.java
 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/SingleValuedTimelineMetric.java
new file mode 100644
index 000..8ecca54
--- /dev/null
+++ 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/SingleValuedTimelineMetric.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.hadoop.metrics2.sink.timeline;
+
+/**
+ * This class prevents creating a TreeMap for every instantiation of a metric
+ * read from the store. The methods are meant to provide interoperability
+ * with @TimelineMetric
+ */
+public class SingleValuedTimelineMetric {
+  private Long timestamp;
+  private Double value;
+  private String metricName;
+  private String appId;
+  private String instanceId;
+  private String hostName;
+  private Long startTime;
+  private String type;
+
+  public void setSingleTimeseriesValue(Long timestamp, Double value) {
+this.timestamp = timestamp;
+this.value = value;
+  }
+
+  public SingleValuedTimelineMetric(String metricName, String appId,
+String instanceId, String hostName,
+long timestamp, long startTime, String 
type) {
+this.metricName = metricName;
+this.appId = appId;
+this.instanceId = instanceId;
+this.hostName = hostName;
+this.timestamp = timestamp;
+this.startTime = startTime;
+this.type = type;
+  }
+
+  public Long getTimestamp() {
+return timestamp;
+  }
+
+  public long getStartTime() {
+return startTime;
+  }
+
+  public String getType() {
+return type;
+  }
+
+  public Double getValue() {
+return value;
+  }
+
+  public String getMetricName() {
+return metricName;
+  }
+
+  public String getAppId() {
+return appId;
+  }
+
+  public String getInstanceId() {
+return instanceId;
+  }
+
+  public String getHostName() {
+return hostName;
+  }
+
+  public boolean equalsExceptTime(TimelineMetric metric) {
+if (!metricName.equals(metric.getMetricName())) return false;
+if (hostName != null ? !hostName.equals(metric.getHostName()) : 
metric.getHostName() != null)
+  return false;
+if (appId != null ? !appId.equals(metric.getAppId()) : metric.getAppId() 
!= null)
+  return false;
+if (instanceId != null ? 

ambari git commit: AMBARI-11014. HBase theme should use configs 'hbase.regionserver.global.memstore.size' and 'hbase.hstore.compaction.max' (srimanth)

2015-05-08 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 258837693 - cf62f66a1


AMBARI-11014. HBase theme should use configs 
'hbase.regionserver.global.memstore.size' and 'hbase.hstore.compaction.max' 
(srimanth)


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

Branch: refs/heads/trunk
Commit: cf62f66a1cfd473dbdb4c05f2f2b188fcd74016a
Parents: 2588376
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri May 8 01:14:10 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri May 8 09:35:02 2015 -0700

--
 .../services/HBASE/configuration/hbase-site.xml | 56 
 .../HDP/2.2/services/HBASE/themes/theme.json|  8 +--
 .../stacks/HDP/2.2/services/stack_advisor.py|  6 +--
 .../stacks/2.2/common/test_stack_advisor.py |  2 +-
 4 files changed, 64 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cf62f66a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
index a8efde8..85e3557 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml
@@ -147,4 +147,60 @@
   /property
 /depends-on
   /property
+  property
+namehbase.hstore.compaction.max/name
+value10/value
+descriptionThe maximum number of StoreFiles which will be selected for a 
single minor
+  compaction, regardless of the number of eligible StoreFiles. 
Effectively, the value of
+  hbase.hstore.compaction.max controls the length of time it takes a 
single compaction to
+  complete. Setting it larger means that more StoreFiles are included in a 
compaction. For most
+  cases, the default value is appropriate.
+/description
+display-nameMaximum Files in a Store before Compaction/display-name
+value-attributes
+  typeint/type
+  entries
+entry
+  value8/value
+/entry
+entry
+  value9/value
+/entry
+entry
+  value10/value
+/entry
+entry
+  value11/value
+/entry
+entry
+  value12/value
+/entry
+entry
+  value13/value
+/entry
+entry
+  value14/value
+/entry
+entry
+  value15/value
+/entry
+  /entries
+/value-attributes
+  /property
+  property
+namehbase.regionserver.global.memstore.size/name
+value0.4/value
+descriptionPercentage of RegionServer memory to allocate to write 
buffers.
+  Each column family within each region is allocated a smaller pool (the 
memstore) within this shared write pool.
+  If this buffer is full, updates are blocked and data is flushed from 
memstores until a global low watermark
+  (hbase.regionserver.global.memstore.size.lower.limit) is reached.
+/description
+display-name% of RegionServer Allocated to Write Buffers/display-name
+value-attributes
+  typefloat/type
+  minimum0/minimum
+  maximum0.8/maximum
+  increment-step0.01/increment-step
+/value-attributes
+  /property
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/cf62f66a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
index dc2e5a8..53da86d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/themes/theme.json
@@ -170,7 +170,7 @@
   subsection-name: subsection-hbase-memory-col1
 },
 {
-  config: hbase-site/hbase.regionserver.global.memstore.upperLimit,
+  config: hbase-site/hbase.regionserver.global.memstore.size,
   subsection-name: subsection-hbase-memory-col1
 },
 {
@@ -202,7 +202,7 @@
   subsection-name: subsection-hbase-disk-col2
 },
 {
-  config: hbase-site/hbase.hstore.compactionThreshold,
+  config: hbase-site/hbase.hstore.compaction.max,
   

[3/3] ambari git commit: AMBARI-10997. Improve Error Handling - hive view (alexantonenko)

2015-05-08 Thread alexantonenko
AMBARI-10997. Improve Error Handling - hive view (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 642fd46cbf5d8e232007b487ceef0618aa2dd9e7
Parents: c0da0a1
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri May 8 13:23:32 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri May 8 21:02:37 2015 +0300

--
 contrib/views/hive/pom.xml  |   2 +-
 .../apache/ambari/view/hive/BaseService.java|   4 +-
 .../apache/ambari/view/hive/HelpService.java|   2 +-
 .../ambari/view/hive/client/Connection.java |   5 +-
 .../resources/PersonalCRUDResourceManager.java  |   9 +-
 .../resources/browser/HiveBrowserService.java   |   2 +-
 .../view/hive/resources/files/FileService.java  |   2 +-
 .../view/hive/resources/jobs/Aggregator.java|   4 +-
 .../resources/jobs/ConnectionController.java|   3 +-
 .../jobs/IOperationHandleResourceManager.java   |   6 +-
 .../resources/jobs/JobResourceProvider.java |   4 +-
 .../view/hive/resources/jobs/JobService.java|  32 +++-
 .../jobs/OperationHandleController.java |  31 ++--
 .../jobs/OperationHandleControllerFactory.java  |   4 +-
 .../jobs/OperationHandleResourceManager.java|  40 -
 .../hive/resources/jobs/ProgressRetriever.java  |  67 
 .../hive/resources/jobs/atsJobs/ATSParser.java  |  27 +++
 .../jobs/atsJobs/ATSRequestsDelegate.java   |   4 +
 .../jobs/atsJobs/ATSRequestsDelegateImpl.java   |  15 +-
 .../hive/resources/jobs/atsJobs/IATSParser.java |   2 +
 .../resources/jobs/atsJobs/TezVertexId.java |  24 +++
 .../view/hive/resources/jobs/rm/RMParser.java   |  88 ++
 .../hive/resources/jobs/rm/RMParserFactory.java |  39 +
 .../resources/jobs/rm/RMRequestsDelegate.java   |  31 
 .../jobs/rm/RMRequestsDelegateImpl.java |  99 +++
 .../resources/FileResourceResourceProvider.java |   4 +-
 .../resources/FileResourceService.java  |   2 +-
 .../SavedQueryResourceProvider.java |   4 +-
 .../savedQueries/SavedQueryService.java |   2 +-
 .../resources/udfs/UDFResourceProvider.java |   4 +-
 .../view/hive/resources/udfs/UDFService.java|   2 +-
 .../hive/utils/ServiceFormattedException.java   |  20 ++-
 .../view/hive/utils/SharedObjectsFactory.java   |  20 ++-
 .../src/main/resources/ui/hive-web/.gitignore   |   4 +-
 .../ui/hive-web/app/adapters/application.js |   2 +-
 .../app/components/alert-message-widget.js  |   2 +-
 .../app/components/collapsible-widget.js|   2 +-
 .../app/components/column-filter-widget.js  |   2 +-
 .../app/components/date-range-widget.js |  45 +++--
 .../hive-web/app/components/expander-widget.js  |   6 +
 .../ui/hive-web/app/components/modal-widget.js  |  12 +-
 .../ui/hive-web/app/components/notify-widget.js |   8 +-
 .../app/components/number-range-widget.js   |  42 +++--
 .../ui/hive-web/app/components/panel-widget.js  |   2 +-
 .../hive-web/app/components/popover-widget.js   |   5 +-
 .../hive-web/app/components/progress-widget.js  |  29 +---
 .../ui/hive-web/app/components/query-editor.js  |   6 +-
 .../ui/hive-web/app/components/query-tabs.js| 121 --
 .../hive-web/app/components/typeahead-widget.js |  19 ++-
 .../ui/hive-web/app/controllers/databases.js|  10 +-
 .../ui/hive-web/app/controllers/history.js  |  25 +++
 .../ui/hive-web/app/controllers/index.js|  95 ---
 .../controllers/index/history-query/explain.js  |   5 +-
 .../app/controllers/index/history-query/logs.js |  13 +-
 .../controllers/index/history-query/results.js  |   6 +-
 .../ui/hive-web/app/controllers/job-progress.js |  92 +++
 .../ui/hive-web/app/controllers/job.js  |   2 +-
 .../ui/hive-web/app/controllers/messages.js |  10 +-
 .../ui/hive-web/app/controllers/open-queries.js |   6 +-
 .../ui/hive-web/app/controllers/queries.js  |  20 ++-
 .../ui/hive-web/app/controllers/query-tabs.js   | 164 +++
 .../ui/hive-web/app/controllers/settings.js | 144 
 .../ui/hive-web/app/controllers/tez-ui.js   |  19 +--
 .../ui/hive-web/app/controllers/udfs.js |  17 ++
 .../hive-web/app/controllers/visual-explain.js  |  27 ++-
 .../ui/hive-web/app/helpers/all-uppercase.js|   4 +-
 .../ui/hive-web/app/helpers/code-helper.js  |   2 +-
 .../ui/hive-web/app/helpers/date-binding.js |   2 +-
 .../ui/hive-web/app/helpers/log-helper.js   |   2 +-
 .../ui/hive-web/app/helpers/path-binding.js |   2 +-
 .../hive-web/app/helpers/preformatted-string.js |   2 +-
 .../ui/hive-web/app/helpers/tb-helper.js|   2 +-
 .../ui/hive-web/app/initializers/i18n.js|  22 

[1/3] ambari git commit: AMBARI-10997. Improve Error Handling - hive view (alexantonenko)

2015-05-08 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk c0da0a1d9 - 642fd46cb


http://git-wip-us.apache.org/repos/asf/ambari/blob/642fd46c/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
index a831b8c..9cd9126 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/visual-explain.hbs
@@ -16,65 +16,72 @@
 * limitations under the License.
 }}
 
-div id=visual-explain
+div id=visual-explain class=index-overlay
   {{#panel-widget headingTranslation=titles.query.visualExplain}}
 
-  {{#each edge in view.edges}}
-div class=edge
-  div class=edge-path {{bind-attr style=edge.style}}
-{{edge.type}}
+  {{#unless json}}
+div class=spinner/div
+  {{/unless}}
+
+  div id=visual-explain-graph
+{{#each edge in view.edges}}
+  div class=edge
+div class=edge-path {{bind-attr style=edge.style}}
+  {{edge.type}}
+/div
+   {{!--  div class=edge-arrow /div --}}
   /div
- {{!--  div class=edge-arrow /div --}}
-/div
-  {{/each}}
+{{/each}}
 
-  div class=nodes
-{{#each group in view.verticesGroups}}
-  div class=node-container
-{{#if group.contents}}
-  {{#each node in group.contents}}
-div {{bind-attr class=node.isTableNode:table-node 
node.isOutputNode:output-node :node title=node.id}}
-  {{#if node.isTableNode}}
-pstrong{{t 'labels.table'}}/strong/p
-{{node.label}}
-  {{else}}
-{{#if node.isOutputNode}}
+div class=nodes
+  {{#each group in view.verticesGroups}}
+div class=node-container
+  {{#if group.contents}}
+{{#each node in group.contents}}
+  div {{bind-attr class=node.isTableNode:table-node 
node.isOutputNode:output-node :node title=node.id}}
+{{#if node.isTableNode}}
+  pstrong{{t 'labels.table'}}/strong/p
   {{node.label}}
 {{else}}
-  div class=node-heading
-strong{{node.label}}/strong
-  /div
-  div class=node-content
-{{#each section in node.contents}}
-  p
-{{#popover-widget classNames=fa fa-info-circle 
titleTranslation=popover.visualExplain.statistics }}
-  {{section.statistics}}
-{{/popover-widget}}
-strong
-  {{section.index}}. {{section.title}}
-/strong
-{{section.value}}
-  /p
+  {{#if node.isOutputNode}}
+{{node.label}}
+  {{else}}
+div class=node-heading
+  strong{{node.label}}/strong
+/div
+div class=node-content
+  {{#each section in node.contents}}
+p
+  {{#popover-widget classNames=fa fa-info-circle 
titleTranslation=popover.visualExplain.statistics }}
+{{section.statistics}}
+  {{/popover-widget}}
+  strong
+{{section.index}}. {{section.title}}
+  /strong
+  {{section.value}}
+/p
 
-  {{#each field in section.fields}}
-{{#if field.value}}
-  p{{field.label}} {{field.value}}/p
-{{/if}}
+{{#each field in section.fields}}
+  {{#if field.value}}
+p{{field.label}} {{field.value}}/p
+  {{/if}}
+{{/each}}
   {{/each}}
-{{/each}}
-  /div
+/div
+{{progress-widget value=node.progress}}
+  {{/if}}
 {{/if}}
-  {{/if}}
+  /div
+{{/each}}
+  {{else}}
+div class=node {{bind-attr title=group.label}}
+  {{group.label}}
 /div
-  {{/each}}
-{{else}}
-  div class=node {{bind-attr title=group.label}}
-{{group.label}}
-  /div
-{{/if}}
-  /div
-{{/each}}
+  {{/if}}
+/div
+  {{/each}}
+/div
   /div
 
   {{/panel-widget}}
-/div
\ No newline at end of file
+/div


[2/3] ambari git commit: AMBARI-10997. Improve Error Handling - hive view (alexantonenko)

2015-05-08 Thread alexantonenko
http://git-wip-us.apache.org/repos/asf/ambari/blob/642fd46c/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-editor.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-editor.js
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-editor.js
index 01ba37e..f119fc8 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-editor.js
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-editor.js
@@ -87,14 +87,14 @@ export default Ember.Component.extend({
 
 editor = this.get('editor');
 
-editor.on('cursorActivity', function() {
+editor.on('cursorActivity', function () {
   self.set('highlightedText', editor.getSelections());
 });
 
 editor.setValue(this.get('query') || '');
 
 editor.on('change', function (instance) {
-  Ember.run(function() {
+  Ember.run(function () {
 self.set('query', instance.getValue());
   });
 });
@@ -110,7 +110,7 @@ export default Ember.Component.extend({
 this.tablesChanged();
   }.on('didInsertElement'),
 
-  updateValue: function() {
+  updateValue: function () {
 var query = this.get('query');
 var editor = this.get('editor');
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/642fd46c/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-tabs.js
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-tabs.js
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-tabs.js
deleted file mode 100644
index 0ef6768..000
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/components/query-tabs.js
+++ /dev/null
@@ -1,121 +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.
- */
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-  tabClassNames : fa queries-icon query-context-tab,
-  openOverlayAction   : 'openOverlay',
-  closeOverlayAction  : 'closeOverlay',
-
-  tabs: [
-Ember.Object.create({
-  iconClass: 'fa-code',
-  action: 'setDefaultActive'
-}),
-Ember.Object.create({
-  iconClass: 'fa-gear',
-  action: 'toggleOverlay',
-  template: 'settings',
-  outlet: 'overlay',
-  into: 'open-queries'
-}),
-Ember.Object.create({
-  iconClass: 'fa-bar-chart',
-  action: 'toggleOverlay',
-  template: 'visual-explain',
-  outlet: 'overlay',
-  into: 'index'
-}),
-Ember.Object.create({
-  iconClass: 'text-icon',
-  text: 'TEZ',
-  action: 'toggleOverlay',
-  template: 'tez-ui',
-  outlet: 'overlay',
-  into: 'index'
-}),
-Ember.Object.create({
-  iconClass: 'fa-envelope',
-  action: 'toggleOverlay',
-  template: 'messages',
-  outlet: 'overlay',
-  into: 'open-queries',
-  badgeProperty: 'count'
-})
-  ],
-
-  setDefaultTab: function() {
-var defaultTab = this.get('tabs.firstObject');
-
-defaultTab.set('active', true);
-this.set('default', defaultTab);
-this.set('active', defaultTab);
-  }.on('init'),
-
-  setupTabsBadges: function() {
-var tabs = this.get('tabs');
-var self = this;
-
-tabs.map(function(tab) {
-  if (tab.get('badgeProperty')) {
-var controller = self.container.lookup('controller:' + 
tab.get('template'));
-tab.set('controller', controller);
-
-Ember.oneWay(tab, 'badge', 'controller.count');
-  }
-});
-  }.on('init'),
-
-  closeActiveOverlay: function() {
-this.sendAction('closeOverlayAction', this.get('active'));
-  },
-
-  openOverlay: function(tab) {
-this.closeActiveOverlay();
-this.set('active.active', false);
-tab.set('active', true);
-this.set('active', tab);
-this.sendAction('openOverlayAction', tab);
-  },
-
-  setDefaultActive: function() {
-var active = this.get('active');
-var defaultTab = this.get('default');
-
-if (active !== defaultTab) {
-  this.closeActiveOverlay();
-  defaultTab.set('active', true);
-  active.set('active', 

ambari git commit: AMBARI-10948. Misc UI adjustments in enhanced config compare view (Richard Zang via srimanth)

2015-05-08 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 41bdc34d5 - 92da024a5


AMBARI-10948. Misc UI adjustments in enhanced config compare view (Richard Zang 
via srimanth)


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

Branch: refs/heads/trunk
Commit: 92da024a53d5f608a116e0da54897561567d45bb
Parents: 41bdc34
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri May 8 12:41:14 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri May 8 12:41:19 2015 -0700

--
 ambari-web/app/styles/application.less   |  6 ++
 ambari-web/app/styles/config_history_flow.less   |  7 ++-
 ambari-web/app/styles/widgets.less   | 15 +++
 .../templates/common/configs/config_history_flow.hbs |  2 +-
 .../templates/common/configs/service_version_box.hbs |  4 +---
 .../widgets/comparison/config_widget_comparison.hbs  |  3 ++-
 .../templates/common/configs/widgets/controls.hbs|  7 +++
 .../common/configs/widgets/config_widget_view.js |  2 ++
 8 files changed, 36 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/92da024a/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 645d1c4..1bd8d05 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5713,3 +5713,9 @@ input[type=radio].align-checkbox, 
input[type=checkbox].align-checkbox {
 .config-widget-left-popover {
   margin-left: -10px;
 }
+
+.version-labels, .version-info-bar, .version-box {
+  .label, .badge {
+font-weight: normal;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/92da024a/ambari-web/app/styles/config_history_flow.less
--
diff --git a/ambari-web/app/styles/config_history_flow.less 
b/ambari-web/app/styles/config_history_flow.less
index 28f79c6..dfa2c03 100644
--- a/ambari-web/app/styles/config_history_flow.less
+++ b/ambari-web/app/styles/config_history_flow.less
@@ -22,6 +22,9 @@
 .flow-element {
   .version-box .box {
 font-size: 13px;
+.label-current {
+  padding-top: 2px;
+}
   }
   .arrow-box {
 margin-left: 5px;
@@ -30,6 +33,9 @@
   }
   .version-info-bar {
 width: 960px;
+.label-current.icon-ok {
+  padding: 6px 5px !important;
+}
   }
 }
 
@@ -149,7 +155,6 @@
 background-color: #e6f1f6;
 .content {
   color: #44;
-  font-weight: bold;
 }
   }
   .version-box .box.grayedOut {

http://git-wip-us.apache.org/repos/asf/ambari/blob/92da024a/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index 762cc8d..4f4f88a 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -68,6 +68,12 @@
 margin-left: 10px;
 min-height: 65px;
 min-width: 39px;
+.version-labels {
+  min-width: 52px;
+  .label-current {
+padding: 2px 3px 3px 5px;
+  }
+}
 .widget-col {
   width: 18px;
   .left {
@@ -413,3 +419,12 @@
 float: left;
   }
 }
+
+.label-current.icon-ok {
+  color: white;
+}
+
+.compare-mode {
+  background-color: rgba(211, 237, 247, 0.39);
+  padding: 10px 5px 0px 10px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/92da024a/ambari-web/app/templates/common/configs/config_history_flow.hbs
--
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs 
b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index d6fae10..a1f610d 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -102,7 +102,7 @@
 span class=label 
label-info{{view.displayedServiceVersion.versionText}}/span
   {{/if}}
   {{#if view.displayedServiceVersion.isCurrent}}
-  span class=label label-success{{t common.current}}/span
+  span class=label-current label label-success icon-ok 
data-toggle=tooltip title=Current/span
   {{/if}}
   {{#if view.displayedServiceVersion.author}}
 
strong{{view.displayedServiceVersion.author}}/strongnbsp;{{t 

ambari git commit: AMBARI-11024. Kerberos Wizard: Downloaded CSV file contains only default data (rlevas)

2015-05-08 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 6016fc6e8 - 41bdc34d5


AMBARI-11024. Kerberos Wizard: Downloaded CSV file contains only default data 
(rlevas)


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

Branch: refs/heads/trunk
Commit: 41bdc34d56da18a921116bbd22207220cd74ca05
Parents: 6016fc6
Author: Robert Levas rle...@hortonworks.com
Authored: Fri May 8 15:26:26 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Fri May 8 15:26:39 2015 -0400

--
 .../main/admin/kerberos/step5_controller.js | 57 
 .../main/admin/kerberos/step7_controller.js | 51 --
 ambari-web/app/routes/add_kerberos_routes.js| 21 
 3 files changed, 68 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/41bdc34d/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
index 5268c2d..7cad80f 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
@@ -80,6 +80,63 @@ App.KerberosWizardStep5Controller = 
App.KerberosProgressPageController.extend({
 newWindow.focus();
   },
 
+  /**
+   * Send request to post kerberos descriptor
+   * @param kerberosDescriptor
+   * @returns {$.ajax|*}
+   */
+  postKerberosDescriptor: function (kerberosDescriptor) {
+return App.ajax.send({
+  name: 'admin.kerberos.cluster.artifact.create',
+  sender: this,
+  data: {
+artifactName: 'kerberos_descriptor',
+data: {
+  artifact_data: kerberosDescriptor
+}
+  }
+});
+  },
+
+  /**
+   * Send request to update kerberos descriptor
+   * @param kerberosDescriptor
+   * @returns {$.ajax|*}
+   */
+  putKerberosDescriptor: function (kerberosDescriptor) {
+return App.ajax.send({
+  name: 'admin.kerberos.cluster.artifact.update',
+  sender: this,
+  data: {
+artifactName: 'kerberos_descriptor',
+data: {
+  artifact_data: kerberosDescriptor
+}
+  },
+  success: 'unkerberizeCluster',
+  error: 'unkerberizeCluster'
+});
+  },
+
+  /**
+   * Send request to unkerberisze cluster
+   * @returns {$.ajax}
+   */
+  unkerberizeCluster: function () {
+return App.ajax.send({
+  name: 'admin.unkerberize.cluster',
+  sender: this,
+  success: 'goToNextStep',
+  error: 'goToNextStep'
+});
+  },
+
+
+  goToNextStep: function() {
+this.clearStage();
+App.router.transitionTo('step5');
+  },
+
   isSubmitDisabled: function () {
 return ![COMPLETED, FAILED].contains(this.get('status'));
   }.property('status')

http://git-wip-us.apache.org/repos/asf/ambari/blob/41bdc34d/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
index ece50d7..077f75c 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
@@ -60,57 +60,6 @@ App.KerberosWizardStep7Controller = 
App.KerberosProgressPageController.extend({
 }
   },
 
-  /**
-   * Send request to unkerberisze cluster
-   * @returns {$.ajax}
-   */
-  unkerberizeCluster: function () {
-return App.ajax.send({
-  name: 'admin.unkerberize.cluster',
-  sender: this,
-  success: 'goToNextStep',
-  error: 'goToNextStep'
-});
-  },
-
-  goToNextStep: function() {
-this.clearStage();
-App.router.transitionTo('step7');
-  },
-
-  postKerberosDescriptor: function (kerberosDescriptor) {
-return App.ajax.send({
-  name: 'admin.kerberos.cluster.artifact.create',
-  sender: this,
-  data: {
-artifactName: 'kerberos_descriptor',
-data: {
-  artifact_data: kerberosDescriptor
-}
-  }
-});
-  },
-
-  /**
-   * Send request to update kerberos descriptor
-   * @param kerberosDescriptor
-   * @returns {$.ajax|*}
-   */
-  putKerberosDescriptor: function (kerberosDescriptor) {
-return App.ajax.send({
-  name: 'admin.kerberos.cluster.artifact.update',
-  sender: this,
-  data: {
-artifactName: 'kerberos_descriptor',
-data: {
-  artifact_data: kerberosDescriptor
-}

ambari git commit: AMBARI-10998. Stack advisor: hive.tez.container.size and tez.task.resource.memory.mb should have same value/calculation logic (mpapirkovskyy via srimanth)

2015-05-08 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 55394ec0a - 6016fc6e8


AMBARI-10998. Stack advisor: hive.tez.container.size and 
tez.task.resource.memory.mb should have same value/calculation logic 
(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/6016fc6e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6016fc6e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6016fc6e

Branch: refs/heads/trunk
Commit: 6016fc6e8ff30f891fc4d6d3524b396c43a7aa07
Parents: 55394ec
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri May 8 11:49:38 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri May 8 11:49:38 2015 -0700

--
 .../services/HIVE/configuration/hive-site.xml   |  4 ++
 .../2.2/services/TEZ/configuration/tez-site.xml | 10 
 .../stacks/HDP/2.2/services/stack_advisor.py| 15 --
 .../stacks/2.2/common/test_stack_advisor.py | 55 +---
 4 files changed, 73 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6016fc6e/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
index ad0b8bb..f0b5a04 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
@@ -374,6 +374,10 @@ limitations under the License.
 typeyarn-site/type
 nameyarn.scheduler.minimum-allocation-mb/name
   /property
+  property
+typeyarn-site/type
+nameyarn.scheduler.maximum-allocation-mb/name
+  /property
 /depends-on
   /property
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6016fc6e/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml
index 24c14bb..72873b7 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/TEZ/configuration/tez-site.xml
@@ -90,6 +90,16 @@
 descriptionThe amount of memory to be used by launched tasks.
   Used only if the value is not specified explicitly by the DAG definition.
 /description
+depends-on
+  property
+typeyarn-site/type
+nameyarn.scheduler.minimum-allocation-mb/name
+  /property
+  property
+typeyarn-site/type
+nameyarn.scheduler.maximum-allocation-mb/name
+  /property
+/depends-on
   /property
 
   property

http://git-wip-us.apache.org/repos/asf/ambari/blob/6016fc6e/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 cfcc2b5..24248f2 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
@@ -302,10 +302,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
 if not yarn-site in configurations:
   self.recommendYARNConfigurations(configurations, clusterData, services, 
hosts)
+#properties below should be always present as they are provided in HDP206 
stack advisor at least
+yarnMaxAllocationSize = min(30 * 
int(configurations[yarn-site][properties][yarn.scheduler.minimum-allocation-mb]),
 
int(configurations[yarn-site][properties][yarn.scheduler.maximum-allocation-mb]))
+#duplicate tez task resource calc logic, direct dependency doesn't look 
good here (in case of Hive without Tez)
+container_size = clusterData['mapMemory'] if clusterData['mapMemory']  
2048 else int(clusterData['reduceMemory'])
+container_size = min(clusterData['containers'] * 
clusterData['ramPerContainer'], container_size, yarnMaxAllocationSize)
 
-if yarn-site in configurations and \
-  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, 

ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 6e8dce443 - 0564f0c3b


AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)


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

Branch: refs/heads/trunk
Commit: 0564f0c3ba2f82235925101a33c4316082c43e98
Parents: 6e8dce4
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri May 8 23:49:55 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri May 8 23:49:55 2015 +0300

--
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0564f0c3/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index 7437e37..8b5db38 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -20,11 +20,8 @@ Ambari Agent
 
 import os
 
- HEAD
 from resource_management.libraries.functions import conf_select
-===
 from resource_management import *
- AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.libraries.functions.version import 
format_hdp_stack_version
@@ -101,15 +98,12 @@ if Script.is_hdp_stack_greater_or_equal(2.2):
   mapreduce_tar_source = 
config['configurations']['cluster-env']['mapreduce_tar_source']
   mapreduce_tar_destination = 
config['configurations']['cluster-env']['mapreduce_tar_destination_folder'] + 
/ + os.path.basename(mapreduce_tar_source)
 
- HEAD
-===
   # the configuration direction for HDFS/YARN/MapR is the hadoop config
   # directory, which is symlinked by hadoop-client only
   hadoop_conf_dir = /usr/hdp/current/hadoop-client/conf
   tez_tar_source = config['configurations']['cluster-env']['tez_tar_source']
   tez_tar_destination = 
config['configurations']['cluster-env']['tez_tar_destination_folder'] + / + 
os.path.basename(tez_tar_source)
 
- AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)
 
 limits_conf_dir = /etc/security/limits.d
 execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir + os.pathsep + 
yarn_container_bin



[1/2] ambari git commit: AMBARI-11035. Configs: invalid input should not be allowed

2015-05-08 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 0564f0c3b - db47268f6


AMBARI-11035. Configs: invalid input should not be allowed


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

Branch: refs/heads/trunk
Commit: db47268f675a9c35da017bd260f77de4b96d4a6a
Parents: 8df37d1
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri May 8 13:20:00 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri May 8 14:10:06 2015 -0700

--
 .../app/views/common/configs/widgets/plain_config_text_field.js | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db47268f/ambari-web/app/views/common/configs/widgets/plain_config_text_field.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/plain_config_text_field.js 
b/ambari-web/app/views/common/configs/widgets/plain_config_text_field.js
index 3ac96cd..27d6b3b 100644
--- a/ambari-web/app/views/common/configs/widgets/plain_config_text_field.js
+++ b/ambari-web/app/views/common/configs/widgets/plain_config_text_field.js
@@ -35,6 +35,11 @@ App.PlainConfigTextField = 
Ember.View.extend(App.SupportsDependentConfigs, {
 
   focusOut: function () {
 this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
+  },
+
+  didInsertElement: function() {
+this._super();
+this.set('serviceConfig.displayType', Em.getWithDefault(this, 
'serviceConfig.stackConfigProperty.valueAttributes.type', 'string'));
   }
 
 });



[2/2] ambari git commit: AMBARI-11033. Missing tooltips and action alignment issues

2015-05-08 Thread srimanth
AMBARI-11033. Missing tooltips and action alignment issues


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

Branch: refs/heads/trunk
Commit: 8df37d1f7432ca43d0206c3bc4e578b6b8fc6214
Parents: 0564f0c
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Fri May 8 13:00:04 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Fri May 8 14:10:06 2015 -0700

--
 ambari-web/app/messages.js   |  2 +-
 .../main/service/configs/config_overridable.js   |  1 +
 ambari-web/app/styles/widgets.less   | 15 ++-
 .../templates/common/configs/widgets/controls.hbs|  7 +--
 .../common/configs/widgets/config_widget_view.js |  1 +
 .../configs/widgets/plain_config_text_field.js   |  2 +-
 6 files changed, 23 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8df37d1f/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 8011182..9471388 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1753,7 +1753,7 @@ Em.I18n.translations = {
   'services.service.config.configHistory.dismissIcon.tooltip': 'Dismiss',
   'services.service.config.configHistory.makeCurrent.message': 'Created from 
service config version {0}',
   'services.service.config.configHistory.comparing': 'Comparing',
-  'services.service.config.setRecommendedValue': 'Set Recommended Value',
+  'services.service.config.setRecommendedValue': 'Set Recommended',
 
   'services.service.widgets.list-widget.nothingSelected': 'Nothing selected',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8df37d1f/ambari-web/app/mixins/main/service/configs/config_overridable.js
--
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js 
b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 57910f4..0591195 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -65,6 +65,7 @@ App.ConfigOverridable = Em.Mixin.create({
 else {
   serviceConfigController.addOverrideProperty(serviceConfigProperty, 
selectedConfigGroup, serviceConfigProperty.get('widget') ? 
serviceConfigProperty.get('value') : null);
 }
+Em.$('body.tooltip').remove();
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/8df37d1f/ambari-web/app/styles/widgets.less
--
diff --git a/ambari-web/app/styles/widgets.less 
b/ambari-web/app/styles/widgets.less
index 4f4f88a..d79ef07 100644
--- a/ambari-web/app/styles/widgets.less
+++ b/ambari-web/app/styles/widgets.less
@@ -18,6 +18,7 @@
 @import 'common.less';
 
 @undo-btn-margin: 10px;
+@controls-min-width: 39px;
 @combo-widget-width: 100px;
 @green: #6ebd45;
 @slider-light-grey: #e6e6e6;
@@ -67,7 +68,9 @@
 display: inline-block;
 margin-left: 10px;
 min-height: 65px;
-min-width: 39px;
+min-width: @controls-min-width;
+z-index: 1;
+position: relative;
 .version-labels {
   min-width: 52px;
   .label-current {
@@ -100,6 +103,16 @@
   }
 }
   }
+  .widget-config-raw {
+width: calc(~100% - 30px -@controls-min-width);
+  }
+  .slider-widget {
+width: 100%;
+overflow-x: hidden;
+margin-left: -20px;
+margin-right: 0;
+padding-left: 20px;
+  }
 }
 
 .directory-textarea-wrapper {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8df37d1f/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs 
b/ambari-web/app/templates/common/configs/widgets/controls.hbs
index 78890d1..a80fdee 100644
--- a/ambari-web/app/templates/common/configs/widgets/controls.hbs
+++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs
@@ -18,7 +18,7 @@
 
 {{#if view.canEdit}}
   {{#if view.supportSwitchToCheckBox}}
-div {{bindAttr class=view.showAsTextBox::hide :left}}
+div {{bindAttr class=view.showAsTextBox::hide :left 
:widget-config-raw}}
   {{view App.PlainConfigTextField serviceConfigBinding=view.config}}
 /div
   {{/if}}
@@ -26,7 +26,9 @@
 div class=widget-col left
   {{#if view.config.isNotDefaultValue}}
 {{#if view.undoAllowed}}
-  a class=widget-action widget-action-undo href=# {{action 
restoreValue target=view}}
+  

ambari git commit: AMBARI-11019 AMS config warning message is confusing. (atkach)

2015-05-08 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 014a72179 - 8d695f495


AMBARI-11019 AMS config warning message is confusing. (atkach)


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

Branch: refs/heads/branch-2.0.maint
Commit: 8d695f495d30416980eaa819ad172447bc6a4e1b
Parents: 014a721
Author: Andrii Tkach atk...@hortonworks.com
Authored: Fri May 8 16:04:45 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Fri May 8 16:04:45 2015 +0300

--
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 44 +---
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/mixins/common/serverValidator.js | 11 +++--
 .../configs/config_recommendation_popup.hbs | 16 ---
 4 files changed, 48 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d695f49/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 5e42b50..ce90bc9 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
@@ -272,8 +272,36 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 if siteProperties is not None:
   resultItems = method(siteProperties, 
recommendedDefaults[siteName][properties], configurations, services, hosts)
   items.extend(resultItems)
+clusterWideItems = self.validateClusterConfigurations(configurations, 
services, hosts)
+items.extend(clusterWideItems)
 return items
 
+  def validateClusterConfigurations(self, configurations, services, hosts):
+validationItems = []
+hostComponents = {}
+failureMessage = 
+
+for service in services[services]:
+  for component in service[components]:
+if component[StackServiceComponents][hostnames] is not None:
+  for hostName in component[StackServiceComponents][hostnames]:
+if hostName not in hostComponents.keys():
+  hostComponents[hostName] = []
+
hostComponents[hostName].append(component[StackServiceComponents][component_name])
+
+for host in hosts[items]:
+  # Not enough physical memory
+  requiredMemory = 
getMemorySizeRequired(hostComponents[host[Hosts][host_name]], 
configurations)
+  if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
+failureMessage += Not enough physical RAM on the host {0}.  \
+  At least {1} MB is recommended based on components 
assigned.\n \
+  .format(host[Hosts][host_name], requiredMemory/1048576)  # MB
+if failureMessage:
+  notEnoughMemoryItem = self.getWarnItem(failureMessage)
+  validationItems.extend([{config-name: , item: 
notEnoughMemoryItem}])
+
+return self.toConfigurationValidationProblems(validationItems, )
+
   def getServiceConfigurationValidators(self):
 return {
   HDFS: {hadoop-env: self.validateHDFSConfigurationsEnv},
@@ -349,16 +377,12 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 masterHostItem = None
 
 if masterItem is None:
-  hostComponents = {}
   hostMasterComponents = {}
 
   for service in services[services]:
 for component in service[components]:
   if component[StackServiceComponents][hostnames] is not None:
 for hostName in component[StackServiceComponents][hostnames]:
-  if hostName not in hostComponents.keys():
-hostComponents[hostName] = []
-  
hostComponents[hostName].append(component[StackServiceComponents][component_name])
   if self.isMasterComponent(component):
 if hostName not in hostMasterComponents.keys():
   hostMasterComponents[hostName] = []
@@ -381,18 +405,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 masterHostMessage.format(
   collectorHostName, str(, 
.join(hostMasterComponents[collectorHostName]
 
-# No enough physical memory
-# TODO Add AMBARI_METRICS Collector Xmx property to ams-env
-requiredMemory = 
getMemorySizeRequired(hostComponents[collectorHostName], configurations)
-if host[Hosts][total_mem] * 1024  requiredMemory:  # in bytes
-  message = No enough total RAM on the host {0},  \
-at least {1} MB required for the 

ambari git commit: AMBARI-11018. Unable to register host with non root ssh user (aonishuk)

2015-05-08 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 2a09dfeeb - c0bbddb2d


AMBARI-11018. Unable to register host with non root ssh user (aonishuk)


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

Branch: refs/heads/trunk
Commit: c0bbddb2d63b9c0156429a270ea6475775251e98
Parents: 2a09dfe
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri May 8 14:54:27 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri May 8 14:54:27 2015 +0300

--
 ambari-server/src/main/python/bootstrap.py | 5 -
 ambari-server/src/test/python/TestBootstrap.py | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c0bbddb2/ambari-server/src/main/python/bootstrap.py
--
diff --git a/ambari-server/src/main/python/bootstrap.py 
b/ambari-server/src/main/python/bootstrap.py
index b22a10d..0173159 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -48,6 +48,8 @@ MAX_PARALLEL_BOOTSTRAPS = 20
 POLL_INTERVAL_SEC = 1
 DEBUG = False
 DEFAULT_AGENT_TEMP_FOLDER = /var/lib/ambari-agent/data/tmp
+DEFAULT_AGENT_DATA_FOLDER = /var/lib/ambari-agent/data
+DEFAULT_AGENT_LIB_FOLDER = /var/lib/ambari-agent
 PYTHON_ENV=env PYTHONPATH=$PYTHONPATH: + DEFAULT_AGENT_TEMP_FOLDER
 CREATE_REMOTING_DIR_SCRIPT_NAME = Create-RemotingDir.ps1
 SEND_REMOTING_FILE_SCRIPT_NAME = Send-RemotingFile.ps1
@@ -603,7 +605,8 @@ class BootstrapDefault(Bootstrap):
 params = self.shared_state
 user = params.user
 
-command = sudo mkdir -p {0} ; sudo chown -R {1} 
{0}.format(self.TEMP_FOLDER,quote_bash_args(params.user))
+command = sudo mkdir -p {0} ; sudo chown -R {1} {0} ; sudo chmod 755 {3} 
; sudo chmod 755 {2} ; sudo chmod 755 {0}.format(
+  self.TEMP_FOLDER, quote_bash_args(params.user), 
DEFAULT_AGENT_DATA_FOLDER, DEFAULT_AGENT_LIB_FOLDER)
 
 ssh = SSH(params.user, params.sshkey_file, self.host, command,
   params.bootdir, self.host_log)

http://git-wip-us.apache.org/repos/asf/ambari/blob/c0bbddb2/ambari-server/src/test/python/TestBootstrap.py
--
diff --git a/ambari-server/src/test/python/TestBootstrap.py 
b/ambari-server/src/test/python/TestBootstrap.py
index 8066d13..9c0e78e 100644
--- a/ambari-server/src/test/python/TestBootstrap.py
+++ b/ambari-server/src/test/python/TestBootstrap.py
@@ -354,7 +354,10 @@ class TestBootstrap(TestCase):
 command = str(init_mock.call_args[0][3])
 self.assertEqual(command,
  sudo mkdir -p /var/lib/ambari-agent/data/tmp ; 
- sudo chown -R root /var/lib/ambari-agent/data/tmp)
+ sudo chown -R root /var/lib/ambari-agent/data/tmp ; 
+ sudo chmod 755 /var/lib/ambari-agent ; 
+ sudo chmod 755 /var/lib/ambari-agent/data ; 
+ sudo chmod 755 /var/lib/ambari-agent/data/tmp)
 
   @patch.object(BootstrapDefault, getOsCheckScript)
   @patch.object(BootstrapDefault, getOsCheckScriptRemoteLocation)



ambari git commit: AMBARI-11020 UI does not mask password fields with default value. (ababiichuk)

2015-05-08 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk c0bbddb2d - ec9684763


AMBARI-11020 UI does not mask password fields with default value. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: ec9684763a516f8c3f13a00228071ae4e4ef6a62
Parents: c0bbddb
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Fri May 8 13:51:30 2015 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Fri May 8 14:55:15 2015 +0300

--
 .../configs/stack_config_properties_mapper.js   | 21 ++
 .../stack_config_properties_mapper_test.js  | 43 ++--
 2 files changed, 44 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec968476/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
--
diff --git a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js 
b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
index 16d0abb..3d24df8 100644
--- a/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
+++ b/ambari-web/app/mappers/configs/stack_config_properties_mapper.js
@@ -61,7 +61,7 @@ App.stackConfigPropertiesMapper = App.QuickDataMapper.create({
   config.StackConfigurations.property_depended_by.push({
 type : dep.StackConfigurationDependency.dependency_type,
 name : dep.StackConfigurationDependency.dependency_name
-  })
+  });
 });
   }
   /**
@@ -81,20 +81,6 @@ App.stackConfigPropertiesMapper = 
App.QuickDataMapper.create({
   /*** METHODS TO MERGE STACK PROPERTIES WITH STORED ON UI 
(NOT USED FOR NOW)*/
 
   /**
-   * configs that are stored on UI
-   * @type {Object[]};
-   */
-  preDefinedSiteProperties: function () {
-if (App.get('isHadoop23Stack')) {
-  return require('data/HDP2.3/site_properties').configProperties;
-}
-if (App.get('isHadoop22Stack')) {
-  return require('data/HDP2.2/site_properties').configProperties;
-}
-return require('data/HDP2/site_properties').configProperties;
-  }.property('App.isHadoop22Stack', 'App.isHadoop23Stack'),
-
-  /**
* find UI config with current name and fileName
* if there is such property - adds some info to config object
* @param {Object} config
@@ -102,11 +88,12 @@ App.stackConfigPropertiesMapper = 
App.QuickDataMapper.create({
*/
   mergeWithUI: function(config) {
 var uiConfigProperty = 
this.getUIConfig(config.StackConfigurations.property_name, 
config.StackConfigurations.type);
+var displayType = 
App.permit(App.config.advancedConfigIdentityData(config.StackConfigurations), 
'displayType').displayType || 'string';
 if (!config.StackConfigurations.property_display_name) {
   config.StackConfigurations.property_display_name = uiConfigProperty  
uiConfigProperty.displayName ? uiConfigProperty.displayName : 
config.StackConfigurations.property_name;
 }
 config.category = uiConfigProperty ? uiConfigProperty.category : 'Advanced 
' + App.config.getConfigTagFromFileName(config.StackConfigurations.type);
-config.display_type = uiConfigProperty ? uiConfigProperty.displayType : 
'string';
+config.display_type = uiConfigProperty ? uiConfigProperty.displayType || 
displayType : displayType;
   },
 
   /**
@@ -118,6 +105,6 @@ App.stackConfigPropertiesMapper = 
App.QuickDataMapper.create({
* @method getUIConfig
*/
   getUIConfig: function(propertyName, siteName) {
-return this.get('preDefinedSiteProperties').filterProperty('filename', 
siteName).findProperty('name', propertyName);
+return 
App.config.get('preDefinedSiteProperties').filterProperty('filename', 
siteName).findProperty('name', propertyName);
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec968476/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
--
diff --git 
a/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js 
b/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
index 2a1aa4b..416a14f 100644
--- a/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
+++ b/ambari-web/test/mappers/configs/stack_config_properties_mapper_test.js
@@ -120,6 +120,34 @@ describe('App.stackConfigPropertiesMapper', function () {
   stack_version : 2.2,
   type : site3.xml
 }
+  },
+  {
+StackConfigurations : {
+   

ambari git commit: AMBARI-10665. Internal Exception: org.postgresql.util.PSQLException: ERROR: column config_attributes does not exist (Emil Anca via rlevas)

2015-05-08 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 87fd33c17 - 014a72179


AMBARI-10665. Internal Exception: org.postgresql.util.PSQLException: ERROR: 
column config_attributes does not exist (Emil Anca via rlevas)


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

Branch: refs/heads/branch-2.0.maint
Commit: 014a7217962c6483067c1a29e9487e02eee76bbd
Parents: 87fd33c
Author: Emil Anca ea...@hortonworks.com
Authored: Fri May 8 08:17:02 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Fri May 8 08:17:02 2015 -0400

--
 .../orm/entities/BlueprintConfigEntity.java |  3 +-
 .../orm/entities/ClusterConfigEntity.java   |  2 +-
 .../orm/entities/HostGroupConfigEntity.java |  3 +-
 .../server/upgrade/UpgradeCatalog170.java   | 27 +++-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  4 +--
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  6 ++--
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  6 ++--
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  4 +--
 .../server/upgrade/UpgradeCatalog170Test.java   | 33 +++-
 9 files changed, 61 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/014a7217/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
index b27f7ef..24b0ad2 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntity.java
@@ -50,7 +50,8 @@ public class BlueprintConfigEntity implements 
BlueprintConfiguration {
   private String configData;
 
   @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
-  @Basic
+  @Basic(fetch = FetchType.LAZY)
+  @Lob
   private String configAttributes;
 
   @ManyToOne

http://git-wip-us.apache.org/repos/asf/ambari/blob/014a7217/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
index cb36923..334d442 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
@@ -56,7 +56,7 @@ public class ClusterConfigEntity {
   private String configJson;
 
   @Basic(fetch = FetchType.LAZY)
-  @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false, length = 32000)
+  @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
   @Lob
   private String configAttributesJson;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/014a7217/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
index 49870fe..877f34b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntity.java
@@ -56,7 +56,8 @@ public class HostGroupConfigEntity implements 
BlueprintConfiguration {
   private String configData;
 
   @Column(name = config_attributes, nullable = true, insertable = true, 
updatable = false)
-  @Basic
+  @Basic(fetch = FetchType.LAZY)
+  @Lob
   private String configAttributes;
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/014a7217/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index a703d42..0d8709b 100644
--- 

[3/5] ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index 583e6e9..1e75eb0 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -61,37 +61,35 @@ def yarn(name = None):
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def yarn(name = None):
   import params
-  if name in [nodemanager,historyserver]:
+  if name == historyserver:
 if params.yarn_log_aggregation_enabled:
-  params.HdfsDirectory(params.yarn_nm_app_log_dir,
-   action=create_delayed,
+  params.HdfsResource(params.yarn_nm_app_log_dir,
+   action=create_on_execute,
+   type=directory,
owner=params.yarn_user,
group=params.user_group,
mode=0777,
recursive_chmod=True
   )
-params.HdfsDirectory(/mapred,
- action=create_delayed,
+params.HdfsResource(/mapred,
+ type=directory,
+ action=create_on_execute,
  owner=params.mapred_user
 )
-params.HdfsDirectory(/mapred/system,
- action=create_delayed,
+params.HdfsResource(/mapred/system,
+ type=directory,
+ action=create_on_execute,
  owner=params.hdfs_user
 )
-params.HdfsDirectory(params.mapreduce_jobhistory_intermediate_done_dir,
- action=create_delayed,
+params.HdfsResource(params.mapreduce_jobhistory_done_dir,
+ type=directory,
+ action=create_on_execute,
  owner=params.mapred_user,
  group=params.user_group,
+ change_permissions_for_parents=True,
  mode=0777
 )
-
-params.HdfsDirectory(params.mapreduce_jobhistory_done_dir,
- action=create_delayed,
- owner=params.mapred_user,
- group=params.user_group,
- mode=01777
-)
-params.HdfsDirectory(None, action=create)
+params.HdfsResource(None, action=execute)
 
   if name == nodemanager:
 Directory(params.nm_local_dirs.split(',') + params.nm_log_dirs.split(','),
@@ -178,12 +176,14 @@ def yarn(name = None):
group=params.user_group
 )
 if not is_empty(params.node_label_enable) and params.node_label_enable or 
is_empty(params.node_label_enable) and params.node_labels_dir:
-  params.HdfsDirectory(params.node_labels_dir,
-   action=create,
+  params.HdfsResource(params.node_labels_dir,
+   type=directory,
+   action=create_on_execute,
owner=params.yarn_user,
group=params.user_group,
mode=0700
   )
+  params.HdfsResource(None, action=execute)
   elif name == 'apptimelineserver':
 Directory(params.ats_leveldb_dir,
owner=params.yarn_user,

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py 
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index b56d15a..cc404eb 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -280,36 +280,42 @@ class TestHBaseMaster(RMFTestCase):
   owner='hbase',
   content='log4jproperties\nline2'
 )
-self.assertResourceCalled('HdfsDirectory', 
'hdfs://c6401.ambari.apache.org:8020/apps/hbase/data',
-  security_enabled = False,
-  keytab = UnknownConfigurationMock(),
-  conf_dir = '/etc/hadoop/conf',
-  hdfs_user = 'hdfs',
-  kinit_path_local = /usr/bin/kinit,
-  owner = 'hbase',
-  bin_dir = '/usr/bin',
-  action = ['create_delayed'],
-  )
-

[5/5] ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)


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

Branch: refs/heads/trunk
Commit: 6e8dce44336c0afaa34a5aefbc500a116b4b91e8
Parents: 92da024
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri May 8 23:34:21 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri May 8 23:34:21 2015 +0300

--
 ambari-agent/pom.xml|   7 +
 .../resource_management/TestContentSources.py   |   6 +-
 .../resource_management/TestCopyFromLocal.py|  68 ---
 .../TestPropertiesFileResource.py   |  10 +-
 .../TestRepositoryResource.py   |   6 +-
 .../TestXmlConfigResource.py|   8 +-
 .../python/resource_management/core/source.py   |  11 +-
 .../libraries/functions/__init__.py |   1 -
 .../libraries/functions/version.py  |  29 +-
 .../libraries/providers/__init__.py |   3 +-
 .../libraries/providers/copy_from_local.py  |  94 
 .../libraries/providers/hdfs_directory.py   | 112 -
 .../libraries/providers/hdfs_resource.py| 111 +
 .../libraries/resources/__init__.py |   3 +-
 .../libraries/resources/copy_from_local.py  |  41 --
 .../libraries/resources/hdfs_directory.py   |  45 --
 .../libraries/resources/hdfs_resource.py|  76 
 .../libraries/script/script.py  |   2 +
 .../1.6.1.2.2.0/package/scripts/accumulo.py |   6 +-
 .../package/scripts/accumulo_configuration.py   |  14 +-
 .../1.6.1.2.2.0/package/scripts/params.py   |  19 +-
 .../0.1.0/package/scripts/hbase.py  |  14 +-
 .../0.1.0/package/scripts/params.py |  16 +-
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py  |  23 +-
 .../0.5.0.2.1/package/scripts/params_linux.py   |  20 +-
 .../HBASE/0.96.0.2.0/package/scripts/hbase.py   |  14 +-
 .../0.96.0.2.0/package/scripts/params_linux.py  |  21 +-
 .../0.96.0.2.0/package/scripts/service_check.py |   1 -
 .../package/files/fast-hdfs-resource.jar| Bin 0 - 19285282 bytes
 .../HDFS/2.1.0.2.0/package/scripts/hdfs.py  |   5 +
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  |  15 +-
 .../package/scripts/hdfs_nfsgateway.py  |   1 -
 .../2.1.0.2.0/package/scripts/hdfs_snamenode.py |   1 -
 .../2.1.0.2.0/package/scripts/params_linux.py   |  20 +-
 .../2.1.0.2.0/package/scripts/service_check.py  |  53 +--
 .../0.12.0.2.0/package/files/templetonSmoke.sh  |  22 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive.py | 116 +++--
 .../0.12.0.2.0/package/scripts/hive_server.py   |  13 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  63 ++-
 .../HIVE/0.12.0.2.0/package/scripts/webhcat.py  |  71 ---
 .../package/scripts/webhcat_service_check.py|  28 +-
 .../package/templates/templeton_smoke.pig.j2|  24 +
 .../MAHOUT/1.0.0.2.3/package/scripts/params.py  |  17 +-
 .../1.0.0.2.3/package/scripts/service_check.py  |  49 +-
 .../4.0.0.2.0/package/files/oozieSmoke2.sh  |  52 +--
 .../files/prepareOozieHdfsDirectories.sh|  45 ++
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py|   6 +-
 .../package/scripts/oozie_server_upgrade.py |  16 +-
 .../4.0.0.2.0/package/scripts/params_linux.py   |  22 +-
 .../4.0.0.2.0/package/scripts/service_check.py  |  38 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  25 +-
 .../0.12.0.2.0/package/scripts/service_check.py |  67 +--
 .../package/scripts/job_history_server.py   |  10 +-
 .../SPARK/1.2.0.2.2/package/scripts/params.py   |  21 +-
 .../1.2.0.2.2/package/scripts/setup_spark.py|   6 +-
 .../1.2.0.2.2/package/scripts/spark_service.py  |   9 +-
 .../STORM/0.9.1.2.1/configuration/storm-env.xml |  12 +-
 .../0.4.0.2.1/package/scripts/params_linux.py   |  25 +-
 .../0.4.0.2.1/package/scripts/service_check.py  |  53 +--
 .../2.1.0.2.0/package/scripts/historyserver.py  |  25 +-
 .../2.1.0.2.0/package/scripts/install_jars.py   |  68 ++-
 .../package/scripts/mapred_service_check.py |  27 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |  37 +-
 .../package/scripts/resourcemanager.py  |  12 +-
 .../2.1.0.2.0/package/scripts/service_check.py  |   2 +-
 .../YARN/2.1.0.2.0/package/scripts/yarn.py  |  38 +-
 .../stacks/2.0.6/HBASE/test_hbase_master.py | 192 
 .../2.0.6/HBASE/test_hbase_regionserver.py  |  91 
 .../python/stacks/2.0.6/HDFS/test_datanode.py   |   6 +
 .../stacks/2.0.6/HDFS/test_journalnode.py   |   6 +
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 448 ++-
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py |   6 +
 .../stacks/2.0.6/HDFS/test_service_check.py |  59 +--
 

[1/5] ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 92da024a5 - 6e8dce443


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/test/python/stacks/2.2/configs/default.json
--
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/default.json 
b/ambari-server/src/test/python/stacks/2.2/configs/default.json
index c5a6ae7..8188928 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/default.json
@@ -185,7 +185,18 @@
 ignore_groupsusers_create: false,
 smokeuser: ambari-qa,
 kerberos_domain: EXAMPLE.COM,
-user_group: hadoop
+user_group: hadoop,
+   hive_tar_source: /usr/hdp/current/hive-client/hive.tar.gz, 
+   hadoop-streaming_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/, 
+   pig_tar_source: /usr/hdp/current/pig-client/pig.tar.gz, 
+   hive_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/hive/, 
+   tez_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/tez/, 
+   mapreduce_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/, 
+   tez_tar_source: /usr/hdp/current/tez-client/lib/tez.tar.gz, 
+   pig_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/pig/, 
+   mapreduce_tar_source: 
/usr/hdp/current/hadoop-client/mapreduce.tar.gz, 
+   sqoop_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/sqoop/, 
+   sqoop_tar_source: /usr/hdp/current/sqoop-client/sqoop.tar.gz
 },
 ranger-knox-plugin-properties: {
 POLICY_MGR_URL: {{policymgr_mgr_url}}, 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/test/python/stacks/2.2/configs/secured.json
--
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/secured.json 
b/ambari-server/src/test/python/stacks/2.2/configs/secured.json
index 5bd8814..e224ebc 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/secured.json
@@ -173,7 +173,18 @@
 user_group: hadoop,
 smokeuser_keytab: 
/etc/security/keytabs/smokeuser.headless.keytab,
 smokeuser_principal_name: ambari...@example.com,
-kinit_path_local: /usr/bin
+kinit_path_local: /usr/bin,
+   hive_tar_source: /usr/hdp/current/hive-client/hive.tar.gz, 
+   hadoop-streaming_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/, 
+   pig_tar_source: /usr/hdp/current/pig-client/pig.tar.gz, 
+   hive_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/hive/, 
+   tez_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/tez/, 
+   mapreduce_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/mapreduce/, 
+   tez_tar_source: /usr/hdp/current/tez-client/lib/tez.tar.gz, 
+   pig_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/pig/, 
+   mapreduce_tar_source: 
/usr/hdp/current/hadoop-client/mapreduce.tar.gz, 
+   sqoop_tar_destination_folder: hdfs:///hdp/apps/{{ 
hdp_stack_version }}/sqoop/, 
+   sqoop_tar_source: /usr/hdp/current/sqoop-client/sqoop.tar.gz
 },
 webhcat-site: {
 templeton.jar: 
/usr/hdp/current/hive-webhcat/share/webhcat/svr/lib/hive-webhcat-*.jar,

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py 
b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
index 0d943c4..665119f 100644
--- 
a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
+++ 
b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_service_check.py
@@ -33,35 +33,42 @@ class TestMahoutClient(RMFTestCase):
target = RMFTestCase.TARGET_COMMON_SERVICES
 )
 
-self.assertResourceCalled('ExecuteHadoop', 'fs -rm -r -f 
/user/ambari-qa/mahoutsmokeoutput /user/ambari-qa/mahoutsmokeinput',
-  security_enabled = False,
-  keytab = UnknownConfigurationMock(),
-  conf_dir = '/usr/hdp/current/hadoop-client/conf',
-  try_sleep = 5,
-  kinit_path_local = '/usr/bin/kinit',
-  tries = 3,
- 

[4/5] ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index bfd4e74..6edca7d 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -22,6 +22,7 @@ from resource_management import *
 from resource_management.libraries import functions
 import sys
 import os
+import glob
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons import OSConst
 from urlparse import urlparse
@@ -81,18 +82,96 @@ def hive(name=None):
 
   if name == 'hiveserver2':
 
-params.HdfsDirectory(params.hive_apps_whs_dir,
- action=create_delayed,
- owner=params.hive_user,
- mode=0777
+if params.hdp_stack_version_major !=  and 
compare_versions(params.hdp_stack_version_major, '2.2') =0:
+  
params.HdfsResource(InlineTemplate(params.mapreduce_tar_destination).get_content(),
+  type=file,
+  action=create_on_execute,
+  source=params.mapreduce_tar_source,
+  group=params.user_group,
+  mode=params.tarballs_mode
+  )
+
+if params.hdp_stack_version_major !=  and 
compare_versions(params.hdp_stack_version_major, 2.2.0.0)  0:
+  params.HdfsResource(params.webhcat_apps_dir,
+   type=directory,
+   action=create_on_execute,
+   owner=params.webhcat_user,
+   mode=0755
+  )
+  
+if params.hcat_hdfs_user_dir != params.webhcat_hdfs_user_dir:
+  params.HdfsResource(params.hcat_hdfs_user_dir,
+   type=directory,
+   action=create_on_execute,
+   owner=params.hcat_user,
+   mode=params.hcat_hdfs_user_mode
+  )
+params.HdfsResource(params.webhcat_hdfs_user_dir,
+ type=directory,
+ action=create_on_execute,
+ owner=params.webhcat_user,
+ mode=params.webhcat_hdfs_user_mode
+)
+  
+for src_filepath in glob.glob(params.hadoop_streaming_tar_source):
+  src_filename = os.path.basename(src_filepath)
+  
params.HdfsResource(InlineTemplate(params.hadoop_streaming_tar_destination_dir).get_content()
 + '/' + src_filename,
+  type=file,
+  action=create_on_execute,
+  source=src_filepath,
+  group=params.user_group,
+  mode=params.tarballs_mode
+  )
+  
+if (os.path.isfile(params.pig_tar_source)):
+  
params.HdfsResource(InlineTemplate(params.pig_tar_destination).get_content(),
+  type=file,
+  action=create_on_execute,
+  source=params.pig_tar_source,
+  group=params.user_group,
+  mode=params.tarballs_mode
+  )
+  
+
params.HdfsResource(InlineTemplate(params.hive_tar_destination).get_content(),
+type=file,
+action=create_on_execute,
+source=params.hive_tar_source,
+group=params.user_group,
+mode=params.tarballs_mode
+)
+ 
+for src_filepath in glob.glob(params.sqoop_tar_source):
+  src_filename = os.path.basename(src_filepath)
+  
params.HdfsResource(InlineTemplate(params.sqoop_tar_destination_dir).get_content()
 + '/' + src_filename,
+  type=file,
+  action=create_on_execute,
+  source=src_filepath,
+  group=params.user_group,
+  mode=params.tarballs_mode
+  )
+  
+params.HdfsResource(params.hive_apps_whs_dir,
+ type=directory,
+  action=create_on_execute,
+  owner=params.hive_user,
+  mode=0777
 )
-params.HdfsDirectory(params.hive_hdfs_user_dir,
- action=create_delayed,
- owner=params.hive_user,
- mode=params.hive_hdfs_user_mode
+params.HdfsResource(params.hive_hdfs_user_dir,
+ type=directory,
+  action=create_on_execute,
+ 

[2/5] ambari git commit: AMBARI-11034. Implement HdfsResouces and it's usage (aonishuk)

2015-05-08 Thread aonishuk
http://git-wip-us.apache.org/repos/asf/ambari/blob/6e8dce44/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py 
b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
index 3fa1c9c..f2d7edb 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
@@ -117,37 +117,6 @@ class TestWebHCatServer(RMFTestCase):
 self.assertNoMoreResources()
 
   def assert_configure_default(self):
-self.assertResourceCalled('HdfsDirectory', '/apps/webhcat',
-  security_enabled = False,
-  keytab = UnknownConfigurationMock(),
-  conf_dir = '/etc/hadoop/conf',
-  hdfs_user = 'hdfs',
-  kinit_path_local = /usr/bin/kinit,
-  mode = 0755,
-  owner = 'hcat',
-  bin_dir = '/usr/bin',
-  action = ['create_delayed'],
-  )
-self.assertResourceCalled('HdfsDirectory', '/user/hcat',
-  security_enabled = False,
-  keytab = UnknownConfigurationMock(),
-  conf_dir = '/etc/hadoop/conf',
-  hdfs_user = 'hdfs',
-  kinit_path_local = /usr/bin/kinit,
-  mode = 0755,
-  owner = 'hcat',
-  bin_dir = '/usr/bin',
-  action = ['create_delayed'],
-  )
-self.assertResourceCalled('HdfsDirectory', None,
-  security_enabled = False,
-  keytab = UnknownConfigurationMock(),
-  conf_dir = '/etc/hadoop/conf',
-  hdfs_user = 'hdfs',
-  kinit_path_local = /usr/bin/kinit,
-  bin_dir = '/usr/bin',
-  action = ['create'],
-  )
 self.assertResourceCalled('Directory', '/var/run/webhcat',
   owner = 'hcat',
   group = 'hadoop',
@@ -165,42 +134,6 @@ class TestWebHCatServer(RMFTestCase):
   group = 'hadoop',
   recursive = True,
   )
-self.assertResourceCalled('CopyFromLocal', 
'/usr/lib/hadoop-mapreduce/hadoop-streaming-*.jar',
-  owner='hcat',
-  mode=0755,
-  dest_dir='/apps/webhcat',
-  kinnit_if_needed='',
-  hadoop_conf_dir='/etc/hadoop/conf',
-  hadoop_bin_dir='/usr/bin',
-  hdfs_user='hdfs'
-)
-self.assertResourceCalled('CopyFromLocal', 
'/usr/share/HDP-webhcat/pig.tar.gz',
-  owner='hcat',
-  mode=0755,
-  dest_dir='/apps/webhcat',
-  kinnit_if_needed='',
-  hadoop_conf_dir='/etc/hadoop/conf',
-  hadoop_bin_dir='/usr/bin',
-  hdfs_user='hdfs'
-)
-self.assertResourceCalled('CopyFromLocal', 
'/usr/share/HDP-webhcat/hive.tar.gz',
-  owner='hcat',
-  mode=0755,
-  dest_dir='/apps/webhcat',
-  kinnit_if_needed='',
-  hadoop_bin_dir='/usr/bin',
-  hadoop_conf_dir='/etc/hadoop/conf',
-  hdfs_user='hdfs'
-)
-self.assertResourceCalled('CopyFromLocal', 
'/usr/share/HDP-webhcat/sqoop*.tar.gz',
-  owner='hcat',
-  mode=0755,
-  dest_dir='/apps/webhcat',
-  kinnit_if_needed='',
-  hadoop_bin_dir='/usr/bin',
-  hadoop_conf_dir='/etc/hadoop/conf',
-  hdfs_user='hdfs'
-)
 self.assertResourceCalled('XmlConfig', 'webhcat-site.xml',
   owner = 'hcat',
   group = 'hadoop',
@@ -225,37 +158,6 @@ class TestWebHCatServer(RMFTestCase):
   )
 
   def assert_configure_secured(self):
-self.assertResourceCalled('HdfsDirectory', '/apps/webhcat',
-