ambari git commit: AMBARI-19722. Wizard modals are closed before confirmation popup appears (onechiporenko)

2017-01-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 22d4e1816 -> a1f625f26


AMBARI-19722. Wizard modals are closed before confirmation popup appears 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: a1f625f265b99634a4c18e7c7c69a88302b286a0
Parents: 22d4e18
Author: Oleg Nechiporenko 
Authored: Thu Jan 26 11:03:39 2017 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Jan 27 10:07:11 2017 +0200

--
 ambari-web/app/views/common/modal_popup.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f625f2/ambari-web/app/views/common/modal_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index 47b7d61..2f2dc1c 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -86,6 +86,7 @@ App.ModalPopup = Ember.View.extend({
 var firstInputElement = this.$('#modal').find(':input').not(':disabled, 
.no-autofocus').first();
 if (!$.mocho) {
   this.$('#modal').modal({
+keyboard: false,
 backdrop: false
   });
 }



ambari git commit: AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger Usersync (mugdha)

2017-01-27 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8934da1e1 -> c8e1de31b


AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger 
Usersync (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: c8e1de31be35891d3d8d3dc383b76d26a867601c
Parents: 8934da1
Author: Mugdha Varadkar 
Authored: Wed Jan 25 17:04:37 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 15:16:15 2017 +0530

--
 .../0.7.0/configuration/ranger-ugsync-site.xml  | 33 ++
 .../stacks/HDP/2.6/services/stack_advisor.py| 36 ++-
 .../stacks/2.6/common/test_stack_advisor.py | 67 
 3 files changed, 134 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c8e1de31/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
index 775b5ca..15ee9fd 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
@@ -39,4 +39,37 @@
 
 
   
+
+  
+ranger.usersync.group.searchenabled
+Enable Group Sync
+false
+"# do we want to do ldapsearch to find groups instead of 
relying on user entry attributes
+# valid values: true, false
+# any value other than true would be treated as false
+# default value: false"
+
+  true
+  value-list
+  false
+  
+
+  true
+  Yes
+
+
+  false
+  No
+
+  
+  1
+
+
+  
+ranger-ugsync-site
+ranger.usersync.ldap.deltasync
+  
+
+
+  
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c8e1de31/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index 465f218..957d625 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -32,7 +32,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childRecommendConfDict = {
   "DRUID": self.recommendDruidConfigurations,
   "ATLAS": self.recommendAtlasConfigurations,
-  "TEZ": self.recommendTezConfigurations
+  "TEZ": self.recommendTezConfigurations,
+  "RANGER": self.recommendRangerConfigurations
   }
   parentRecommendConfDict.update(childRecommendConfDict)
   return parentRecommendConfDict
@@ -185,7 +186,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childValidators = {
   "DRUID": {"druid-env": self.validateDruidEnvConfigurations,
 "druid-historical": 
self.validateDruidHistoricalConfigurations,
-"druid-broker": self.validateDruidBrokerConfigurations}
+"druid-broker": self.validateDruidBrokerConfigurations},
+  "RANGER": {"ranger-ugsync-site": 
self.validateRangerUsersyncConfigurations}
   }
   self.mergeValidators(parentValidators, childValidators)
   return parentValidators
@@ -246,3 +248,33 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 tez_jvm_updated_opts = tez_jvm_opts + jvmGCParams + "{{heap_dump_opts}}"
 putTezProperty('tez.task.launch.cmd-opts', tez_jvm_updated_opts)
 Logger.info("Updated 'tez-site' config 'tez.task.launch.cmd-opts' as : 
{0}".format(tez_jvm_updated_opts))
+
+  def recommendRangerConfigurations(self, configurations, clusterData, 
services, hosts):
+super(HDP26StackAdvisor, 
self).recommendRangerConfigurations(configurations, clusterData, services, 
hosts)
+
+putRangerUgsyncSite = self.putProperty(configurations, 
'ranger-ugsync-site', services)
+
+delta_sync_enabled = False
+if 'ranger-ugsync-site' in services['configurations'] and 
'ranger.usersync.ldap.deltasync' in 
services['configurations']['ranger-ugsync-site']['properties']:
+  delta_sync_enabled = 
services['configurations']['ranger-ugsync-site']['properties']['ranger.usersync.ldap.deltasync']
 

ambari git commit: AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger Usersync (mugdha)

2017-01-27 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk a1f625f26 -> 9ebe17013


AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger 
Usersync (mugdha)


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

Branch: refs/heads/trunk
Commit: 9ebe17013bab33eceec5ff2009a87da68c135ef2
Parents: a1f625f
Author: Mugdha Varadkar 
Authored: Wed Jan 25 17:04:37 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 15:19:19 2017 +0530

--
 .../0.7.0/configuration/ranger-ugsync-site.xml  | 33 ++
 .../stacks/HDP/2.6/services/stack_advisor.py| 36 ++-
 .../stacks/2.6/common/test_stack_advisor.py | 67 
 3 files changed, 134 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ebe1701/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
index 775b5ca..15ee9fd 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
@@ -39,4 +39,37 @@
 
 
   
+
+  
+ranger.usersync.group.searchenabled
+Enable Group Sync
+false
+"# do we want to do ldapsearch to find groups instead of 
relying on user entry attributes
+# valid values: true, false
+# any value other than true would be treated as false
+# default value: false"
+
+  true
+  value-list
+  false
+  
+
+  true
+  Yes
+
+
+  false
+  No
+
+  
+  1
+
+
+  
+ranger-ugsync-site
+ranger.usersync.ldap.deltasync
+  
+
+
+  
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/9ebe1701/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index 465f218..957d625 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -32,7 +32,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childRecommendConfDict = {
   "DRUID": self.recommendDruidConfigurations,
   "ATLAS": self.recommendAtlasConfigurations,
-  "TEZ": self.recommendTezConfigurations
+  "TEZ": self.recommendTezConfigurations,
+  "RANGER": self.recommendRangerConfigurations
   }
   parentRecommendConfDict.update(childRecommendConfDict)
   return parentRecommendConfDict
@@ -185,7 +186,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childValidators = {
   "DRUID": {"druid-env": self.validateDruidEnvConfigurations,
 "druid-historical": 
self.validateDruidHistoricalConfigurations,
-"druid-broker": self.validateDruidBrokerConfigurations}
+"druid-broker": self.validateDruidBrokerConfigurations},
+  "RANGER": {"ranger-ugsync-site": 
self.validateRangerUsersyncConfigurations}
   }
   self.mergeValidators(parentValidators, childValidators)
   return parentValidators
@@ -246,3 +248,33 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 tez_jvm_updated_opts = tez_jvm_opts + jvmGCParams + "{{heap_dump_opts}}"
 putTezProperty('tez.task.launch.cmd-opts', tez_jvm_updated_opts)
 Logger.info("Updated 'tez-site' config 'tez.task.launch.cmd-opts' as : 
{0}".format(tez_jvm_updated_opts))
+
+  def recommendRangerConfigurations(self, configurations, clusterData, 
services, hosts):
+super(HDP26StackAdvisor, 
self).recommendRangerConfigurations(configurations, clusterData, services, 
hosts)
+
+putRangerUgsyncSite = self.putProperty(configurations, 
'ranger-ugsync-site', services)
+
+delta_sync_enabled = False
+if 'ranger-ugsync-site' in services['configurations'] and 
'ranger.usersync.ldap.deltasync' in 
services['configurations']['ranger-ugsync-site']['properties']:
+  delta_sync_enabled = 
services['configurations']['ranger-ugsync-site']['properties']['ranger.usersync.ldap.deltasync']
 == "true"

ambari git commit: AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate with external Ranger (mugdha)

2017-01-27 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c8e1de31b -> 46f2731cc


AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate 
with external Ranger (mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 46f2731ccc89a3d845cbe705719c4844f52a448d
Parents: c8e1de3
Author: Mugdha Varadkar 
Authored: Fri Jan 27 12:10:55 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 16:15:33 2017 +0530

--
 .../package/scripts/setup_ranger_hive_interactive.py   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/46f2731c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
index 2cbe952..de2e580 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
@@ -22,7 +22,7 @@ from resource_management.core.logger import Logger
 def setup_ranger_hive_interactive(upgrade_type = None):
   import params
 
-  if params.has_ranger_admin:
+  if params.enable_ranger_hive:
 
 stack_version = None
 
@@ -34,7 +34,7 @@ def setup_ranger_hive_interactive(upgrade_type = None):
 else:
   Logger.info("Hive2: Setup ranger: command retry not enabled thus 
skipping if ranger admin is down !")
 
-if params.xml_configurations_supported and params.enable_ranger_hive and 
params.xa_audit_hdfs_is_enabled:
+if params.xml_configurations_supported and params.xa_audit_hdfs_is_enabled:
   params.HdfsResource("/ranger/audit",
  type="directory",
  action="create_on_execute",
@@ -74,4 +74,4 @@ def setup_ranger_hive_interactive(upgrade_type = None):
   component_user_principal=params.hive_principal if 
params.security_enabled else None,
   component_user_keytab=params.hive_server2_keytab if 
params.security_enabled else None)
   else:
-Logger.info('Ranger admin not installed')
+Logger.info('Ranger Hive plugin is not enabled')



ambari git commit: AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate with external Ranger (mugdha)

2017-01-27 Thread mugdha
Repository: ambari
Updated Branches:
  refs/heads/trunk 9ebe17013 -> 2be01fbf1


AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate 
with external Ranger (mugdha)


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

Branch: refs/heads/trunk
Commit: 2be01fbf1a22b8bf7bc5a8744196c0f8ed8bbd86
Parents: 9ebe170
Author: Mugdha Varadkar 
Authored: Fri Jan 27 12:10:55 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 16:17:22 2017 +0530

--
 .../package/scripts/setup_ranger_hive_interactive.py   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2be01fbf/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
index 2cbe952..de2e580 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
@@ -22,7 +22,7 @@ from resource_management.core.logger import Logger
 def setup_ranger_hive_interactive(upgrade_type = None):
   import params
 
-  if params.has_ranger_admin:
+  if params.enable_ranger_hive:
 
 stack_version = None
 
@@ -34,7 +34,7 @@ def setup_ranger_hive_interactive(upgrade_type = None):
 else:
   Logger.info("Hive2: Setup ranger: command retry not enabled thus 
skipping if ranger admin is down !")
 
-if params.xml_configurations_supported and params.enable_ranger_hive and 
params.xa_audit_hdfs_is_enabled:
+if params.xml_configurations_supported and params.xa_audit_hdfs_is_enabled:
   params.HdfsResource("/ranger/audit",
  type="directory",
  action="create_on_execute",
@@ -74,4 +74,4 @@ def setup_ranger_hive_interactive(upgrade_type = None):
   component_user_principal=params.hive_principal if 
params.security_enabled else None,
   component_user_keytab=params.hive_server2_keytab if 
params.security_enabled else None)
   else:
-Logger.info('Ranger admin not installed')
+Logger.info('Ranger Hive plugin is not enabled')



ambari git commit: AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and Auth scheme. (Attila Magyar via stoader)

2017-01-27 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/trunk 2be01fbf1 -> 16c0b68e6


AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and 
Auth scheme. (Attila Magyar via stoader)


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

Branch: refs/heads/trunk
Commit: 16c0b68e6c60c84bef37ba566bce7a2ba349dbff
Parents: 2be01fb
Author: Attila Magyar 
Authored: Fri Jan 27 12:35:27 2017 +0100
Committer: Toader, Sebastian 
Committed: Fri Jan 27 12:35:47 2017 +0100

--
 .../package/scripts/metadata_server.py  | 13 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  4 +
 .../stacks/HDP/2.6/services/ATLAS/kerberos.json | 97 
 3 files changed, 113 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
index 36d990d..ad3270e 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
@@ -37,7 +37,7 @@ from resource_management.libraries.functions.constants import 
StackFeature
 from resource_management.core.resources.system import Directory
 from resource_management.core.logger import Logger
 from setup_ranger_atlas import setup_ranger_atlas
-
+from resource_management.core.resources.zkmigrator import ZkMigrator
 
 class MetadataServer(Script):
 
@@ -152,6 +152,17 @@ class MetadataServer(Script):
 
 File(params.pid_file, action="delete")
 
+  def disable_security(self, env):
+import params
+if not params.stack_supports_zk_security:
+  Logger.info("Stack doesn't support zookeeper security")
+  return
+if not params.zookeeper_quorum:
+  Logger.info("No zookeeper connection string. Skipping reverting ACL")
+  return
+zkmigrator = ZkMigrator(params.zookeeper_quorum, params.java_exec, 
params.java64_home, params.atlas_jaas_file, params.metadata_user)
+zkmigrator.set_acls(params.zk_root if params.zk_root.startswith('/') else 
'/' + params.zk_root, 'world:anyone:crdwa')
+
   def status(self, env):
 import status_params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index afd6dde..682fc9f 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -81,6 +81,9 @@ cluster_name = config['clusterName']
 
 java_version = expect("/hostLevelParams/java_version", int)
 
+zk_root = 
default('/configurations/application-properties/atlas.server.ha.zookeeper.zkroot',
 '/apache_atlas')
+stack_supports_zk_security = 
check_stack_feature(StackFeature.SECURE_ZOOKEEPER, 
version_for_stack_feature_checks)
+
 if security_enabled:
   _hostname_lowercase = config['hostname'].lower()
   _atlas_principal_name = 
config['configurations']['application-properties']['atlas.authentication.principal']
@@ -115,6 +118,7 @@ user_group = 
config['configurations']['cluster-env']['user_group']
 
 # metadata env
 java64_home = config['hostLevelParams']['java_home']
+java_exec = format("{java64_home}/bin/java")
 env_sh_template = config['configurations']['atlas-env']['content']
 
 # credential provider

http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
new file mode 100644
index 000..1cc581f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
@@ -0,0 +1,97 @@
+{
+  "services": [
+{
+  "name": "ATLAS",
+  "configurations": [
+{
+  "applica

ambari git commit: AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and Auth scheme. (Attila Magyar via stoader)

2017-01-27 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 46f2731cc -> 0987e5ee1


AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and 
Auth scheme. (Attila Magyar via stoader)


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

Branch: refs/heads/branch-2.5
Commit: 0987e5ee1c40a7943d5c697bad4067e7319089e7
Parents: 46f2731
Author: Attila Magyar 
Authored: Fri Jan 27 12:35:27 2017 +0100
Committer: Toader, Sebastian 
Committed: Fri Jan 27 12:39:30 2017 +0100

--
 .../package/scripts/metadata_server.py  | 13 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  4 +
 .../stacks/HDP/2.6/services/ATLAS/kerberos.json | 97 
 3 files changed, 113 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0987e5ee/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
index 833f5d3..2cfb25b 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
@@ -35,7 +35,7 @@ from resource_management.libraries.functions import 
StackFeature
 from resource_management.core.resources.system import Directory
 from resource_management.core.logger import Logger
 from setup_ranger_atlas import setup_ranger_atlas
-
+from resource_management.core.resources.zkmigrator import ZkMigrator
 
 class MetadataServer(Script):
 
@@ -150,6 +150,17 @@ class MetadataServer(Script):
 
 File(params.pid_file, action="delete")
 
+  def disable_security(self, env):
+import params
+if not params.stack_supports_zk_security:
+  Logger.info("Stack doesn't support zookeeper security")
+  return
+if not params.zookeeper_quorum:
+  Logger.info("No zookeeper connection string. Skipping reverting ACL")
+  return
+zkmigrator = ZkMigrator(params.zookeeper_quorum, params.java_exec, 
params.java64_home, params.atlas_jaas_file, params.metadata_user)
+zkmigrator.set_acls(params.zk_root if params.zk_root.startswith('/') else 
'/' + params.zk_root, 'world:anyone:crdwa')
+
   def status(self, env):
 import status_params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0987e5ee/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index c344b63..4436ec9 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -79,6 +79,9 @@ cluster_name = config['clusterName']
 
 java_version = expect("/hostLevelParams/java_version", int)
 
+zk_root = 
default('/configurations/application-properties/atlas.server.ha.zookeeper.zkroot',
 '/apache_atlas')
+stack_supports_zk_security = 
check_stack_feature(StackFeature.SECURE_ZOOKEEPER, 
version_for_stack_feature_checks)
+
 if security_enabled:
   _hostname_lowercase = config['hostname'].lower()
   _atlas_principal_name = 
config['configurations']['application-properties']['atlas.authentication.principal']
@@ -113,6 +116,7 @@ user_group = 
config['configurations']['cluster-env']['user_group']
 
 # metadata env
 java64_home = config['hostLevelParams']['java_home']
+java_exec = format("{java64_home}/bin/java")
 env_sh_template = config['configurations']['atlas-env']['content']
 
 # credential provider

http://git-wip-us.apache.org/repos/asf/ambari/blob/0987e5ee/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
new file mode 100644
index 000..1cc581f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
@@ -0,0 +1,97 @@
+{
+  "services": [
+{
+  "name": "ATLAS",
+  "configurations": [
+{
+  "applica

[2/2] ambari git commit: pick e3e9ab0a6 gradle - use custom testng suite AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dly

2017-01-27 Thread dmitriusan
pick e3e9ab0a6 gradle - use custom testng suite
AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)


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

Branch: refs/heads/branch-2.5
Commit: 31527a01564d337986568e58d0d49122a5f952a4
Parents: 0987e5e
Author: Lisnichenko Dmitro 
Authored: Fri Jan 27 14:07:23 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Jan 27 14:07:23 2017 +0200

--
 .../UpdateKerberosConfigsServerActionTest.java | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/31527a01/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index 98b3f00..710f474 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.util.Collection;
@@ -163,8 +163,15 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 action.setExecutionCommand(executionCommand);
 action.execute(null);
 
-assertEquals(configTypes.getValue(), "cluster-env");
-assertEquals(configUpdates.getValue().get("security_enabled"), "false");
+assertTrue(configTypes.getValues().contains("cluster-env"));
+boolean containsSecurityEnabled = false;
+for(Map properties: configUpdates.getValues()) {
+  if(properties.containsKey("security_enabled")) {
+containsSecurityEnabled = true;
+break;
+  }
+}
+assertTrue(containsSecurityEnabled);
 verifyAll();
   }
 



[1/2] ambari git commit: AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)

2017-01-27 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0987e5ee1 -> 31527a015
  refs/heads/trunk 16c0b68e6 -> cc30798a6


AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: cc30798a6f1428fbe2a2dd6c64cac2c128cf9a23
Parents: 16c0b68
Author: Lisnichenko Dmitro 
Authored: Fri Jan 27 14:06:49 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Jan 27 14:06:49 2017 +0200

--
 .../UpdateKerberosConfigsServerActionTest.java| 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc30798a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index e756491..c8ebb63 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.util.Collection;
@@ -43,7 +43,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -165,8 +164,15 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 action.setExecutionCommand(executionCommand);
 action.execute(null);
 
-assertEquals(configTypes.getValue(), "cluster-env");
-assertEquals(configUpdates.getValue().get("security_enabled"), "false");
+assertTrue(configTypes.getValues().contains("cluster-env"));
+boolean containsSecurityEnabled = false;
+for(Map properties: configUpdates.getValues()) {
+  if(properties.containsKey("security_enabled")) {
+containsSecurityEnabled = true;
+break;
+  }
+}
+assertTrue(containsSecurityEnabled);
 verifyAll();
   }
 



ambari git commit: AMBARI-19742. User preference like opened tabs/work in-progress should not be available to a different user. (Venkata Sairam via gauravn7)

2017-01-27 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 31527a015 -> 650b88d44


AMBARI-19742. User preference like opened tabs/work in-progress should not be 
available to a different user. (Venkata Sairam via gauravn7)


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

Branch: refs/heads/branch-2.5
Commit: 650b88d44b89e8544c751ff8778a839bd9b702ef
Parents: 31527a0
Author: Gaurav Nagar 
Authored: Fri Jan 27 19:26:33 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 19:26:33 2017 +0530

--
 .../ui/app/components/bundle-config.js  | 27 ++---
 .../resources/ui/app/components/coord-config.js | 64 +++-
 .../ui/app/components/designer-workspace.js | 25 
 .../ui/app/components/flow-designer.js  | 12 ++--
 .../main/resources/ui/app/services/user-info.js | 56 +
 .../ui/app/services/workspace-manager.js| 61 ++-
 .../ui/tests/unit/services/user-info-test.js| 29 +
 7 files changed, 207 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/650b88d4/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index e29935c..8b4c3d8 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -48,23 +48,19 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   fileBrowser : Ember.inject.service('file-browser'),
   workspaceManager : Ember.inject.service('workspace-manager'),
   initialize : function(){
-var draftBundle = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftBundle){
-  this.set('bundle', JSON.parse(draftBundle));
-}else{
-  this.set('bundle', this.createBundle());
-}
+var self = this;
+
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id')).promise.then(function(draftBundle){
+  self.loadBundle(draftBundle);
+}.bind(this)).catch(function(data){
+  self.loadBundle();
+}.bind(this));
 this.get('fileBrowser').on('fileBrowserOpened',function(context){
   this.get('fileBrowser').setContext(context);
 }.bind(this));
 this.on('fileSelected',function(fileName){
   this.set(this.get('filePathModel'), fileName);
 }.bind(this));
-if(Ember.isBlank(this.get('bundle.name'))){
-  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
-}
 this.set('showErrorMessage', false);
-this.schedulePersistWorkInProgress();
   }.on('init'),
   onDestroy : function(){
 Ember.run.cancel(this.schedulePersistWorkInProgress);
@@ -92,6 +88,17 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   bundleFilePath : Ember.computed('tabInfo.filePath', function(){
 return this.get('tabInfo.filePath');
   }),
+  loadBundle(draftBundle){
+if(draftBundle){
+  this.set('bundle', JSON.parse(draftBundle));
+}else{
+  this.set('bundle', this.createBundle());
+}
+if(Ember.isBlank(this.get('bundle.name'))){
+  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
+}
+this.schedulePersistWorkInProgress();
+  }, 
   schedulePersistWorkInProgress (){
 Ember.run.later(function(){
   this.persistWorkInProgress();

http://git-wip-us.apache.org/repos/asf/ambari/blob/650b88d4/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index fa664c7..57dbeb0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -75,22 +75,13 @@ export default Ember.Component.extend(Validations, 
Ember.Evented, {
 this.persistWorkInProgress();
   }.on('willDestroyElement'),
   initialize : function(){
-var draftCoordinator = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftCoordinator){
-  this.set('coordinator', JSON.parse(draftCoordinator));
-}else{
-  this.set('coordinator', this.createNewCoordinator());
-}
-this.set('timeU

ambari git commit: AMBARI-19742. User preference like opened tabs/work in-progress should not be available to a different user. (Venkata Sairam via gauravn7)

2017-01-27 Thread gnagar
Repository: ambari
Updated Branches:
  refs/heads/trunk cc30798a6 -> fb9513877


AMBARI-19742. User preference like opened tabs/work in-progress should not be 
available to a different user. (Venkata Sairam via gauravn7)


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

Branch: refs/heads/trunk
Commit: fb951387706387651f3b31d34f4c16c9b4c9ec4a
Parents: cc30798
Author: Gaurav Nagar 
Authored: Fri Jan 27 19:26:33 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 19:29:25 2017 +0530

--
 .../ui/app/components/bundle-config.js  | 27 ++---
 .../resources/ui/app/components/coord-config.js | 64 +++-
 .../ui/app/components/designer-workspace.js | 25 
 .../ui/app/components/flow-designer.js  | 12 ++--
 .../main/resources/ui/app/services/user-info.js | 56 +
 .../ui/app/services/workspace-manager.js| 61 ++-
 .../ui/tests/unit/services/user-info-test.js| 29 +
 7 files changed, 207 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb951387/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index e29935c..8b4c3d8 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -48,23 +48,19 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   fileBrowser : Ember.inject.service('file-browser'),
   workspaceManager : Ember.inject.service('workspace-manager'),
   initialize : function(){
-var draftBundle = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftBundle){
-  this.set('bundle', JSON.parse(draftBundle));
-}else{
-  this.set('bundle', this.createBundle());
-}
+var self = this;
+
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id')).promise.then(function(draftBundle){
+  self.loadBundle(draftBundle);
+}.bind(this)).catch(function(data){
+  self.loadBundle();
+}.bind(this));
 this.get('fileBrowser').on('fileBrowserOpened',function(context){
   this.get('fileBrowser').setContext(context);
 }.bind(this));
 this.on('fileSelected',function(fileName){
   this.set(this.get('filePathModel'), fileName);
 }.bind(this));
-if(Ember.isBlank(this.get('bundle.name'))){
-  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
-}
 this.set('showErrorMessage', false);
-this.schedulePersistWorkInProgress();
   }.on('init'),
   onDestroy : function(){
 Ember.run.cancel(this.schedulePersistWorkInProgress);
@@ -92,6 +88,17 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   bundleFilePath : Ember.computed('tabInfo.filePath', function(){
 return this.get('tabInfo.filePath');
   }),
+  loadBundle(draftBundle){
+if(draftBundle){
+  this.set('bundle', JSON.parse(draftBundle));
+}else{
+  this.set('bundle', this.createBundle());
+}
+if(Ember.isBlank(this.get('bundle.name'))){
+  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
+}
+this.schedulePersistWorkInProgress();
+  }, 
   schedulePersistWorkInProgress (){
 Ember.run.later(function(){
   this.persistWorkInProgress();

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb951387/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index fa664c7..57dbeb0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -75,22 +75,13 @@ export default Ember.Component.extend(Validations, 
Ember.Evented, {
 this.persistWorkInProgress();
   }.on('willDestroyElement'),
   initialize : function(){
-var draftCoordinator = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftCoordinator){
-  this.set('coordinator', JSON.parse(draftCoordinator));
-}else{
-  this.set('coordinator', this.createNewCoordinator());
-}
-this.set('timeUnitOptions

ambari git commit: AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)

2017-01-27 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 650b88d44 -> d8ab5f55e


AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: d8ab5f55e694cfd2e354c63e5a86c279844d1301
Parents: 650b88d
Author: Vitaly Brodetskyi 
Authored: Fri Jan 27 17:36:28 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Fri Jan 27 17:36:28 2017 +0200

--
 ambari-server/conf/unix/ambari.properties  | 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8ab5f55/ambari-server/conf/unix/ambari.properties
--
diff --git a/ambari-server/conf/unix/ambari.properties 
b/ambari-server/conf/unix/ambari.properties
index 99fea741..74a3a09 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -34,8 +34,8 @@ jdk1.7.jcpol-file=UnlimitedJCEPolicyJDK7.zip
 jdk1.7.home=$ROOT/usr/jdk64/
 jdk1.7.re=(jdk.*)/jre
 jdk1.8.desc=Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
-jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz
-jdk1.8.dest-file=jdk-8u77-linux-x64.tar.gz
+jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz
+jdk1.8.dest-file=jdk-8u112-linux-x64.tar.gz
 
jdk1.8.jcpol-url=http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip
 jdk1.8.jcpol-file=jce_policy-8.zip
 jdk1.8.home=$ROOT/usr/jdk64/

http://git-wip-us.apache.org/repos/asf/ambari/blob/d8ab5f55/ambari-server/src/main/python/ambari_server/serverSetup.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py 
b/ambari-server/src/main/python/ambari_server/serverSetup.py
index cf91a6d..0658d18 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -741,9 +741,9 @@ class JDKSetupLinux(JDKSetup):
 super(JDKSetupLinux, self).__init__()
 self.JDK_DEFAULT_CONFIGS = [
   JDKRelease("jdk1.8", "Oracle JDK 1.8 + Java Cryptography Extension (JCE) 
Policy Files 8",
- 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz";, 
"jdk-8u77-linux-x64.tar.gz",
+ 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz";, 
"jdk-8u112-linux-x64.tar.gz",
  
"http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip";, 
"jce_policy-8.zip",
- AmbariPath.get("/usr/jdk64/jdk1.8.0_77"),
+ AmbariPath.get("/usr/jdk64/jdk1.8.0_112"),
  "(jdk.*)/jre")
 ]
 



ambari git commit: AMBARI-19700. When hiveserver2 LDAP authentication is enabled hive.server2.authentication.ldap.url property gets exported with hardcoded hostname. (Amruta Borkar via rnettleton)

2017-01-27 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/trunk fb9513877 -> ad195c25d


AMBARI-19700. When hiveserver2 LDAP authentication is enabled 
hive.server2.authentication.ldap.url property gets exported with hardcoded 
hostname. (Amruta Borkar via rnettleton)


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

Branch: refs/heads/trunk
Commit: ad195c25df7360dde9d18348d3db0bb9e212a4b4
Parents: fb95138
Author: Bob Nettleton 
Authored: Fri Jan 27 10:43:32 2017 -0500
Committer: Bob Nettleton 
Committed: Fri Jan 27 10:43:32 2017 -0500

--
 .../controller/internal/BlueprintConfigurationProcessor.java  | 1 +
 .../controller/internal/BlueprintConfigurationProcessorTest.java  | 3 +++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad195c25/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 25d6145..d4880b9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -2488,6 +2488,7 @@ public class BlueprintConfigurationProcessor {
 yarnSiteMap.put("yarn.timeline-service.webapp.https.address", new 
SingleHostTopologyUpdater("APP_TIMELINE_SERVER"));
 
 // HIVE_SERVER
+hiveSiteMap.put("hive.server2.authentication.ldap.url", new 
SingleHostTopologyUpdater("HIVE_SERVER2"));
 multiHiveSiteMap.put("hive.metastore.uris", new 
MultipleHostTopologyUpdater("HIVE_METASTORE", ',', true, true, true));
 dbHiveSiteMap.put("javax.jdo.option.ConnectionURL",
 new DBTopologyUpdater("MYSQL_SERVER", "hive-env", "hive_database"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad195c25/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index 0ad0351..928d1e0 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -1571,6 +1571,7 @@ public class BlueprintConfigurationProcessorTest {
 
 // setup properties that include host information
 hiveSiteProperties.put("hive.metastore.uris", "thrift://" + 
expectedHostName + ":" + expectedPortNum + "," + "thrift://" + 
expectedHostNameTwo + ":" + expectedPortNum);
+hiveSiteProperties.put("hive.server2.authentication.ldap.url", 
"ldap://myexternalhost.com:1389";);
 hiveSiteProperties.put("javax.jdo.option.ConnectionURL", expectedHostName 
+ ":" + expectedPortNum);
 hiveSiteProperties.put("hive.zookeeper.quorum", expectedHostName + ":" + 
expectedPortNum + "," + expectedHostNameTwo + ":" + expectedPortNum);
 
hiveSiteProperties.put("hive.cluster.delegation.token.store.zookeeper.connectString",
 expectedHostName + ":" + expectedPortNum + "," + expectedHostNameTwo + ":" + 
expectedPortNum);
@@ -1624,6 +1625,8 @@ public class BlueprintConfigurationProcessorTest {
 assertEquals("hive property not properly exported",
 createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.hive.hosts"));
 
+assertFalse("hive.server2.authentication.ldap.url should not have been 
present in the exported configuration",
+
hiveSiteProperties.containsKey("hive.server2.authentication.ldap.url"));
 assertEquals("hive property not properly exported",
   createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.HTTP.hosts"));
 



ambari git commit: AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)

2017-01-27 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk ad195c25d -> 34d029bf9


AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 34d029bf9cd665312de4c6d4c54a21bc9ea83858
Parents: ad195c2
Author: Vitaly Brodetskyi 
Authored: Fri Jan 27 17:55:12 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Fri Jan 27 17:56:00 2017 +0200

--
 ambari-server/conf/unix/ambari.properties  | 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34d029bf/ambari-server/conf/unix/ambari.properties
--
diff --git a/ambari-server/conf/unix/ambari.properties 
b/ambari-server/conf/unix/ambari.properties
index ca8ae77..f16402e 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -34,8 +34,8 @@ jdk1.7.jcpol-file=UnlimitedJCEPolicyJDK7.zip
 jdk1.7.home=$ROOT/usr/jdk64/
 jdk1.7.re=(jdk.*)/jre
 jdk1.8.desc=Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
-jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz
-jdk1.8.dest-file=jdk-8u77-linux-x64.tar.gz
+jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz
+jdk1.8.dest-file=jdk-8u112-linux-x64.tar.gz
 
jdk1.8.jcpol-url=http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip
 jdk1.8.jcpol-file=jce_policy-8.zip
 jdk1.8.home=$ROOT/usr/jdk64/

http://git-wip-us.apache.org/repos/asf/ambari/blob/34d029bf/ambari-server/src/main/python/ambari_server/serverSetup.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py 
b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 7e2167d..adb5885 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -742,9 +742,9 @@ class JDKSetupLinux(JDKSetup):
 super(JDKSetupLinux, self).__init__()
 self.JDK_DEFAULT_CONFIGS = [
   JDKRelease("jdk1.8", "Oracle JDK 1.8 + Java Cryptography Extension (JCE) 
Policy Files 8",
- 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz";, 
"jdk-8u77-linux-x64.tar.gz",
+ 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz";, 
"jdk-8u112-linux-x64.tar.gz",
  
"http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip";, 
"jce_policy-8.zip",
- AmbariPath.get("/usr/jdk64/jdk1.8.0_77"),
+ AmbariPath.get("/usr/jdk64/jdk1.8.0_112"),
  "(jdk.*)/jre")
 ]
 



ambari git commit: AMBARI-19728: Custom command name rendered incorrectly (dili)

2017-01-27 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/trunk 34d029bf9 -> 77937e383


AMBARI-19728: Custom command name rendered incorrectly (dili)


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

Branch: refs/heads/trunk
Commit: 77937e383d6ed0e582192e3a75913f60a32dc0eb
Parents: 34d029b
Author: Di Li 
Authored: Fri Jan 27 11:19:29 2017 -0500
Committer: Di Li 
Committed: Fri Jan 27 11:19:29 2017 -0500

--
 ambari-web/app/utils/helper.js   | 1 +
 ambari-web/test/utils/helper_test.js | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77937e38/ambari-web/app/utils/helper.js
--
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index 927f8a6..f6f2532 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -592,6 +592,7 @@ App.format = {
 name = name.split(separator).map(function(singleName) {
   return this.normalizeName(singleName.toUpperCase());
 }, this).join(' ');
+break;
   }
 }
 return name.capitalize();

http://git-wip-us.apache.org/repos/asf/ambari/blob/77937e38/ambari-web/test/utils/helper_test.js
--
diff --git a/ambari-web/test/utils/helper_test.js 
b/ambari-web/test/utils/helper_test.js
index b438a7a..4b9ec36 100644
--- a/ambari-web/test/utils/helper_test.js
+++ b/ambari-web/test/utils/helper_test.js
@@ -298,6 +298,8 @@ describe('utils/helper', function() {
   'app-timeline-server': 'App Timeline Server',
   'APP TIMELINE SERVER': 'App Timeline Server',
   'app timeline server': 'App Timeline Server',
+  'run-hcat-sync': 'Run HCat Client Sync',
+  'rUN_hCAt_syNc': 'Run HCat Client Sync',
   'FALCON': 'Falcon',
   'falcon': 'Falcon'
 };



ambari git commit: AMBARI-19700. When hiveserver2 LDAP authentication is enabled hive.server2.authentication.ldap.url property gets exported with hardcoded hostname. (Amruta Borkar via rnettleton)

2017-01-27 Thread rnettleton
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d8ab5f55e -> 3099b2ed9


AMBARI-19700. When hiveserver2 LDAP authentication is enabled 
hive.server2.authentication.ldap.url property gets exported with hardcoded 
hostname. (Amruta Borkar via rnettleton)


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

Branch: refs/heads/branch-2.5
Commit: 3099b2ed92eb066b1c311e4937ea477ab416aafd
Parents: d8ab5f5
Author: Bob Nettleton 
Authored: Fri Jan 27 11:30:56 2017 -0500
Committer: Bob Nettleton 
Committed: Fri Jan 27 11:30:56 2017 -0500

--
 .../controller/internal/BlueprintConfigurationProcessor.java  | 1 +
 .../controller/internal/BlueprintConfigurationProcessorTest.java  | 3 +++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3099b2ed/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index ad27b0d..e604598 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -2491,6 +2491,7 @@ public class BlueprintConfigurationProcessor {
 yarnSiteMap.put("yarn.timeline-service.webapp.https.address", new 
SingleHostTopologyUpdater("APP_TIMELINE_SERVER"));
 
 // HIVE_SERVER
+hiveSiteMap.put("hive.server2.authentication.ldap.url", new 
SingleHostTopologyUpdater("HIVE_SERVER2"));
 multiHiveSiteMap.put("hive.metastore.uris", new 
MultipleHostTopologyUpdater("HIVE_METASTORE", ',', true, true, true));
 dbHiveSiteMap.put("javax.jdo.option.ConnectionURL",
 new DBTopologyUpdater("MYSQL_SERVER", "hive-env", "hive_database"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/3099b2ed/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index 02a2851..2840a31 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -1571,6 +1571,7 @@ public class BlueprintConfigurationProcessorTest {
 
 // setup properties that include host information
 hiveSiteProperties.put("hive.metastore.uris", "thrift://" + 
expectedHostName + ":" + expectedPortNum + "," + "thrift://" + 
expectedHostNameTwo + ":" + expectedPortNum);
+hiveSiteProperties.put("hive.server2.authentication.ldap.url", 
"ldap://myexternalhost.com:1389";);
 hiveSiteProperties.put("javax.jdo.option.ConnectionURL", expectedHostName 
+ ":" + expectedPortNum);
 hiveSiteProperties.put("hive.zookeeper.quorum", expectedHostName + ":" + 
expectedPortNum + "," + expectedHostNameTwo + ":" + expectedPortNum);
 
hiveSiteProperties.put("hive.cluster.delegation.token.store.zookeeper.connectString",
 expectedHostName + ":" + expectedPortNum + "," + expectedHostNameTwo + ":" + 
expectedPortNum);
@@ -1624,6 +1625,8 @@ public class BlueprintConfigurationProcessorTest {
 assertEquals("hive property not properly exported",
 createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.hive.hosts"));
 
+assertFalse("hive.server2.authentication.ldap.url should not have been 
present in the exported configuration",
+
hiveSiteProperties.containsKey("hive.server2.authentication.ldap.url"));
 assertEquals("hive property not properly exported",
   createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.HTTP.hosts"));
 



ambari git commit: AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error "argument of type 'NoneType' is not iterable" (dsen)

2017-01-27 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 77937e383 -> 7c7769b1a


AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error 
"argument of type 'NoneType' is not iterable" (dsen)


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

Branch: refs/heads/trunk
Commit: 7c7769b1a00ebeb9a7cf10ae5e7865f13ece7f5e
Parents: 77937e3
Author: Dmytro Sen 
Authored: Fri Jan 27 19:06:52 2017 +0200
Committer: Dmytro Sen 
Committed: Fri Jan 27 19:06:52 2017 +0200

--
 .../src/main/python/ambari_commons/ambari_metrics_helper.py | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7769b1/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
--
diff --git 
a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py 
b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
index bfc786c..7841bde 100644
--- a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
+++ b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
@@ -24,6 +24,7 @@ from resource_management.libraries.functions import 
conf_select
 
 DEFAULT_COLLECTOR_SUFFIX = '.sink.timeline.collector.hosts'
 DEFAULT_METRICS2_PROPERTIES_FILE_NAME = 'hadoop-metrics2.properties'
+DEFAULT_HADOOP_CONF_DIR_PATH = '/usr/hdp/current/hadoop-client/conf/'
 
 def select_metric_collector_for_sink(sink_name):
   # TODO check '*' sink_name
@@ -42,7 +43,11 @@ def get_random_host(hosts):
   return random.choice(hosts)
 
 def get_metric_collectors_from_properties_file(sink_name):
-  hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  try:
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  except Exception as e:
+print "Can't get hadoop conf directory from 
conf_select.get_hadoop_conf_dir() - " + str(e)
+hadoop_conf_dir = DEFAULT_HADOOP_CONF_DIR_PATH
   props = load_properties_from_file(os.path.join(hadoop_conf_dir, 
DEFAULT_METRICS2_PROPERTIES_FILE_NAME))
   return props.get(sink_name + DEFAULT_COLLECTOR_SUFFIX)
 
@@ -59,4 +64,4 @@ def load_properties_from_file(filepath, sep='=', 
comment_char='#'):
 key = key_value[0].strip()
 value = sep.join(key_value[1:]).strip('" \t')
 props[key] = value
-  return props
\ No newline at end of file
+  return props



ambari git commit: AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error "argument of type 'NoneType' is not iterable" (dsen)

2017-01-27 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 3099b2ed9 -> f353d013a


AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error 
"argument of type 'NoneType' is not iterable" (dsen)


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

Branch: refs/heads/branch-2.5
Commit: f353d013adad3680a7a60697baaf4d96f75a66bc
Parents: 3099b2e
Author: Dmytro Sen 
Authored: Fri Jan 27 19:06:52 2017 +0200
Committer: Dmytro Sen 
Committed: Fri Jan 27 19:08:27 2017 +0200

--
 .../src/main/python/ambari_commons/ambari_metrics_helper.py | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f353d013/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
--
diff --git 
a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py 
b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
index bfc786c..7841bde 100644
--- a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
+++ b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
@@ -24,6 +24,7 @@ from resource_management.libraries.functions import 
conf_select
 
 DEFAULT_COLLECTOR_SUFFIX = '.sink.timeline.collector.hosts'
 DEFAULT_METRICS2_PROPERTIES_FILE_NAME = 'hadoop-metrics2.properties'
+DEFAULT_HADOOP_CONF_DIR_PATH = '/usr/hdp/current/hadoop-client/conf/'
 
 def select_metric_collector_for_sink(sink_name):
   # TODO check '*' sink_name
@@ -42,7 +43,11 @@ def get_random_host(hosts):
   return random.choice(hosts)
 
 def get_metric_collectors_from_properties_file(sink_name):
-  hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  try:
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  except Exception as e:
+print "Can't get hadoop conf directory from 
conf_select.get_hadoop_conf_dir() - " + str(e)
+hadoop_conf_dir = DEFAULT_HADOOP_CONF_DIR_PATH
   props = load_properties_from_file(os.path.join(hadoop_conf_dir, 
DEFAULT_METRICS2_PROPERTIES_FILE_NAME))
   return props.get(sink_name + DEFAULT_COLLECTOR_SUFFIX)
 
@@ -59,4 +64,4 @@ def load_properties_from_file(filepath, sep='=', 
comment_char='#'):
 key = key_value[0].strip()
 value = sep.join(key_value[1:]).strip('" \t')
 props[key] = value
-  return props
\ No newline at end of file
+  return props



ambari git commit: AMBARI-19732. Allow all sinks a config override to point to a different ZK quorum. Compilation failure. (swagle)

2017-01-27 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 7c7769b1a -> 9963ac819


AMBARI-19732. Allow all sinks a config override to point to a different ZK 
quorum. Compilation failure. (swagle)


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

Branch: refs/heads/trunk
Commit: 9963ac81963e01eec66467f0536b4ebdf058aa6e
Parents: 7c7769b
Author: Siddharth Wagle 
Authored: Fri Jan 27 10:11:49 2017 -0800
Committer: Siddharth Wagle 
Committed: Fri Jan 27 10:11:49 2017 -0800

--
 .../hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9963ac81/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
 
b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
index e72d01f..923de0f 100644
--- 
a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
+++ 
b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
@@ -108,8 +108,8 @@ public class StormTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
   protocol = configuration.getProperty(COLLECTOR_PROTOCOL, "http");
   port = configuration.getProperty(COLLECTOR_PORT, "6188");
   
-  zkQuorum = 
StringUtils.isEmpty(conf.getProperty(COLLECTOR_ZOOKEEPER_QUORUM)) ?
-conf.getProperty(ZOOKEEPER_QUORUM) : 
conf.getProperty(COLLECTOR_ZOOKEEPER_QUORUM);
+  zkQuorum = 
StringUtils.isEmpty(configuration.getProperty(COLLECTOR_ZOOKEEPER_QUORUM)) ?
+configuration.getProperty(ZOOKEEPER_QUORUM) : 
configuration.getProperty(COLLECTOR_ZOOKEEPER_QUORUM);
 
   timeoutSeconds = configuration.getProperty(METRICS_POST_TIMEOUT_SECONDS) 
!= null ?
   
Integer.parseInt(configuration.getProperty(METRICS_POST_TIMEOUT_SECONDS)) :



[23/49] ambari git commit: AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without the build level digits - new unit tests (dili)

2017-01-27 Thread ncole
AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without 
the build level digits - new unit tests (dili)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b92b5f576300d0ab36005f35d7e9d0547be7c2e8
Parents: 9bc765a
Author: Di Li 
Authored: Thu Jan 26 11:05:55 2017 -0500
Committer: Di Li 
Committed: Thu Jan 26 11:05:55 2017 -0500

--
 .../libraries/functions/get_stack_version.py|  2 +-
 .../libraries/functions/version_select_util.py  |  5 ++-
 .../src/test/python/TestVersionSelectUtil.py| 40 
 3 files changed, 44 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b92b5f57/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 7274a59..463d61f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
 
   if match is None:
 Logger.info('Failed to get extracted version with ' + stack_selector_path)

http://git-wip-us.apache.org/repos/asf/ambari/blob/b92b5f57/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
index 615a0cd..ff00a1f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
@@ -67,8 +67,9 @@ def get_component_version(stack_name, component_name):
   raise Exception("Code is nonzero or output is empty")
 
 Logger.debug("Command: %s\nOutput: %s" % (get_stack_comp_version_cmd, 
str(out)))
-matches = re.findall(r"([\d\.]+\-\d+)", out)
-version = matches[0] if matches and len(matches) > 0 else None
+matches = re.findall(r"( [\d\.]+(\-\d+)?)", out)
+version = matches[0][0].strip() if matches and len(matches) > 0 and 
len(matches[0]) > 0 else None
+Logger.debug("Version for component %s: %s" % (component_name, 
str(version)))
   except Exception, e:
 Logger.error("Could not determine stack version for component %s by 
calling '%s'. Return Code: %s, Output: %s." %
  (component_name, get_stack_comp_version_cmd, str(code), 
str(out)))

http://git-wip-us.apache.org/repos/asf/ambari/blob/b92b5f57/ambari-server/src/test/python/TestVersionSelectUtil.py
--
diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py 
b/ambari-server/src/test/python/TestVersionSelectUtil.py
index 38798e2..5097fac 100644
--- a/ambari-server/src/test/python/TestVersionSelectUtil.py
+++ b/ambari-server/src/test/python/TestVersionSelectUtil.py
@@ -97,3 +97,43 @@ class TestVersionSelectUtil(TestCase):
 self.assertEquals(version, stack_expected_version)
 version = self.module.get_component_version("HDP", "hadoop-hdfs-datanode")
 self.assertEquals(version, stack_expected_version)
+
+  @patch('__builtin__.open')
+  @patch("resource_management.core.shell.call")
+  @patch('os.path.exists')
+  @patch("resource_management.libraries.functions.stack_tools.get_stack_tool")
+  def test_get_component_version_no_build_ids(self, get_stack_tool_mock, 
os_path_exists_mock, call_mock, open_mock):
+stack_expected_version = "2.2.1.0"
+
+# Mock classes for reading from a file
+class MagicFile(object):
+  allowed_names = set(["hive-server2",
+   "zookeeper-server"])
+  def read(self, value):
+return (value + " - " + stack_expected_version) if value in 
self.allowed_names else ("ERROR: Invalid package - " + value)
+
+  def __exit__(sel

[21/49] ambari git commit: AMBARI-19724 Refreshing the page (browser refresh) when on the tez view goes back to the main views page (non admin user). (atkach)

2017-01-27 Thread ncole
AMBARI-19724 Refreshing the page (browser refresh) when on the tez view goes 
back to the main views page (non admin user). (atkach)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8d390fa18c4fe109934387762787cc1cf48a2bc2
Parents: b6a06bd
Author: Andrii Tkach 
Authored: Thu Jan 26 16:59:28 2017 +0200
Committer: Andrii Tkach 
Committed: Thu Jan 26 17:01:04 2017 +0200

--
 ambari-web/app/routes/main.js | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d390fa1/ambari-web/app/routes/main.js
--
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 382818b..354198b 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -42,7 +42,10 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 router.get('mainController').initialize();
   });
 } else {
-  App.router.transitionTo('main.views.index');
+  // Don't transit to Views when user already on View page
+  if (App.router.currentState.name !== 'viewDetails') {
+App.router.transitionTo('main.views.index');
+  }
   App.router.get('clusterController').set('isLoaded', 
true); // hide loading bar
 }
   });



[32/49] ambari git commit: AMBARI-18431: Storm Ambari view - Fixes to DAG, kafka offset info , Misc fixes.

2017-01-27 Thread ncole
AMBARI-18431: Storm Ambari view - Fixes to DAG, kafka offset info , Misc fixes.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 7e00f5859534e545eac7e052a5fd61dd18f3234e
Parents: a5df408
Author: Sanket Shah 
Authored: Thu Sep 22 15:50:01 2016 +0530
Committer: Sriharsha Chintalapani 
Committed: Thu Jan 26 21:16:43 2017 -0800

--
 .../resources/libs/dagre-d3/dagre-d3.min.js |  28 ++
 .../resources/scripts/components/BarChart.jsx   |  34 ++-
 .../scripts/components/TopologyGraph.jsx| 292 +++
 .../storm/src/main/resources/scripts/main.js|   7 +-
 .../scripts/views/TopologyDetailView.jsx|  39 ++-
 .../storm/src/main/resources/styles/style.css   |  20 ++
 6 files changed, 223 insertions(+), 197 deletions(-)
--




[22/49] ambari git commit: AMBARI-19715: HostCleanup remove ambari.repo when ambari.repo has repo ID that doesn't begin with word AMBARI (dili)

2017-01-27 Thread ncole
AMBARI-19715: HostCleanup remove ambari.repo when ambari.repo has repo ID that 
doesn't begin with word AMBARI (dili)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 9bc765ab016d3cd0a2253ab6e28c9e27a6c77418
Parents: 8d390fa
Author: Di Li 
Authored: Thu Jan 26 10:59:15 2017 -0500
Committer: Di Li 
Committed: Thu Jan 26 10:59:15 2017 -0500

--
 .../resource_management/TestPackagesAnalyzer.py | 46 
 .../libraries/functions/packages_analyzer.py|  2 +-
 2 files changed, 47 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9bc765ab/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py 
b/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
index f898919..e02e442 100644
--- a/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
+++ b/ambari-agent/src/test/python/resource_management/TestPackagesAnalyzer.py
@@ -138,4 +138,50 @@ class TestPackagesAnalyzer(TestCase):
 self.assertEqual(7, len(allPackages))
 expected = ["hadoop-a", "zk", "webhcat", "hadoop-b", "ganglia", "rrd", 
"def-def.x86"]
 for package in expected:
+  self.assertTrue(package in allPackages)
+
+  def test_perform_package_analysis_custom_reponame(self):
+installedPackages = [
+  ["hadoop-a", "2.3", "HDP"], ["zk", "3.1", "HDP"], ["webhcat", "3.1", 
"HDP"],
+  ["hadoop-b", "2.3", "HDP-epel"], ["epel", "3.1", "HDP-epel"], ["epel-2", 
"3.1", "HDP-epel"],
+  ["hadoop-c", "2.3", "GITHUB_Ambari"], ["ambari-s", "3.1", 
"GITHUB_Ambari"],
+  ["ganglia", "2.3", "GANGLIA"], ["rrd", "3.1", "RRD"],
+  ["keeper-1", "2.3", "GANGLIA"], ["keeper-2", "3.1", 
"base"],["def-def.x86", "2.2", "DEF.3"],
+  ["def.1", "1.2", "NewDEF"]
+]
+availablePackages = [
+  ["hadoop-d", "2.3", "HDP"], ["zk-2", "3.1", "HDP"], ["pig", "3.1", 
"HDP"],
+  ["epel-3", "2.3", "HDP-epel"], ["hadoop-e", "3.1", "HDP-epel"],
+  ["ambari-a", "3.1", "GITHUB_Ambari"],
+  ["keeper-3", "3.1", "base"]
+]
+
+packagesToLook = ["^webhcat.*$", "^hadoop.*$", "^.+-def.*$"]
+reposToIgnore = ["ambari"]
+additionalPackages = ["ganglia", "rrd"]
+
+repos = []
+packages_analyzer.getInstalledRepos(packagesToLook, installedPackages + 
availablePackages, reposToIgnore, repos)
+self.assertEqual(3, len(repos))
+expected = ["HDP", "HDP-epel", "DEF.3"]
+for repo in expected:
+  self.assertTrue(repo in repos)
+
+packagesInstalled = packages_analyzer.getInstalledPkgsByRepo(repos, 
["epel"], installedPackages)
+self.assertEqual(5, len(packagesInstalled))
+expected = ["hadoop-a", "zk", "webhcat", "hadoop-b", "def-def.x86"]
+for repo in expected:
+  self.assertTrue(repo in packagesInstalled)
+
+additionalPkgsInstalled = packages_analyzer.getInstalledPkgsByNames(
+  additionalPackages, installedPackages)
+self.assertEqual(2, len(additionalPkgsInstalled))
+expected = ["ganglia", "rrd"]
+for additionalPkg in expected:
+  self.assertTrue(additionalPkg in additionalPkgsInstalled)
+
+allPackages = list(set(packagesInstalled + additionalPkgsInstalled))
+self.assertEqual(7, len(allPackages))
+expected = ["hadoop-a", "zk", "webhcat", "hadoop-b", "ganglia", "rrd", 
"def-def.x86"]
+for package in expected:
   self.assertTrue(package in allPackages)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/9bc765ab/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
index 9df2b64..8a15ee5 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/packages_analyzer.py
@@ -186,7 +186,7 @@ def _lookUpZypperPackages(command, allPackages):
 def nameMatch(lookupName, actualName):
   tokens = actualName.strip().split()
   for token in tokens:
-if token.lower().find(lookupName.lower()) == 0:
+if lookupName.lower() in token.lower():
   return True
   return False
 



[35/49] ambari git commit: AMBARI-19603. Issue with delete action node operation. (Belliraj HB via gauravn7)

2017-01-27 Thread ncole
AMBARI-19603. Issue with delete action node operation. (Belliraj HB via 
gauravn7)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: d38fed3d470e5a7e2cb36625bc7c9b3d568e6b5c
Parents: d2862fc
Author: Gaurav Nagar 
Authored: Fri Jan 27 11:28:47 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 11:28:47 2017 +0530

--
 .../ui/app/domain/cytoscape-flow-renderer.js|  2 +-
 .../src/main/resources/ui/app/domain/node.js| 45 +---
 .../main/resources/ui/app/domain/workflow.js|  2 +-
 3 files changed, 42 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d38fed3d/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js
 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js
index 96426ce..17fb4a0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/cytoscape-flow-renderer.js
@@ -104,7 +104,7 @@ var CytoscapeRenderer= Ember.Object.extend({
   });
   if (node.transitions.length > 0) {
 node.transitions.forEach(function(transition){
-  if (transition.isOnError()){
+  if (transition.isOnError()|| transition.targetNode.isKillNode()){
 return;
   }
   self.get('dataNodes').pushObject(

http://git-wip-us.apache.org/repos/asf/ambari/blob/d38fed3d/contrib/views/wfmanager/src/main/resources/ui/app/domain/node.js
--
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/node.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/node.js
index cda7609..db5bf1e 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/node.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/node.js
@@ -151,6 +151,33 @@ var Node = Ember.Object.extend(FindNodeMixin,{
 });
 return count;
   },
+  getDefaultConditionTarget(){
+var target;
+var transitions=this.get("transitions");
+transitions.forEach(function(tran){
+  if (tran.condition==="default"){
+target=tran.targetNode;
+  }
+});
+return target;
+  },
+  getNonKillNodeTarget(){
+var nonKillNodeCount=0;
+var nonKillNode;
+var transitions=this.get("transitions");
+transitions.forEach(function(tran){
+  if (!tran.targetNode.isKillNode()){
+nonKillNodeCount++;
+nonKillNode=tran.targetNode;
+  }
+});
+if (nonKillNodeCount>0){
+  return nonKillNode;
+}else{
+  console.log("no non kill nodes transitions.");
+  return null;
+}
+  },
   getDefaultTransitionTarget(){
 if (this.isForkNode()){
   return this.findNodeById(this,"join_"+this.get("id"));
@@ -161,12 +188,17 @@ var Node = Ember.Object.extend(FindNodeMixin,{
 }else if (transitions.length===1){
   return transitions[0].targetNode;
 }
-var target=transitions[0].targetNode;
-transitions.forEach(function(tran){
-  if (tran.condition==="default"){
-target=tran.targetNode;
+var target;
+if (this.isDecisionNode()){
+  var defaultTarget=this.getDefaultConditionTarget();
+  if (defaultTarget.isKillNode()){
+target=this.getNonKillNodeTarget();
+  }else{
+target=defaultTarget;
   }
-});
+}else{
+  target=transitions[0].targetNode;
+}
 if (target.isPlaceholder()){
   return target.getDefaultTransitionTarget();
 }
@@ -206,6 +238,9 @@ var Node = Ember.Object.extend(FindNodeMixin,{
   },
   isDefaultKillNode(){
 return this.isKillNode() && 
this.get("name")===Constants.defaultKillNodeName;
+  },
+  isEndNode(){
+return this.get("type")==="end";
   }
 });
 export {Node};

http://git-wip-us.apache.org/repos/asf/ambari/blob/d38fed3d/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
index 9040bb8..900d692 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
@@ -168,7 +168,7 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{
   d

[13/49] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)

2017-01-27 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json 
b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
new file mode 100644
index 000..52b3983
--- /dev/null
+++ 
b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default_for_restart.json
@@ -0,0 +1,1256 @@
+{
+"roleCommand": "CUSTOM_COMMAND",
+"clusterName": "c1",
+"hostname": "c6401.ambari.apache.org",
+"hostLevelParams": {
+"not_managed_hdfs_path_list": 
"[\"/apps/hive/warehouse\",\"/apps/falcon\",\"/mr-history/done\",\"/app-logs\",\"/tmp\"]",
+"agent_stack_retry_count": "5",
+"agent_stack_retry_on_unavailability": "false",
+"agentCacheDir": "/var/lib/ambari-agent/cache",
+"jdk_location": "http://c6401.ambari.apache.org:8080/resources/";,
+"ambari_db_rca_password": "mapred",
+"ambari_db_rca_url": 
"jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
+"repo_info": 
"[{\"baseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\",\"osType\":\"centos6\",\"repoId\":\"HDP-2.0._\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0\"}]";,
+"jce_name": "UnlimitedJCEPolicyJDK7.zip",
+"stack_version": "2.5",
+"stack_name": "HDP",
+"ambari_db_rca_driver": "org.postgresql.Driver",
+"jdk_name": "jdk-7u67-linux-x64.tar.gz",
+"ambari_db_rca_username": "mapred",
+"java_home": "/usr/jdk64/jdk1.7.0_45",
+"java_version": "8",
+"db_name": "ambari",
+"group_list": "[\"hadoop\",\"nobody\",\"users\"]",
+"user_list": 
"[\"hive\",\"oozie\",\"nobody\",\"ambari-qa\",\"flume\",\"hdfs\",\"storm\",\"mapred\",\"hbase\",\"tez\",\"zookeeper\",\"falcon\",\"sqoop\",\"yarn\",\"hcat\"]",
+"custom_mysql_jdbc_name" : "mysql-connector-java.jar",
+"custom_oracle_jdbc_name" : "oracle-jdbc-driver.jar",
+"custom_postgres_jdbc_name" : "test-postgres-jdbc.jar",
+"custom_sqlanywhere_jdbc_name" : "sqla-client-jdbc.tar.gz",
+"custom_command" : "RESTART"
+},
+"commandType": "EXECUTION_COMMAND",
+"roleParams": {"component_category": "MASTER"},
+"serviceName": "HIVE",
+"role": "HIVE_SERVER_INTERACTIVE",
+"commandParams": {
+"command_timeout": "300",
+"service_package_folder": "OOZIE",
+"script_type": "PYTHON",
+"script": "scripts/service_check.py",
+"excluded_hosts": "host1,host2",
+"mark_draining_only" : "false",
+"update_exclude_file_only" : "false",
+"xml_configs_list":[{"hdfs-site.xml":"hdfs-site"}],
+
"env_configs_list":[{"hadoop-env.sh":"hadoop-env"},{"log4j.properties":"hdfs-log4j,yarn-log4j"}],
+
"properties_configs_list":[{"runtime.properties":"falcon-runtime.properties"},{"startup.properties":"falcon-startup.properties"}],
+"output_file":"HDFS_CLIENT-configs.tar.gz",
+"refresh_topology": "True"
+},
+"taskId": 152,
+"public_hostname": "c6401.ambari.apache.org",
+"configurations": {
+"llap-daemon-log4j": {
+  "content" : "con\ntent"
+},
+"llap-cli-log4j2": {
+  "content" : "con\ntent"
+},
+"hive-log4j2": {
+"content" : "con\ntent"
+},
+"hive-exec-log4j2": {
+"content" : "con\ntent"
+},
+"beeline-log4j2": {
+"content" : "con\ntent"
+},
+"sqoop-site": {
+"atlas.cluster.name": "c1",
+"sqoop.job.data.publish.class": 
"org.apache.atlas.sqoop.hook.SqoopHook"
+},
+"mapred-site": {
+"mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020",
+"mapreduce.cluster.administrators": " hadoop",
+"mapreduce.reduce.input.buffer.percent": "0.0",
+"mapreduce.output.fileoutputformat.compress": "false",
+"mapreduce.framework.name": "yarn",
+"mapreduce.map.speculative": "false",
+"mapreduce.reduce.shuffle.merge.percent": "0.66",
+"yarn.app.mapreduce.am.resource.mb": "683",
+"mapreduce.map.java.opts": "-Xmx273m",
+"mapreduce.application.classpath": 
"$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*",
+"mapreduce.job.reduce.slowstart.completedmaps": "0.05",
+"mapreduce.output.fileoutputformat.compress.type": "BLOCK",
+"mapreduce.reduce.speculative": "false",
+"mapreduce.reduce.java.opts": "-Xmx546m",
+"mapreduce.am.max-attempts": "2",
+"yarn.app.mapreduce.am.admin-command-opts": 
"-Djava.net.preferIPv4St

[39/49] ambari git commit: AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger Usersync (mugdha)

2017-01-27 Thread ncole
AMBARI-19704 Enable Group Sync when Incremental sync is enabled for Ranger 
Usersync (mugdha)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 9ebe17013bab33eceec5ff2009a87da68c135ef2
Parents: a1f625f
Author: Mugdha Varadkar 
Authored: Wed Jan 25 17:04:37 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 15:19:19 2017 +0530

--
 .../0.7.0/configuration/ranger-ugsync-site.xml  | 33 ++
 .../stacks/HDP/2.6/services/stack_advisor.py| 36 ++-
 .../stacks/2.6/common/test_stack_advisor.py | 67 
 3 files changed, 134 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ebe1701/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
index 775b5ca..15ee9fd 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.7.0/configuration/ranger-ugsync-site.xml
@@ -39,4 +39,37 @@
 
 
   
+
+  
+ranger.usersync.group.searchenabled
+Enable Group Sync
+false
+"# do we want to do ldapsearch to find groups instead of 
relying on user entry attributes
+# valid values: true, false
+# any value other than true would be treated as false
+# default value: false"
+
+  true
+  value-list
+  false
+  
+
+  true
+  Yes
+
+
+  false
+  No
+
+  
+  1
+
+
+  
+ranger-ugsync-site
+ranger.usersync.ldap.deltasync
+  
+
+
+  
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/9ebe1701/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index 465f218..957d625 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -32,7 +32,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childRecommendConfDict = {
   "DRUID": self.recommendDruidConfigurations,
   "ATLAS": self.recommendAtlasConfigurations,
-  "TEZ": self.recommendTezConfigurations
+  "TEZ": self.recommendTezConfigurations,
+  "RANGER": self.recommendRangerConfigurations
   }
   parentRecommendConfDict.update(childRecommendConfDict)
   return parentRecommendConfDict
@@ -185,7 +186,8 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
   childValidators = {
   "DRUID": {"druid-env": self.validateDruidEnvConfigurations,
 "druid-historical": 
self.validateDruidHistoricalConfigurations,
-"druid-broker": self.validateDruidBrokerConfigurations}
+"druid-broker": self.validateDruidBrokerConfigurations},
+  "RANGER": {"ranger-ugsync-site": 
self.validateRangerUsersyncConfigurations}
   }
   self.mergeValidators(parentValidators, childValidators)
   return parentValidators
@@ -246,3 +248,33 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
 tez_jvm_updated_opts = tez_jvm_opts + jvmGCParams + "{{heap_dump_opts}}"
 putTezProperty('tez.task.launch.cmd-opts', tez_jvm_updated_opts)
 Logger.info("Updated 'tez-site' config 'tez.task.launch.cmd-opts' as : 
{0}".format(tez_jvm_updated_opts))
+
+  def recommendRangerConfigurations(self, configurations, clusterData, 
services, hosts):
+super(HDP26StackAdvisor, 
self).recommendRangerConfigurations(configurations, clusterData, services, 
hosts)
+
+putRangerUgsyncSite = self.putProperty(configurations, 
'ranger-ugsync-site', services)
+
+delta_sync_enabled = False
+if 'ranger-ugsync-site' in services['configurations'] and 
'ranger.usersync.ldap.deltasync' in 
services['configurations']['ranger-ugsync-site']['properties']:
+  delta_sync_enabled = 
services['configurations']['ranger-ugsync-site']['properties']['ranger.usersync.ldap.deltasync']
 == "true"
+
+if delta_sync_enabled:
+  putRangerUgsyncSite("rang

[01/49] ambari git commit: AMBARI-19542: Cannot change group/user privileges in list view if the user has VIEW.USER privilege (sangeetar)

2017-01-27 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade 42b8dcf77 -> 535327d12


AMBARI-19542: Cannot change group/user privileges in list view if the user has 
VIEW.USER privilege (sangeetar)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5ddbb58ec44795314d3a0e539daf11ace87ae6f9
Parents: 6a81155
Author: Sangeeta Ravindran 
Authored: Wed Jan 25 10:37:21 2017 -0800
Committer: Sangeeta Ravindran 
Committed: Wed Jan 25 10:37:21 2017 -0800

--
 .../controllers/clusters/UserAccessListCtrl.js  | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ddbb58e/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 9869d0b..3737414 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -148,10 +148,12 @@ function($scope, $location, Cluster, $modal, $rootScope, 
$routeParams, Permissio
 var privilegesOfTypeUser = [];
 var privilegesOfTypeGroup = [];
 for (var i = 0; i < arrayOfPrivileges.length; i++) {
-  if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){
-privilegesOfTypeGroup.push(arrayOfPrivileges[i]);
-  } else {
-privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo);
+  if(arrayOfPrivileges[i].PrivilegeInfo.permission_name != 
"VIEW.USER") {
+if(arrayOfPrivileges[i].PrivilegeInfo.principal_type === "GROUP"){
+  privilegesOfTypeGroup.push(arrayOfPrivileges[i]);
+} else {
+  privilegesOfTypeUser.push(arrayOfPrivileges[i].PrivilegeInfo);
+}
   }
 }
 
@@ -204,8 +206,10 @@ function($scope, $location, Cluster, $modal, $rootScope, 
$routeParams, Permissio
 user.editable = 
(Cluster.ineditableRoles.indexOf(privilege.permission_name) === -1);
 
 arrayOfPrivileges.forEach(function(privilegeOfTypeGroup) {
-  if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") {
-privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo);
+  if(privilegeOfTypeGroup.PrivilegeInfo.permission_name != 
"VIEW.USER") {
+if (privilegeOfTypeGroup.PrivilegeInfo.principal_type === "GROUP") 
{
+  privilegesOfTypeGroup.push(privilegeOfTypeGroup.PrivilegeInfo);
+}
   }
 });
 



[37/49] ambari git commit: AMBARI-19628. Hive View 2.0: Ability to view and create table and column statistics. (dipayanb)

2017-01-27 Thread ncole
AMBARI-19628. Hive View 2.0: Ability to view and create table and column 
statistics. (dipayanb)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 22d4e18168935d9a9400591ebcd1a05c2b2ebf7d
Parents: f88aca8
Author: Dipayan Bhowmick 
Authored: Fri Jan 27 12:03:24 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Fri Jan 27 12:03:56 2017 +0530

--
 .../src/main/resources/ui/app/adapters/table.js |  27 +++-
 .../ui/app/components/table-statistics.js   | 120 +++
 .../main/resources/ui/app/models/table-info.js  |   1 +
 .../routes/databases/database/tables/table.js   |   4 +
 .../src/main/resources/ui/app/services/jobs.js  |  10 +-
 .../resources/ui/app/services/stats-service.js  |  76 +
 .../src/main/resources/ui/app/styles/app.scss   |  23 +--
 .../templates/components/table-statistics.hbs   | 153 +++
 .../app/templates/databases/database/tables.hbs |   2 +-
 .../databases/database/tables/table/stats.hbs   |   4 +-
 10 files changed, 399 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/22d4e181/contrib/views/hive20/src/main/resources/ui/app/adapters/table.js
--
diff --git a/contrib/views/hive20/src/main/resources/ui/app/adapters/table.js 
b/contrib/views/hive20/src/main/resources/ui/app/adapters/table.js
index 9a4692d..e878899 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/adapters/table.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/adapters/table.js
@@ -22,14 +22,14 @@ import DDLAdapter from './ddl';
 export default DDLAdapter.extend({
   buildURL(modelName, id, snapshot, requestType, query) {
 // Check if the query is to find all tables for a particular database
-if(Ember.isEmpty(id) && (requestType === 'query' || requestType == 
'queryRecord')) {
+if (Ember.isEmpty(id) && (requestType === 'query' || requestType == 
'queryRecord')) {
   let dbId = query.databaseId;
   let tableName = query.tableName;
   let origFindAllUrl = this._super(...arguments);
   let prefix = origFindAllUrl.substr(0, origFindAllUrl.lastIndexOf("/"));
   delete query.databaseId;
   delete query.tableName;
-  if(Ember.isEmpty(tableName)) {
+  if (Ember.isEmpty(tableName)) {
 return `${prefix}/databases/${dbId}/tables`;
   } else {
 return `${prefix}/databases/${dbId}/tables/${tableName}`;
@@ -40,12 +40,29 @@ export default DDLAdapter.extend({
 
 
   createTable(tableMetaInfo) {
-let postURL = this.buildURL('table', null, null, 'query', {databaseId: 
tableMetaInfo.database});
-return this.ajax(postURL, 'POST', { data: {tableInfo: tableMetaInfo} });
+let postURL = this.buildURL('table', null, null, 'query', { databaseId: 
tableMetaInfo.database });
+return this.ajax(postURL, 'POST', { data: { tableInfo: tableMetaInfo } });
   },
 
   deleteTable(database, tableName) {
-let deletURL = this.buildURL('table', null, null, 'query', {databaseId: 
database, tableName: tableName});
+let deletURL = this.buildURL('table', null, null, 'query', { databaseId: 
database, tableName: tableName });
 return this.ajax(deletURL, 'DELETE');
+  },
+
+  analyseTable(databaseName, tableName, withColumns = false) {
+let analyseUrl = this.buildURL('table', null, null, 'query', { databaseId: 
databaseName, tableName: tableName }) +
+  '/analyze' +
+  (withColumns ? '?analyze_columns=true' : '');
+return this.ajax(analyseUrl, 'PUT');
+  },
+
+  generateColumnStats(databaseName, tableName, columnName) {
+let url = this.buildURL('table', null, null, 'query', {databaseId: 
databaseName, tableName: tableName}) + `/column/${columnName}/stats`;
+return this.ajax(url, 'GET');
+  },
+
+  fetchColumnStats(databaseName, tableName, columnName, jobId) {
+let url = this.buildURL('table', null, null, 'query', {databaseId: 
databaseName, tableName: tableName}) + 
`/column/${columnName}/fetch_stats?job_id=${jobId}`;
+return this.ajax(url, 'GET');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/22d4e181/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
new file mode 100644
index 000..d53a41f
--- /dev/null
+++ 
b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
@@ -0,0 +1,120 @@
+/**
+ * 

[36/49] ambari git commit: AMBARI-19631. Hive View 2.0: Show the table accesses in the authorization sceen. (dipayanb)

2017-01-27 Thread ncole
AMBARI-19631. Hive View 2.0: Show the table accesses in the authorization 
sceen. (dipayanb)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: f88aca8e1f97311d416da92ec43f9e19535cdf9e
Parents: d38fed3
Author: Dipayan Bhowmick 
Authored: Fri Jan 27 11:56:15 2017 +0530
Committer: Dipayan Bhowmick 
Committed: Fri Jan 27 11:56:52 2017 +0530

--
 .../resources/system/ranger/RangerService.java  | 41 +++-
 .../databases/database/tables/table/auth.hbs| 10 -
 2 files changed, 39 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f88aca8e/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java
--
diff --git 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java
 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java
index 95ab27c..9debe42 100644
--- 
a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java
+++ 
b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java
@@ -25,7 +25,7 @@ import 
org.apache.ambari.view.hive20.utils.AuthorizationChecker;
 import org.apache.ambari.view.utils.ambari.AmbariApi;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.IOUtils;
-import org.apache.hadoop.hbase.util.Strings;
+import org.apache.commons.lang.StringUtils;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
@@ -81,7 +81,7 @@ public class RangerService {
   LOG.error("Failed to fetch Ranger URL from ambari. Exception: {}", e);
   throw new RangerException("Failed to fetch Ranger URL from Ambari", 
"AMBARI_FETCH_FAILED", 500, e);
 }
-if (Strings.isEmpty(rangerUrl)) {
+if (StringUtils.isEmpty(rangerUrl)) {
   LOG.info("Ranger url is not configured for the instance");
   throw new RangerException("Ranger url is not configured in Ambari.", 
"CONFIGURATION_ERROR", 500);
 }
@@ -91,7 +91,7 @@ public class RangerService {
 
   private List getPoliciesFromNonAmbariCluster(String database, String 
table) {
 String rangerUrl = getRangerUrlFromConfig();
-if (Strings.isEmpty(rangerUrl)) {
+if (StringUtils.isEmpty(rangerUrl)) {
   LOG.info("Ranger url is not configured for the instance");
   throw new RangerException("Ranger url is not configured in Ambari 
Instance.", "CONFIGURATION_ERROR", 500);
 }
@@ -107,7 +107,7 @@ public class RangerService {
 }
 
 String rangerResponse = fetchResponseFromRanger(rangerUrl, cred.username, 
cred.password, database, table);
-if (Strings.isEmpty(rangerResponse)) {
+if (StringUtils.isEmpty(rangerResponse)) {
   return Lists.newArrayList();
 }
 
@@ -141,8 +141,17 @@ public class RangerService {
   JSONObject policyItem = (JSONObject) policyItems.get(0);
   JSONArray usersJson = (JSONArray) policyItem.get("users");
   JSONArray groupsJson = (JSONArray) policyItem.get("groups");
+  JSONArray accesses = (JSONArray) policyItem.get("accesses");
 
 
+  for (Object accessJson : accesses) {
+JSONObject access = (JSONObject) accessJson;
+Boolean isAllowed = (Boolean) access.get("isAllowed");
+if (isAllowed) {
+  policy.addAccess((String) access.get("type"));
+}
+  }
+
   for (Object user : usersJson) {
 policy.addUser((String) user);
   }
@@ -159,7 +168,7 @@ public class RangerService {
   private String fetchResponseFromRanger(String rangerUrl, String username, 
String password, String database, String table) {
 
 String serviceName = 
context.getProperties().get("hive.ranger.servicename");
-if(Strings.isEmpty(serviceName)) {
+if (StringUtils.isEmpty(serviceName)) {
   LOG.error("Bad service name configured");
   throw new RangerException("Ranger service name is not configured in 
Ambari Instance.", "CONFIGURATION_ERROR", 500);
 }
@@ -182,15 +191,15 @@ public class RangerService {
 
   private StringBuilder getRangerUrl(String rangerUrl, String database, String 
table, String serviceName) {
 StringBuilder queryParams = new StringBuilder();
-if (!Strings.isEmpty(database)) {
+if (!StringUtils.isEmpty(database)) {
   queryParams.append("resource:database=");
   queryParams.append(database);
-  if (!Strings.isEmpty(table)) {
+  if (!StringU

[29/49] ambari git commit: AMBARI-19698. Author name in config history is not shown completely (alexantonenko)

2017-01-27 Thread ncole
AMBARI-19698. Author name in config history is not shown completely 
(alexantonenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: a5df408688faa4e748248339256c82cdf1462325
Parents: 042f427
Author: Alex Antonenko 
Authored: Thu Jan 26 23:23:59 2017 +0200
Committer: Alex Antonenko 
Committed: Fri Jan 27 01:22:50 2017 +0200

--
 ambari-web/app/templates/common/configs/config_history_flow.hbs | 2 +-
 ambari-web/app/templates/common/configs/service_version_box.hbs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a5df4086/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 5cadf91..da366c0 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -121,7 +121,7 @@
   
   {{/if}}
   {{#if view.displayedServiceVersion.author}}
-
 {{view.displayedServiceVersion.authorFormatted}} {{t
 
dashboard.configHistory.info-bar.authoredOn}} {{view.displayedServiceVersion.createdDate}}
+
 {{view.displayedServiceVersion.author}} {{t 
dashboard.configHistory.info-bar.authoredOn}} {{view.displayedServiceVersion.createdDate}}
   {{/if}}
 
 {{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a5df4086/ambari-web/app/templates/common/configs/service_version_box.hbs
--
diff --git a/ambari-web/app/templates/common/configs/service_version_box.hbs 
b/ambari-web/app/templates/common/configs/service_version_box.hbs
index 134fe44..aaa4520 100644
--- a/ambari-web/app/templates/common/configs/service_version_box.hbs
+++ b/ambari-web/app/templates/common/configs/service_version_box.hbs
@@ -39,7 +39,7 @@
   
 {{view.serviceVersion.versionText}} {{view.serviceVersion.configGroupName}}
 {{view.serviceVersion.stackVersion}}
-{{view.serviceVersion.authorFormatted}} {{t 
dashboard.configHistory.info-bar.authoredOn}} {{view.serviceVersion.createdDate}}
+{{view.serviceVersion.authorFormatted}} {{t
 
dashboard.configHistory.info-bar.authoredOn}} {{view.serviceVersion.createdDate}}
 {{view.serviceVersion.fullNotes}}
   
   



[06/49] ambari git commit: AMBARI-19685. Stack advisor needs to enforce component dependency for slaves and masters. (jaimin)

2017-01-27 Thread ncole
AMBARI-19685. Stack advisor needs to enforce component dependency for slaves 
and masters. (jaimin)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c00399c8505212086c8d7d2deffcc5df74d4e770
Parents: f571ceb
Author: Jaimin Jetly 
Authored: Wed Jan 25 12:23:36 2017 -0800
Committer: Jaimin Jetly 
Committed: Wed Jan 25 12:23:36 2017 -0800

--
 .../commands/StackAdvisorCommand.java   |   6 +-
 .../StackDependencyResourceProvider.java|   8 ++
 .../server/state/DependencyConditionInfo.java   |  13 +++
 .../src/main/resources/properties.json  |   1 +
 .../stacks/HDP/2.3/services/stack_advisor.py|  25 
 .../src/main/resources/stacks/stack_advisor.py  |  63 ++
 .../services-master_ambari_colo-3-hosts.json|  33 +++---
 .../services-master_standby_colo-3-hosts.json   |  33 +++---
 .../configs/services-normal-hawq-3-hosts.json   |  33 +++---
 .../configs/services-normal-nohawq-3-hosts.json |  10 +-
 .../services-standby_ambari_colo-3-hosts.json   |  33 +++---
 .../stacks/2.0.6/common/test_stack_advisor.py   | 107 -
 .../2.3/common/services-sparkts-hive.json   | 102 -
 .../stacks/2.3/common/services-sparkts.json |  77 ++---
 .../stacks/2.3/common/test_stack_advisor.py |   2 +-
 .../2.5/common/services-normal-his-2-hosts.json | 114 ++-
 16 files changed, 466 insertions(+), 194 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c00399c8/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
index adcb5b5..2cfa8e7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
@@ -78,11 +78,11 @@ public abstract class StackAdvisorCommand extend
   private static final String GET_SERVICES_INFO_URI = 
"/api/v1/stacks/%s/versions/%s/"
   + 
"?fields=Versions/stack_name,Versions/stack_version,Versions/parent_stack_version"
   + 
",services/StackServices/service_name,services/StackServices/service_version"
-  + 
",services/components/StackServiceComponents,services/components/dependencies,services/components/auto_deploy"
+  + 
",services/components/StackServiceComponents,services/components/dependencies/Dependencies/scope"
+  + 
",services/components/dependencies/Dependencies/conditions,services/components/auto_deploy"
   + ",services/configurations/StackConfigurations/property_depends_on"
   + 
",services/configurations/dependencies/StackConfigurationDependency/dependency_name"
-  + 
",services/configurations/dependencies/StackConfigurationDependency/dependency_type"
-  + ",services/configurations/StackConfigurations/type"
+  + 
",services/configurations/dependencies/StackConfigurationDependency/dependency_type,services/configurations/StackConfigurations/type"
   + "&services/StackServices/service_name.in(%s)";
   private static final String SERVICES_PROPERTY = "services";
   private static final String SERVICES_COMPONENTS_PROPERTY = "components";

http://git-wip-us.apache.org/repos/asf/ambari/blob/c00399c8/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
index 5fc5f52..d9cd557 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
@@ -39,6 +39,7 @@ import 
org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.state.AutoDeployInfo;
+import org.apache.ambari.server.state.DependencyCondition

[20/49] ambari git commit: MBARI-19675. Regenerate Keytabs action does not set cluster-env/security_enabled to true (echekanskiy via dlysnichenko)

2017-01-27 Thread ncole
MBARI-19675. Regenerate Keytabs action does not set 
cluster-env/security_enabled to true (echekanskiy via dlysnichenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b6a06bd06d644f3ccd0e8b815f434fefe5989346
Parents: 03d90ae
Author: Lisnichenko Dmitro 
Authored: Thu Jan 26 14:35:29 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Thu Jan 26 14:35:29 2017 +0200

--
 .../UpdateKerberosConfigsServerAction.java  | 17 +++
 .../UpdateKerberosConfigsServerActionTest.java  | 31 
 2 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a06bd0/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
index 9bf6b51..b75100e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerAction.java
@@ -120,6 +120,23 @@ public class UpdateKerberosConfigsServerAction extends 
AbstractServerAction {
 }
   }
 
+  // ensure that cluster-env/security_enabled have proper value
+  final String securityEnabled = cluster.getSecurityType() == 
SecurityType.KERBEROS
+  ? "true"
+  : "false";
+
+  if(!configTypes.contains("cluster-env")) {
+configTypes.add("cluster-env");
+  }
+
+  Map clusterEnvProperties = 
propertiesToSet.get("cluster-env");
+  if(clusterEnvProperties == null) {
+clusterEnvProperties = new HashMap<>();
+propertiesToSet.put("cluster-env", clusterEnvProperties);
+  }
+
+  clusterEnvProperties.put("security_enabled", securityEnabled);
+
   if (!configTypes.isEmpty()) {
 String configNote = 
getCommandParameterValue(getCommandParameters(), 
KerberosServerAction.UPDATE_CONFIGURATION_NOTE);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6a06bd0/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index fc9c857..e756491 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -19,8 +19,10 @@
 package org.apache.ambari.server.serveraction.kerberos;
 
 import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.util.Collection;
@@ -34,6 +36,7 @@ import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.stack.OsFamily;
+import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.Before;
@@ -140,4 +143,32 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 
 verifyAll();
   }
+
+  @Test
+  public void testUpdateConfigForceSecurityEnabled() throws Exception {
+Map commandParams = new HashMap();
+commandParams.put(KerberosServerAction.DATA_DIRECTORY, dataDir);
+
+ExecutionCommand executionCommand = new ExecutionCommand();
+executionCommand.setCommandParams(commandParams);
+
+ConfigHelper configHelper = injector.getInstance(ConfigHelper.class);
+
+Capture configTypes = Capture.newInstance();
+Capture> configUpdates = Capture.newInstance();
+configHelper.updateConfigType(anyObject(Cluster.class), 
anyObject(AmbariManagementController.class),
+capture(configTypes), capture(configUpdates), 
anyObject(Collect

[03/49] ambari git commit: AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without the build level digits (dili)

2017-01-27 Thread ncole
AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without 
the build level digits (dili)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 21c18a78beb397da324c80d6943d55038167d855
Parents: 6a2aca6
Author: Di Li 
Authored: Wed Jan 25 14:16:56 2017 -0500
Committer: Di Li 
Committed: Wed Jan 25 14:16:56 2017 -0500

--
 .../libraries/functions/get_stack_version.py|  2 +-
 .../libraries/functions/version_select_util.py  |  5 ++-
 .../src/test/python/TestVersionSelectUtil.py| 40 
 3 files changed, 44 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 7274a59..463d61f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
 
   if match is None:
 Logger.info('Failed to get extracted version with ' + stack_selector_path)

http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
index 615a0cd..ff00a1f 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
@@ -67,8 +67,9 @@ def get_component_version(stack_name, component_name):
   raise Exception("Code is nonzero or output is empty")
 
 Logger.debug("Command: %s\nOutput: %s" % (get_stack_comp_version_cmd, 
str(out)))
-matches = re.findall(r"([\d\.]+\-\d+)", out)
-version = matches[0] if matches and len(matches) > 0 else None
+matches = re.findall(r"( [\d\.]+(\-\d+)?)", out)
+version = matches[0][0].strip() if matches and len(matches) > 0 and 
len(matches[0]) > 0 else None
+Logger.debug("Version for component %s: %s" % (component_name, 
str(version)))
   except Exception, e:
 Logger.error("Could not determine stack version for component %s by 
calling '%s'. Return Code: %s, Output: %s." %
  (component_name, get_stack_comp_version_cmd, str(code), 
str(out)))

http://git-wip-us.apache.org/repos/asf/ambari/blob/21c18a78/ambari-server/src/test/python/TestVersionSelectUtil.py
--
diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py 
b/ambari-server/src/test/python/TestVersionSelectUtil.py
index 38798e2..5facf31 100644
--- a/ambari-server/src/test/python/TestVersionSelectUtil.py
+++ b/ambari-server/src/test/python/TestVersionSelectUtil.py
@@ -97,3 +97,43 @@ class TestVersionSelectUtil(TestCase):
 self.assertEquals(version, stack_expected_version)
 version = self.module.get_component_version("HDP", "hadoop-hdfs-datanode")
 self.assertEquals(version, stack_expected_version)
+
+  @patch('__builtin__.open')
+  @patch("resource_management.core.shell.call")
+  @patch('os.path.exists')
+  @patch("resource_management.libraries.functions.stack_tools.get_stack_tool")
+  def test_get_component_version_no_build_ids(self, get_stack_tool_mock, 
os_path_exists_mock, call_mock, open_mock):
+stack_expected_version = "2.2.1.0"
+
+# Mock classes for reading from a file
+class MagicFile(object):
+  allowed_names = set(["hive-server2",
+   "zookeeper-server"])
+  def read(self, value):
+return (value + " - " + stack_expected_version) if value in 
self.allowed_names else ("ERROR: Invalid package - " + value)
+
+  def __exit__(self, exc_type, exc_

[25/49] ambari git commit: AMBARI-19712. Cluster creation fails due to database exception. (Attila Doroszlai via stoader)

2017-01-27 Thread ncole
AMBARI-19712. Cluster creation fails due to database exception. (Attila 
Doroszlai via stoader)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: cc9c92811b7371e73393dc7ba5099ea44a1959d8
Parents: e7e4cb2
Author: Attila Doroszlai 
Authored: Thu Jan 26 19:00:25 2017 +0100
Committer: Toader, Sebastian 
Committed: Thu Jan 26 19:00:25 2017 +0100

--
 .../ambari/server/controller/AmbariManagementControllerImpl.java| 1 +
 .../java/org/apache/ambari/server/state/ServiceComponentImpl.java   | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9c9281/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 0b3869b..0fce72b 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
@@ -1448,6 +1448,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   }
 
   @Override
+  @Transactional
   public synchronized RequestStatusResponse updateClusters(Set 
requests,
Map 
requestProperties)
   throws AmbariException, AuthorizationException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9c9281/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
index 236091b..cbf0ff9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
@@ -466,6 +466,7 @@ public class ServiceComponentImpl implements 
ServiceComponent {
 
 desiredStateEntity.setClusterServiceEntity(serviceEntity);
 serviceComponentDesiredStateDAO.create(desiredStateEntity);
+
serviceEntity.getServiceComponentDesiredStateEntities().add(desiredStateEntity);
 serviceEntity = clusterServiceDAO.merge(serviceEntity);
   }
 



[16/49] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)

2017-01-27 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
new file mode 100644
index 000..cd35b68
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
@@ -0,0 +1,1789 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import inspect
+import socket
+from math import floor, ceil
+
+# Local imports
+from resource_management.core.logger import Logger
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, 
('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+
+class YARNServiceAdvisor(service_advisor.ServiceAdvisor):
+
+  def __init__(self, *args, **kwargs):
+self.as_super = super(YARNServiceAdvisor, self)
+self.as_super.__init__(*args, **kwargs)
+
+# Always call these methods
+self.modifyMastersWithMultipleInstances()
+self.modifyCardinalitiesDict()
+self.modifyHeapSizeProperties()
+self.modifyNotValuableComponents()
+self.modifyComponentsNotPreferableOnServer()
+self.modifyComponentLayoutSchemes()
+
+  def modifyMastersWithMultipleInstances(self):
+"""
+Modify the set of masters with multiple instances.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyCardinalitiesDict(self):
+"""
+Modify the dictionary of cardinalities.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyHeapSizeProperties(self):
+"""
+Modify the dictionary of heap size properties.
+Must be overriden in child class.
+"""
+self.heap_size_properties = {}
+
+  def modifyNotValuableComponents(self):
+"""
+Modify the set of components whose host assignment is based on other 
services.
+Must be overriden in child class.
+"""
+self.notValuableComponents.add("APP_TIMELINE_SERVER")
+
+  def modifyComponentsNotPreferableOnServer(self):
+"""
+Modify the set of components that are not preferable on the server.
+Must be overriden in child class.
+"""
+# Nothing to do
+pass
+
+  def modifyComponentLayoutSchemes(self):
+"""
+Modify layout scheme dictionaries for components.
+The scheme dictionary basically maps the number of hosts to
+host index where component should exist.
+Must be overriden in child class.
+"""
+self.componentLayoutSchemes.update({
+  'APP_TIMELINE_SERVER': {31: 1, "else": 2},
+})
+
+  def getServiceComponentLayoutValidations(self, services, hosts):
+"""
+Get a list of errors.
+Must be overriden in child class.
+"""
+Logger.info("Class: %s, Method: %s. Validating Service Component Layout." %
+(self.__class__.__name__, inspect.stack()[0][3]))
+
+return self.as_super.getServiceComponentLayoutValidations(services, hosts)
+
+  def getServiceConfigurationRecommendations(self, configurations, 
clusterData, services, hosts):
+"""
+Entry point.
+Must be overriden in child class.
+"""
+Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+(self.__class__.__name__, inspect.stack()[0][3]))
+
+# Due to the existing stack inheritance, make it clear where each 
calculation came from.
+recommender = YARNRecommender()
+
+# YARN
+recommender.recommendYARNConfigurationsFromHDP206(configurations, 
clusterData, services, hosts)
+recommender.recommendYARNConfigurationsFromHDP22(configurations, 
clusterData, services, hosts)
+recommender.recommendYARNConfigurationsFromHDP23(configurations, 
cluste

[14/49] ambari git commit: AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider destroy (LLAP script already does that) (smohanty)

2017-01-27 Thread ncole
AMBARI-19720. When restarting HSI, Ambari should not run slider stop and slider 
destroy (LLAP script already does that) (smohanty)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5a02a2ad15b9e29e72b8ea55aa7bce4ea52c8aea
Parents: 71b7434
Author: Sumit Mohanty 
Authored: Wed Jan 25 17:04:36 2017 -0800
Committer: Sumit Mohanty 
Committed: Wed Jan 25 17:05:05 2017 -0800

--
 .../package/scripts/hive_server_interactive.py  |5 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |7 +
 .../stacks/2.5/HIVE/test_hive_server_int.py |   80 ++
 .../2.5/configs/hsi_default_for_restart.json| 1256 ++
 4 files changed, 1347 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
index 1b6b3f2..dd0d1c4 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
@@ -137,7 +137,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
   # Stop Hive Interactive Server first
   hive_service_interactive('hiveserver2', action='stop')
 
-  self._llap_stop(env)
+  if not params.is_restart_command:
+self._llap_stop(env)
+  else:
+Logger.info("LLAP stop is skipped as its a restart command")
 
 def status(self, env):
   import status_params

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index e9e6337..997975e 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -227,9 +227,16 @@ if hive_metastore_db_type == "mssql":
 #users
 hive_user = config['configurations']['hive-env']['hive_user']
 
+# is it a restart command
+is_restart_command = False
+if 'roleCommand' in config and 'CUSTOM_COMMAND' == config['roleCommand']:
+  if 'custom_command' in config['hostLevelParams'] and 'RESTART' == 
config['hostLevelParams']['custom_command']:
+is_restart_command = True
+
 #JDBC driver jar name
 hive_jdbc_driver = 
config['configurations']['hive-site']['javax.jdo.option.ConnectionDriverName']
 jdk_location = config['hostLevelParams']['jdk_location']
+
 java_share_dir = '/usr/share/java'
 hive_database_name = config['configurations']['hive-env']['hive_database_name']
 hive_database = config['configurations']['hive-env']['hive_database']

http://git-wip-us.apache.org/repos/asf/ambari/blob/5a02a2ad/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 8c47d99..69a7ad5 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -242,6 +242,85 @@ class TestHiveServerInteractive(RMFTestCase):
 )
 self.assertNoMoreResources()
 
+  '''
+  restart should not call slider destroy
+  '''
+  @patch("os.path.isfile")
+  @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs")
+  @patch("socket.socket")
+  @patch("time.sleep")
+  def test_restart_default_with_llap_multi_line_output(self, sleep_mock, 
socket_mock, copy_to_hfds_mock, is_file_mock):
+self.maxDiff = None
+copy_to_hfds_mock.return_value = False
+s = socket_mock.return_value
+is_file_mock.return_value = True
+self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/hive_server_interactive.py",
+   classname="HiveServerInteractive",
+

[44/49] ambari git commit: AMBARI-19700. When hiveserver2 LDAP authentication is enabled hive.server2.authentication.ldap.url property gets exported with hardcoded hostname. (Amruta Borkar via rnettle

2017-01-27 Thread ncole
AMBARI-19700. When hiveserver2 LDAP authentication is enabled 
hive.server2.authentication.ldap.url property gets exported with hardcoded 
hostname. (Amruta Borkar via rnettleton)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: ad195c25df7360dde9d18348d3db0bb9e212a4b4
Parents: fb95138
Author: Bob Nettleton 
Authored: Fri Jan 27 10:43:32 2017 -0500
Committer: Bob Nettleton 
Committed: Fri Jan 27 10:43:32 2017 -0500

--
 .../controller/internal/BlueprintConfigurationProcessor.java  | 1 +
 .../controller/internal/BlueprintConfigurationProcessorTest.java  | 3 +++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad195c25/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 25d6145..d4880b9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -2488,6 +2488,7 @@ public class BlueprintConfigurationProcessor {
 yarnSiteMap.put("yarn.timeline-service.webapp.https.address", new 
SingleHostTopologyUpdater("APP_TIMELINE_SERVER"));
 
 // HIVE_SERVER
+hiveSiteMap.put("hive.server2.authentication.ldap.url", new 
SingleHostTopologyUpdater("HIVE_SERVER2"));
 multiHiveSiteMap.put("hive.metastore.uris", new 
MultipleHostTopologyUpdater("HIVE_METASTORE", ',', true, true, true));
 dbHiveSiteMap.put("javax.jdo.option.ConnectionURL",
 new DBTopologyUpdater("MYSQL_SERVER", "hive-env", "hive_database"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad195c25/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index 0ad0351..928d1e0 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -1571,6 +1571,7 @@ public class BlueprintConfigurationProcessorTest {
 
 // setup properties that include host information
 hiveSiteProperties.put("hive.metastore.uris", "thrift://" + 
expectedHostName + ":" + expectedPortNum + "," + "thrift://" + 
expectedHostNameTwo + ":" + expectedPortNum);
+hiveSiteProperties.put("hive.server2.authentication.ldap.url", 
"ldap://myexternalhost.com:1389";);
 hiveSiteProperties.put("javax.jdo.option.ConnectionURL", expectedHostName 
+ ":" + expectedPortNum);
 hiveSiteProperties.put("hive.zookeeper.quorum", expectedHostName + ":" + 
expectedPortNum + "," + expectedHostNameTwo + ":" + expectedPortNum);
 
hiveSiteProperties.put("hive.cluster.delegation.token.store.zookeeper.connectString",
 expectedHostName + ":" + expectedPortNum + "," + expectedHostNameTwo + ":" + 
expectedPortNum);
@@ -1624,6 +1625,8 @@ public class BlueprintConfigurationProcessorTest {
 assertEquals("hive property not properly exported",
 createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.hive.hosts"));
 
+assertFalse("hive.server2.authentication.ldap.url should not have been 
present in the exported configuration",
+
hiveSiteProperties.containsKey("hive.server2.authentication.ldap.url"));
 assertEquals("hive property not properly exported",
   createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo), 
coreSiteProperties.get("hadoop.proxyuser.HTTP.hosts"));
 



[10/49] ambari git commit: AMBARI-19714. Style Fix.Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)

2017-01-27 Thread ncole
AMBARI-19714. Style Fix.Perf: start/stop all actions works much slower after 
few days of testing.(vbrodetskyi)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 6f78e611cbe4f1de7fa77e8caa56b59559a5e12e
Parents: e3a53ba
Author: Vitaly Brodetskyi 
Authored: Thu Jan 26 02:40:34 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Thu Jan 26 02:40:34 2017 +0200

--
 .../ambari/server/controller/AmbariManagementControllerImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f78e611/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 2882db8..0b3869b 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
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.controller;
 
-import javax.persistence.RollbackException;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL;
@@ -65,6 +64,8 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
+import javax.persistence.RollbackException;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ClusterNotFoundException;
 import org.apache.ambari.server.DuplicateResourceException;



[31/49] ambari git commit: AMBARI-18431: Storm Ambari view - Fixes to DAG, kafka offset info , Misc fixes.

2017-01-27 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/7e00f585/contrib/views/storm/src/main/resources/libs/dagre-d3/dagre-d3.min.js
--
diff --git 
a/contrib/views/storm/src/main/resources/libs/dagre-d3/dagre-d3.min.js 
b/contrib/views/storm/src/main/resources/libs/dagre-d3/dagre-d3.min.js
new file mode 100644
index 000..b4821d8
--- /dev/null
+++ b/contrib/views/storm/src/main/resources/libs/dagre-d3/dagre-d3.min.js
@@ -0,0 +1,28 @@
+!function(t){if("object"==typeof exports&&"undefined"!=typeof 
module)module.exports=t();else if("function"==typeof 
define&&define.amd)define([],t);else{var n;n="undefined"!=typeof 
window?window:"undefined"!=typeof global?global:"undefined"!=typeof 
self?self:this,n.dagreD3=t()}}(function(){var t;return function 
n(t,e,r){function i(a,u){if(!e[a]){if(!t[a]){var c="function"==typeof 
require&&require;if(!u&&c)return c(a,!0);if(o)return o(a,!0);var s=new 
Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var 
f=e[a]={exports:{}};t[a][0].call(f.exports,function(n){var e=t[a][1][n];return 
i(e?e:n)},f,f.exports,n,t,e,r)}return e[a].exports}for(var o="function"==typeof 
require&&require,a=0;ay?(y-v)/g:(y+v)/g,y=a*s-o*f,m=0>y?(y-v)/g:(y+v)/g,{x:_,y:m})}function
 i(t,n){return t*n>0}n.exports=r},{}],14:[function(t,n,e){function 
r(t,n){return t.intersect(n)}n.exports=r},{}],15:[function(t,n,e){function 
r(t,n,e){var 
r=t.x,o=t.y,a=[],u=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;n.forEach(function(t){u=Math.min(u,t.x),c=Math.min(c,t.y)});for(var
 s=r-t.width/2-u,f=o-t.height/2-c,l=0;l1&&a.sort(function(t,n){var 
r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i),a=n.x-e.x,u=n.y-e.y,c=Math.sqrt(a*a+u*u);return
 c>o?-1:o===c?0:1}),a[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE 
CENTER",t),t)}var 
i=t("./intersect-line");n.exports=r},{"./intersect-line":13}],16:[function(t,n,e){function
 r(t,n){var e,r,i=t.x,o=t.y,a=n.x-i,u=n.y-o,c=t.width/2,s=t.height/2;return 
Math.abs(u)*c>Math.abs(a)*s?(0>u&&(s=-s),e=0===u?0:s*a/u,r=s):(0>a&&(c=-c),e=c,r=0===a?0:c*u/a),{x:i+e,y:o+r}}n.exports=r},{}],17:[function(t,n,e){function
 r(t,n){var 
e=t.append("foreignObject").attr("width","10"),r=e.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml";);var
 o=n.label;switch(typeof 
o){case"function":r.insert(o);break;case"object":r.insert(function(){return 
o});break;default:r.html(o)}i.applyStyle(r,n.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var
 a=r[0][0].getBoundingCl
 ientRect();return e.attr("width",a.width).attr("height",a.height),e}var 
i=t("../util");n.exports=r},{"../util":27}],18:[function(t,n,e){function 
r(t,n,e){var 
r=n.label,u=t.append("g");"svg"===n.labelType?a(u,n):"string"!=typeof 
r||"html"===n.labelType?o(u,n):i(u,n);var 
c,s=u.node().getBBox();switch(e){case"top":c=-n.height/2;break;case"bottom":c=n.height/2-s.height;break;default:c=-s.height/2}return
 u.attr("transform","translate("+-s.width/2+","+c+")"),u}var 
i=t("./add-text-label"),o=t("./add-html-label"),a=t("./add-svg-label");n.exports=r},{"./add-html-label":17,"./add-svg-label":19,"./add-text-label":20}],19:[function(t,n,e){function
 r(t,n){var e=t;return 
e.node().appendChild(n.label),i.applyStyle(e,n.labelStyle),e}var 
i=t("../util");n.exports=r},{"../util":27}],20:[function(t,n,e){function 
r(t,n){for(var 
e=t.append("text"),r=i(n.label).split("\n"),a=0;au;++u)i(t,"borderLeft","_bl",e,a,u),i(t,"borderRight","_br",e,a,
 u)}}o.each(t.children(),n)}function i(t,n,e,r,i,o){var 
u={width:0,height:0,rank:o,borderType:n},c=i[n][o-1],s=a.addDummyNode(t,"border",u,e);i[n][o]=s,t.setParent(s,r),c&&t.setEdge(c,s,{weight:1})}var
 
o=t("./lodash"),a=t("./util");n.exports=r},{"./lodash":38,"./util":57}],32:[function(t,n,e){"use
 strict";function r(t){var 
n=t.graph().rankdir.toLowerCase();("lr"===n||"rl"===n)&&o(t)}function i(t){var 
n=t.graph().rankdir.toLowerCase();("bt"===n||"rl"===n)&&u(t),("lr"===n||"rl"===n)&&(s(t),o(t))}function
 
o(t){l.each(t.nodes(),function(n){a(t.node(n))}),l.each(t.edges(),function(n){a(t.edge(n))})}function
 a(t){var n=t.width;t.width=t.height,t.height=n}function 
u(t){l.each(t.nodes(),function(n){c(t.node(n))}),l.each(t.edges(),function(n){var
 e=t.edge(n);l.each(e.points,c),l.has(e,"y")&&c(e)})}function 
c(t){t.y=-t.y}function 
s(t){l.each(t.nodes(),function(n){f(t.node(n))}),l.each(t.edges(),function(n){var
 e=t.edge(n);l.each(e.points,f),l.has(e,"x")&&f(e)})}function f(t){var 
n=t.x;t.x=t.y,
 t.y=n}var 
l=t("./lodash");n.exports={adjust:r,undo:i}},{"./lodash":38}],33:[function(t,n,e){function
 r(){var t={};t._next=t._prev=t,this._sentinel=t}function 
i(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete 
t._prev}function o(t,n){return"_next"!==t&&"_prev"!==t?n:void 
0}n.exports=r,r.prototype.dequeue=function(){var 
t=this._sentinel,n=t._prev;return n!==t?(i(n),n):void 
0},r.prototype.enqueue=function(t){var 
n=this._sentinel;t._prev&&t._next&&

[41/49] ambari git commit: AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and Auth scheme. (Attila Magyar via stoader)

2017-01-27 Thread ncole
AMBARI-19725. Atlas deployment via Ambari should configure Zookeeper ACLs and 
Auth scheme. (Attila Magyar via stoader)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 16c0b68e6c60c84bef37ba566bce7a2ba349dbff
Parents: 2be01fb
Author: Attila Magyar 
Authored: Fri Jan 27 12:35:27 2017 +0100
Committer: Toader, Sebastian 
Committed: Fri Jan 27 12:35:47 2017 +0100

--
 .../package/scripts/metadata_server.py  | 13 ++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  4 +
 .../stacks/HDP/2.6/services/ATLAS/kerberos.json | 97 
 3 files changed, 113 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
index 36d990d..ad3270e 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
@@ -37,7 +37,7 @@ from resource_management.libraries.functions.constants import 
StackFeature
 from resource_management.core.resources.system import Directory
 from resource_management.core.logger import Logger
 from setup_ranger_atlas import setup_ranger_atlas
-
+from resource_management.core.resources.zkmigrator import ZkMigrator
 
 class MetadataServer(Script):
 
@@ -152,6 +152,17 @@ class MetadataServer(Script):
 
 File(params.pid_file, action="delete")
 
+  def disable_security(self, env):
+import params
+if not params.stack_supports_zk_security:
+  Logger.info("Stack doesn't support zookeeper security")
+  return
+if not params.zookeeper_quorum:
+  Logger.info("No zookeeper connection string. Skipping reverting ACL")
+  return
+zkmigrator = ZkMigrator(params.zookeeper_quorum, params.java_exec, 
params.java64_home, params.atlas_jaas_file, params.metadata_user)
+zkmigrator.set_acls(params.zk_root if params.zk_root.startswith('/') else 
'/' + params.zk_root, 'world:anyone:crdwa')
+
   def status(self, env):
 import status_params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index afd6dde..682fc9f 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -81,6 +81,9 @@ cluster_name = config['clusterName']
 
 java_version = expect("/hostLevelParams/java_version", int)
 
+zk_root = 
default('/configurations/application-properties/atlas.server.ha.zookeeper.zkroot',
 '/apache_atlas')
+stack_supports_zk_security = 
check_stack_feature(StackFeature.SECURE_ZOOKEEPER, 
version_for_stack_feature_checks)
+
 if security_enabled:
   _hostname_lowercase = config['hostname'].lower()
   _atlas_principal_name = 
config['configurations']['application-properties']['atlas.authentication.principal']
@@ -115,6 +118,7 @@ user_group = 
config['configurations']['cluster-env']['user_group']
 
 # metadata env
 java64_home = config['hostLevelParams']['java_home']
+java_exec = format("{java64_home}/bin/java")
 env_sh_template = config['configurations']['atlas-env']['content']
 
 # credential provider

http://git-wip-us.apache.org/repos/asf/ambari/blob/16c0b68e/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
new file mode 100644
index 000..1cc581f
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/kerberos.json
@@ -0,0 +1,97 @@
+{
+  "services": [
+{
+  "name": "ATLAS",
+  "configurations": [
+{
+  "application-properties": {
+"atlas.authentication.method.

[15/49] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)

2017-01-27 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/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 55f3d30..af4539d 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
@@ -197,7 +197,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 if "referenceNodeManagerHost" in clusterData:
   nodemanagerMinRam = 
min(clusterData["referenceNodeManagerHost"]["total_mem"]/1024, 
nodemanagerMinRam)
 
-callContext = getCallContext(services)
+callContext = self.getCallContext(services)
 putYarnProperty('yarn.nodemanager.resource.memory-mb', 
int(round(min(clusterData['containers'] * clusterData['ramPerContainer'], 
nodemanagerMinRam
 # read from the supplied config
 #if 'recommendConfigurations' != callContext and \
@@ -248,7 +248,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
putYarnPropertyAttribute("yarn.timeline-service.http-authentication.proxyuser.{0}.hosts".format(old_ambari_user),
 'delete', 'true')
 
putYarnPropertyAttribute("yarn.timeline-service.http-authentication.proxyuser.{0}.groups".format(old_ambari_user),
 'delete', 'true')
 
-
   def recommendMapReduce2Configurations(self, configurations, clusterData, 
services, hosts):
 putMapredProperty = self.putProperty(configurations, "mapred-site", 
services)
 putMapredProperty('yarn.app.mapreduce.am.resource.mb', 
int(clusterData['amMemory']))
@@ -269,27 +268,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 if mr_queue is not None:
   putMapredProperty("mapreduce.job.queuename", mr_queue)
 
-  def getAmbariUser(self, services):
-ambari_user = services['ambari-server-properties']['ambari-server.user']
-if "cluster-env" in services["configurations"] \
-  and "ambari_principal_name" in 
services["configurations"]["cluster-env"]["properties"] \
-and "security_enabled" in 
services["configurations"]["cluster-env"]["properties"] \
-and 
services["configurations"]["cluster-env"]["properties"]["security_enabled"].lower()
 == "true":
-  ambari_user = 
services["configurations"]["cluster-env"]["properties"]["ambari_principal_name"]
-  ambari_user = ambari_user.split('@')[0]
-return ambari_user
-
-  def getOldAmbariUser(self, services):
-ambari_user = None
-if "cluster-env" in services["configurations"]:
-  if "security_enabled" in 
services["configurations"]["cluster-env"]["properties"] \
-  and 
services["configurations"]["cluster-env"]["properties"]["security_enabled"].lower()
 == "true":
- ambari_user = 
services['ambari-server-properties']['ambari-server.user']
-  elif "ambari_principal_name" in 
services["configurations"]["cluster-env"]["properties"]:
- ambari_user = 
services["configurations"]["cluster-env"]["properties"]["ambari_principal_name"]
- ambari_user = ambari_user.split('@')[0]
-return ambari_user
-
   def getAmbariProxyUsersForHDFSValidationItems(self, properties, services):
 validationItems = []
 servicesList = self.get_services_list(services)
@@ -828,148 +806,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
   zookeeper_port = 
services['configurations']['zoo.cfg']['properties']['clientPort']
 return zookeeper_port
 
-  def getConfigurationClusterSummary(self, servicesList, hosts, components, 
services):
-
-hBaseInstalled = False
-if 'HBASE' in servicesList:
-  hBaseInstalled = True
-
-cluster = {
-  "cpu": 0,
-  "disk": 0,
-  "ram": 0,
-  "hBaseInstalled": hBaseInstalled,
-  "components": components
-}
-
-if len(hosts["items"]) > 0:
-  nodeManagerHosts = self.getHostsWithComponent("YARN", "NODEMANAGER", 
services, hosts)
-  # NodeManager host with least memory is generally used in calculations 
as it will work in larger hosts.
-  if nodeManagerHosts is not None and len(nodeManagerHosts) > 0:
-nodeManagerHost = nodeManagerHosts[0];
-for nmHost in nodeManagerHosts:
-  if nmHost["Hosts"]["total_mem"] < 
nodeManagerHost["Hosts"]["total_mem"]:
-nodeManagerHost = nmHost
-host = nodeManagerHost["Hosts"]
-cluster["referenceNodeManagerHost"] = host
-  else:
-host = hosts["items"][0]["Hosts"]
-  cluster["referenceHost"] = host
-  cluster["cpu"] = host["cpu_count"]
-  cluster["disk"] = len(host["disk_info"])
-  cluster["ram"] = int(host["total_mem"] / (1024 * 1024))
-
-ramRecommendations = [
-  {"os":1, "hbase":1},
-  {"os":2, "hbase":1},
-  {"os":2, "hbase":2},
-  {"os":4, "hbase":4},
-  {"os

[24/49] ambari git commit: AMBARI-19706. Slider Client Install failed (aonishuk)

2017-01-27 Thread ncole
AMBARI-19706. Slider Client Install failed (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e7e4cb2064276756d4e9831c376e686a5d19eb09
Parents: b92b5f5
Author: Andrew Onishuk 
Authored: Thu Jan 26 19:06:30 2017 +0200
Committer: Andrew Onishuk 
Committed: Thu Jan 26 19:06:30 2017 +0200

--
 ambari-agent/src/main/python/ambari_agent/PythonExecutor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e7e4cb20/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py 
b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
index dfe361a..5a896ff 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
@@ -130,7 +130,7 @@ class PythonExecutor(object):
 if OSCheck.is_windows_family():
   cmd_list = ["WMIC path win32_process get Caption,Processid,Commandline", 
"netstat -an"]
 else:
-  cmd_list = ["ps faux", "netstat -tulpn"]
+  cmd_list = ["export COLUMNS= ; ps faux", "netstat -tulpn"]
 
 shell_runner = shellRunner()
 



[27/49] ambari git commit: AMBARI-19729: Workflow Manager: Path does not get set to selected directory when creating FS action node. (sangeetar)

2017-01-27 Thread ncole
AMBARI-19729: Workflow Manager: Path does not get set to selected directory 
when creating FS action node. (sangeetar)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 828e24f063820b6366651410071701067338bc7d
Parents: e8dc698
Author: Sangeeta Ravindran 
Authored: Thu Jan 26 13:40:53 2017 -0800
Committer: Sangeeta Ravindran 
Committed: Thu Jan 26 13:40:53 2017 -0800

--
 .../src/main/resources/ui/app/components/prepare-config-fs.js| 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/828e24f0/contrib/views/wfmanager/src/main/resources/ui/app/components/prepare-config-fs.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/prepare-config-fs.js
 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/prepare-config-fs.js
index ba9b91e..15592a4 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/prepare-config-fs.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/prepare-config-fs.js
@@ -32,9 +32,7 @@ export default Ember.Component.extend({
   var filePathModel = this.get('filePathModel');
   if(filePathModel && filePathModel.hasOwnProperty("index") && 
filePathModel.hasOwnProperty("property")){
 var fileOperation = this.get('fsOps').objectAt(filePathModel.index);
-var settings = fileOperation.settings;
-Ember.set(settings, filePathModel.property, fileName);
-Ember.set(fileOperation, "settings", settings);
+Ember.set(fileOperation, filePathModel.property, fileName);
   }else{
 this.set(this.get('filePathModel'), fileName);
   }



[19/49] ambari git commit: AMBARI-19713 Styles for showing Config Changes need more polishing. (ababiichuk)

2017-01-27 Thread ncole
AMBARI-19713 Styles for showing Config Changes need more polishing. (ababiichuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 03d90ae876c405d702b08609765715713d08dc19
Parents: 35d2773
Author: ababiichuk 
Authored: Wed Jan 25 20:44:26 2017 +0200
Committer: ababiichuk 
Committed: Thu Jan 26 12:31:59 2017 +0200

--
 ambari-web/app/styles/application.less  | 66 +-
 ambari-web/app/styles/common.less   |  6 +-
 .../modal_popups/dependent_configs_list.hbs | 91 +---
 .../modal_popups/dependent_configs_table.hbs| 72 
 .../dependent_configs_list_popup.js | 19 
 5 files changed, 141 insertions(+), 113 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/03d90ae8/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index cf84c5b..612c09c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -2290,28 +2290,52 @@ input[type="radio"].align-checkbox, 
input[type="checkbox"].align-checkbox {
   td {
 min-width: 120px;
 word-break: break-all;
+&.check-box-col {
+  min-width: 5px;
+  width: 5px;
+}
+&.config-dependency-name {
+  min-width: @config-dependency-t-name-width;
+}
+&.config-dependency-service {
+  min-width: @config-dependency-t-service-width;
+  max-width: @config-dependency-t-service-width;
+}
+&.config-dependency-group {
+  max-width: @config-dependency-t-group-width;
+}
+&.config-dependency-filename {
+  max-width: @config-dependency-t-filename-width;
+}
+&.config-dependency-value,
+&.config-dependency-recommended-value {
+  width: @config-dependency-t-value-width;
+  min-width: @config-dependency-t-value-width;
+}
+.diff {
+  td {
+color: #fff;
+&.empty {
+  width: 50%;
+}
+&.delete {
+  background-color: @health-status-red !important;
+}
+&.insert {
+  background-color: @health-status-green !important;
+}
+&.replace {
+  background-color: @health-status-orange !important;
+}
+  }
+}
   }
-  td.check-box-col {
-min-width: 5px;
-width: 5px;
-  }
-  td.config-dependency-name {
-min-width: @config-dependency-t-name-width;
-  }
-  td.config-dependency-service {
-min-width: @config-dependency-t-service-width;
-max-width: @config-dependency-t-service-width;
-  }
-  td.config-dependency-group {
-max-width: @config-dependency-t-group-width;
-  }
-  td.config-dependency-filename {
-max-width: @config-dependency-t-filename-width;
-  }
-  td.config-dependency-value,
-  td.config-dependency-recommended-value {
-width: @config-dependency-t-value-width;
-min-width: @config-dependency-t-value-width;
+  .config-dependencies-headings-wrapper {
+width: 100%;
+.config-dependencies-heading {
+  float: left;
+  width: 50%;
+}
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/03d90ae8/ambari-web/app/styles/common.less
--
diff --git a/ambari-web/app/styles/common.less 
b/ambari-web/app/styles/common.less
index 5541d7c..29bb49d 100644
--- a/ambari-web/app/styles/common.less
+++ b/ambari-web/app/styles/common.less
@@ -35,11 +35,11 @@
 /
 * Health status(service/host/host component health)icon colors
 ***/
-@health-status-red: #ff;
+@health-status-red: #EF6162;
 @health-status-blue: #ff;
-@health-status-green: #5AB400;
+@health-status-green: #3FAE2A;
 @health-status-yellow: #FFD13D;
-@health-status-orange: #FF8E00;
+@health-status-orange: #E98A41;
 @maintenance-black: #000;
 /
 * Health status(service/host/host component health)icon colors ends

http://git-wip-us.apache.org/repos/asf/ambari/blob/03d90ae8/ambari-web/app/templates/common/modal_popups/dependent_configs_list.hbs
--
diff --git 
a/ambari-web/app/templates/common/modal_popups/dependent_configs_list.hbs 
b/ambari-web/app/templates/common/modal_popups/dependent_configs_list.hbs
index c53e29d..3a03c07 100644
--- a/ambari-web/app/templates/common/modal_pop

[46/49] ambari git commit: AMBARI-19728: Custom command name rendered incorrectly (dili)

2017-01-27 Thread ncole
AMBARI-19728: Custom command name rendered incorrectly (dili)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 77937e383d6ed0e582192e3a75913f60a32dc0eb
Parents: 34d029b
Author: Di Li 
Authored: Fri Jan 27 11:19:29 2017 -0500
Committer: Di Li 
Committed: Fri Jan 27 11:19:29 2017 -0500

--
 ambari-web/app/utils/helper.js   | 1 +
 ambari-web/test/utils/helper_test.js | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/77937e38/ambari-web/app/utils/helper.js
--
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index 927f8a6..f6f2532 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -592,6 +592,7 @@ App.format = {
 name = name.split(separator).map(function(singleName) {
   return this.normalizeName(singleName.toUpperCase());
 }, this).join(' ');
+break;
   }
 }
 return name.capitalize();

http://git-wip-us.apache.org/repos/asf/ambari/blob/77937e38/ambari-web/test/utils/helper_test.js
--
diff --git a/ambari-web/test/utils/helper_test.js 
b/ambari-web/test/utils/helper_test.js
index b438a7a..4b9ec36 100644
--- a/ambari-web/test/utils/helper_test.js
+++ b/ambari-web/test/utils/helper_test.js
@@ -298,6 +298,8 @@ describe('utils/helper', function() {
   'app-timeline-server': 'App Timeline Server',
   'APP TIMELINE SERVER': 'App Timeline Server',
   'app timeline server': 'App Timeline Server',
+  'run-hcat-sync': 'Run HCat Client Sync',
+  'rUN_hCAt_syNc': 'Run HCat Client Sync',
   'FALCON': 'Falcon',
   'falcon': 'Falcon'
 };



[49/49] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade

2017-01-27 Thread ncole
Merge branch 'trunk' into branch-dev-patch-upgrade


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 535327d12f2b3b44553f0f1aec34b87515a0e20b
Parents: 42b8dcf 9963ac8
Author: Nate Cole 
Authored: Fri Jan 27 13:17:01 2017 -0500
Committer: Nate Cole 
Committed: Fri Jan 27 13:17:01 2017 -0500

--
 .../controllers/clusters/UserAccessListCtrl.js  |   16 +-
 .../main/python/ambari_agent/PythonExecutor.py  |2 +-
 .../resource_management/TestPackagesAnalyzer.py |   46 +
 .../ambari_commons/ambari_metrics_helper.py |9 +-
 .../libraries/functions/get_stack_version.py|2 +-
 .../libraries/functions/hive_check.py   |   13 +-
 .../libraries/functions/packages_analyzer.py|2 +-
 .../libraries/functions/version_select_util.py  |5 +-
 .../timeline/AbstractTimelineMetricsSink.java   |1 +
 .../kafka/KafkaTimelineMetricsReporter.java |   32 +-
 .../kafka/KafkaTimelineMetricsReporterTest.java |   26 +
 .../storm/StormTimelineMetricsReporter.java |9 +-
 .../storm/StormTimelineMetricsReporter.java |5 +-
 .../sink/storm/StormTimelineMetricsSink.java|6 +-
 ambari-server/conf/unix/ambari.properties   |4 +-
 .../commands/StackAdvisorCommand.java   |6 +-
 .../AmbariManagementControllerImpl.java |   21 +-
 .../BlueprintConfigurationProcessor.java|1 +
 .../StackDependencyResourceProvider.java|8 +
 .../UpdateKerberosConfigsServerAction.java  |   17 +
 .../server/state/DependencyConditionInfo.java   |   13 +
 .../server/state/ServiceComponentImpl.java  |1 +
 .../main/python/ambari_server/serverSetup.py|4 +-
 .../HDP/grafana-hdfs-topn.json  |   20 +-
 .../package/scripts/metadata_server.py  |   13 +-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |4 +
 .../DRUID/0.9.2/configuration/druid-router.xml  |2 +-
 .../HDFS/3.0.0.3.0/service_advisor.py   |4 -
 .../alert_hive_interactive_thrift_port.py   |   15 +-
 .../package/alerts/alert_hive_thrift_port.py|   15 +-
 .../package/scripts/hive_server_interactive.py  |  186 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |7 +
 .../scripts/setup_ranger_hive_interactive.py|6 +-
 .../0.7.0/configuration/ranger-ugsync-site.xml  |   33 +
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |   73 +-
 .../YARN/3.0.0.3.0/service_advisor.py   | 1789 ++
 .../src/main/resources/properties.json  |1 +
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |  343 +---
 .../stacks/HDP/2.1/services/stack_advisor.py|   19 +-
 .../stacks/HDP/2.2/services/stack_advisor.py|1 -
 .../stacks/HDP/2.3/services/stack_advisor.py|   43 +-
 .../services/HIVE/configuration/hive-env.xml|   36 +-
 .../stacks/HDP/2.5/services/stack_advisor.py|   70 +-
 .../stacks/HDP/2.6/services/ATLAS/kerberos.json |   97 +
 .../services/HIVE/configuration/hive-env.xml|2 +-
 .../HIVE/configuration/hive-interactive-env.xml |   13 +
 .../stacks/HDP/2.6/services/stack_advisor.py|   36 +-
 .../stacks/HDP/3.0/role_command_order.json  |   27 +-
 .../stacks/HDP/3.0/services/YARN/metainfo.xml   |3 +-
 .../src/main/resources/stacks/stack_advisor.py  |  350 +++-
 .../BlueprintConfigurationProcessorTest.java|3 +
 .../UpdateKerberosConfigsServerActionTest.java  |   39 +-
 .../src/test/python/TestVersionSelectUtil.py|   40 +
 .../services-master_ambari_colo-3-hosts.json|   33 +-
 .../services-master_standby_colo-3-hosts.json   |   33 +-
 .../configs/services-normal-hawq-3-hosts.json   |   33 +-
 .../configs/services-normal-nohawq-3-hosts.json |   10 +-
 .../services-standby_ambari_colo-3-hosts.json   |   33 +-
 .../2.0.6/HIVE/test_hive_service_check.py   |   10 +-
 .../stacks/2.0.6/common/test_stack_advisor.py   |  107 +-
 .../2.3/common/services-sparkts-hive.json   |  102 +-
 .../stacks/2.3/common/services-sparkts.json |   77 +-
 .../stacks/2.3/common/test_stack_advisor.py |2 +-
 .../stacks/2.5/HIVE/test_hive_server_int.py |  421 -
 .../2.5/common/services-normal-his-2-hosts.json |  114 +-
 .../2.5/configs/hsi_default_for_restart.json| 1256 
 .../stacks/2.6/common/test_stack_advisor.py |   67 +
 .../mixins/common/configs/enhanced_configs.js   |   22 +-
 ambari-web/app/routes/main.js   |5 +-
 ambari-web/app/styles/application.less  |   66 +-
 ambari-web/app/styles/common.less   |6 +-
 .../common/configs/config_history_flow.hbs  |2 +-
 .../common/configs/service_version_box.hbs  |2 +-
 .../modal_popups/dependent_configs_list.hbs

[07/49] ambari git commit: AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle)

2017-01-27 Thread ncole
AMBARI-19661. Kafka Brokers go down after Wire Encryption. (dsen via swagle)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 114f0e8ba660170d700ac3a5b47d6697f9ac90c5
Parents: c00399c
Author: Siddharth Wagle 
Authored: Wed Jan 25 12:33:21 2017 -0800
Committer: Siddharth Wagle 
Committed: Wed Jan 25 12:33:21 2017 -0800

--
 .../kafka/KafkaTimelineMetricsReporter.java | 26 +++-
 .../kafka/KafkaTimelineMetricsReporterTest.java | 26 
 2 files changed, 41 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/114f0e8b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
index fef1f24..5892599 100644
--- 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
+++ 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
@@ -60,17 +60,21 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
 
   private final static Log LOG = 
LogFactory.getLog(KafkaTimelineMetricsReporter.class);
 
-  private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = 
"kafka.timeline.metrics.sendInterval";
-  private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = 
"kafka.timeline.metrics.maxRowCacheSize";
-  private static final String TIMELINE_HOSTS_PROPERTY = 
"kafka.timeline.metrics.hosts";
-  private static final String TIMELINE_PORT_PROPERTY = 
"kafka.timeline.metrics.port";
-  private static final String TIMELINE_PROTOCOL_PROPERTY = 
"kafka.timeline.metrics.protocol";
-  private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = 
"kafka.timeline.metrics.reporter.enabled";
-  private static final String EXCLUDED_METRICS_PROPERTY = 
"external.kafka.metrics.exclude.prefix";
-  private static final String INCLUDED_METRICS_PROPERTY = 
"external.kafka.metrics.include.prefix";
+  private static final String TIMELINE_METRICS_KAFKA_PREFIX = 
"kafka.timeline.metrics.";
+  private static final String TIMELINE_METRICS_SEND_INTERVAL_PROPERTY = 
"sendInterval";
+  private static final String TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + "maxRowCacheSize";
+  private static final String TIMELINE_HOSTS_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + "hosts";
+  private static final String TIMELINE_PORT_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + "port";
+  private static final String TIMELINE_PROTOCOL_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + "protocol";
+  private static final String TIMELINE_REPORTER_ENABLED_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + "reporter.enabled";
+  private static final String TIMELINE_METRICS_SSL_KEYSTORE_PATH_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PATH_PROPERTY;
+  private static final String TIMELINE_METRICS_SSL_KEYSTORE_TYPE_PROPERTY = 
TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_TYPE_PROPERTY;
+  private static final String TIMELINE_METRICS_SSL_KEYSTORE_PASSWORD_PROPERTY 
= TIMELINE_METRICS_KAFKA_PREFIX + SSL_KEYSTORE_PASSWORD_PROPERTY;
   private static final String TIMELINE_DEFAULT_HOST = "localhost";
   private static final String TIMELINE_DEFAULT_PORT = "6188";
   private static final String TIMELINE_DEFAULT_PROTOCOL = "http";
+  private static final String EXCLUDED_METRICS_PROPERTY = 
"external.kafka.metrics.exclude.prefix";
+  private static final String INCLUDED_METRICS_PROPERTY = 
"external.kafka.metrics.include.prefix";
 
   private volatile boolean initialized = false;
   private boolean running = false;
@@ -159,9 +163,9 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
 setMetricsCache(new TimelineMetricsCache(maxRowCacheSize, 
metricsSendInterval));
 
 if (metricCollectorProtocol.contains("https")) {
-  String trustStorePath = 
props.getString(SSL_KEYSTORE_PATH_PROPERTY).trim();
-  String trustStoreType = 
props.getString(SSL_KEYSTORE_TYPE_PROPERTY).trim();
-  String trustStorePwd = 
props.getString(SSL_KEYSTORE_PASSWORD_PROPERTY).trim();
+  String trustStorePath = 
props.getString(TIMELINE_M

[34/49] ambari git commit: AMBARI-19604. Need to perform sanity checks before starting the oozie view. (Padma Priya N via gauravn7)

2017-01-27 Thread ncole
AMBARI-19604. Need to perform sanity checks before starting the oozie view. 
(Padma Priya N via gauravn7)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: d2862fc6513f6f9c1077c3a7de06ab698e29b22a
Parents: 8b4dd3a
Author: Gaurav Nagar 
Authored: Fri Jan 27 11:26:18 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 11:27:31 2017 +0530

--
 .../main/resources/ui/app/controllers/index.js  | 39 +
 .../src/main/resources/ui/app/routes/index.js   | 90 +++-
 .../ui/app/templates/design-loading.hbs | 26 ++
 .../main/resources/ui/app/templates/index.hbs   | 74 
 .../main/resources/ui/app/templates/loading.hbs | 26 --
 5 files changed, 227 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d2862fc6/contrib/views/wfmanager/src/main/resources/ui/app/controllers/index.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/controllers/index.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/controllers/index.js
new file mode 100644
index 000..f4d93ea
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/controllers/index.js
@@ -0,0 +1,39 @@
+/*
+*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.Controller.extend({
+  progressWidth : '10%',
+  serviceChecksComplete : false,
+  issues : Ember.A([]),
+  serviceChecks : Ember.A([
+{'name':'oozie', 'checkCompleted':false, isAvailable : true, 'displayName' 
: 'Oozie Test', 'errorMessage' : 'Oozie service check failed'},
+{'name':'hdfs', 'checkCompleted':false, isAvailable : true, 'displayName' 
: 'HDFS Test', 'errorMessage' : 'HDFS service check failed'},
+{'name':'homeDir', 'checkCompleted':false, isAvailable : true, 
'displayName' : 'User Home Directory Test', 'errorMessage' : 'User home 
directory not found'}
+  ]),
+  width : 
Ember.computed('serviceChecks.@each.checkCompleted','serviceChecks.@each.isAvailable',
 function(){
+let width = 10;
+this.get('serviceChecks').forEach((check)=>{
+  if(check.checkCompleted && check.isAvailable){
+width += 30;
+  }
+});
+return Ember.String.htmlSafe(`${width}%`);
+  })
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/d2862fc6/contrib/views/wfmanager/src/main/resources/ui/app/routes/index.js
--
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/routes/index.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/routes/index.js
index 23609e9..b9ea770 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/routes/index.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/routes/index.js
@@ -18,7 +18,93 @@
 import Ember from 'ember';
 
 export default Ember.Route.extend({
-beforeModel() {
-this.transitionTo('design');
+afterModel(){
+  let ooziePromise = this.checkOozie();
+  let hdfsPromise = this.checkHdfs();
+  let homeDirPromise = this.checkUserHome();
+  let serviceChecks = this.controllerFor('index').get('serviceChecks');
+  this.controllerFor('index').get('issues').clear();
+  this.processServiceCheckPromise(ooziePromise, 
serviceChecks.findBy('name', 'oozie'));
+  this.processServiceCheckPromise(hdfsPromise, 
serviceChecks.findBy('name', 'hdfs'));
+  this.processServiceCheckPromise(homeDirPromise, 
serviceChecks.findBy('name', 'homeDir'));
+  Promise.all([ooziePromise, hdfsPromise, homeDirPromise]).then(()=>{
+this.controllerFor('index').set('serviceChecksComplete', true);
+Ember.run.later(()=>{
+  this.transitionTo('design');
+  }, 2000);
+  }).catch((errors)=>{
+this.con

[04/49] ambari git commit: Revert "AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul)"

2017-01-27 Thread ncole
Revert "AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging 
(Abhishek Kumar via pallavkul)"

This reverts commit 0de31d6a59c2ec847fc060dffb9e69431eee4ebc.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 3217fbc06f9882e47e021472b819e1791b44e9a6
Parents: 21c18a7
Author: pallavkul 
Authored: Thu Jan 26 00:58:36 2017 +0530
Committer: pallavkul 
Committed: Thu Jan 26 00:58:36 2017 +0530

--
 .../src/main/resources/ui/app/components/query-editor.js| 8 
 .../views/hive20/src/main/resources/ui/app/styles/app.scss  | 9 -
 contrib/views/hive20/src/main/resources/ui/bower.json   | 1 -
 contrib/views/hive20/src/main/resources/ui/package.json | 1 -
 4 files changed, 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js
--
diff --git 
a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js 
b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js
index 7bfe223..27d43d5 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js
@@ -74,14 +74,6 @@ export default Ember.Component.extend({
   });
 });
 
-this.$('.CodeMirror').resizable({
-  handles: 's',
-
-  resize: function () {
-Ember.run.debounce(this, updateSize, 150);
-  }
-}).find('.ui-resizable-s').addClass('grip fa fa-reorder');
-
 
   }.on('didInsertElement'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
--
diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss 
b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
index 7ab6992..5ae65d1 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
+++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss
@@ -221,15 +221,6 @@ pre {
   overflow-y: scroll;
 }
 
-.grip {
-  height: 20px;
-  border: 0 1px 1px solid #ddd;
-  background-color: #f5f5f5;
-  color: #bbb;
-  text-align: center;
-  font-size: inherit;
-}
-
 .hv-dropdown {
   position: absolute;
   .dropdown-menu {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/bower.json
--
diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json 
b/contrib/views/hive20/src/main/resources/ui/bower.json
index fcd11cf..4eadee7 100644
--- a/contrib/views/hive20/src/main/resources/ui/bower.json
+++ b/contrib/views/hive20/src/main/resources/ui/bower.json
@@ -6,7 +6,6 @@
 "ember-qunit-notifications": "0.1.0",
 "font-awesome": "~4.5.0",
 "codemirror": "~5.15.0",
-"jquery-ui": "~1.12.1",
 "bootstrap-treeview": "~1.2.0"
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3217fbc0/contrib/views/hive20/src/main/resources/ui/package.json
--
diff --git a/contrib/views/hive20/src/main/resources/ui/package.json 
b/contrib/views/hive20/src/main/resources/ui/package.json
index d04a092..ed7a299 100644
--- a/contrib/views/hive20/src/main/resources/ui/package.json
+++ b/contrib/views/hive20/src/main/resources/ui/package.json
@@ -34,7 +34,6 @@
 "ember-cli-htmlbars": "^1.0.3",
 "ember-cli-htmlbars-inline-precompile": "^0.3.1",
 "ember-cli-inject-live-reload": "^1.4.0",
-"ember-cli-jquery-ui": "0.0.20",
 "ember-cli-jshint": "^1.0.0",
 "ember-cli-moment-shim": "3.0.1",
 "ember-cli-qunit": "^2.0.0",



[26/49] ambari git commit: AMBARI-19718. Fix Druid Router default config for tierToBrokerMap. (Nishant Bangarwa via Swapan Shridhar).

2017-01-27 Thread ncole
AMBARI-19718. Fix Druid Router default config for tierToBrokerMap. (Nishant 
Bangarwa via Swapan Shridhar).


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e8dc698dc13875f9843962c7448d94cb4555348e
Parents: cc9c928
Author: Swapan Shridhar 
Authored: Thu Jan 26 11:23:41 2017 -0800
Committer: Swapan Shridhar 
Committed: Thu Jan 26 11:23:41 2017 -0800

--
 .../common-services/DRUID/0.9.2/configuration/druid-router.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e8dc698d/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-router.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-router.xml
 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-router.xml
index bfb0d21..d544315 100644
--- 
a/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-router.xml
+++ 
b/ambari-server/src/main/resources/common-services/DRUID/0.9.2/configuration/druid-router.xml
@@ -49,7 +49,7 @@
   
   
 druid.router.tierToBrokerMap
-{}
+{"_default_tier":"druid/broker"}
 
   Used to route queries for a certain tier of data to their appropriate 
broker. An ordered JSON map of
   tiers to broker names. The priority of brokers is based on the ordering.



[09/49] ambari git commit: AMBARI-19714. Perf: start/stop all actions works much slower after few days of testing.(vbrodetskyi)

2017-01-27 Thread ncole
AMBARI-19714. Perf: start/stop all actions works much slower after few days of 
testing.(vbrodetskyi)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e3a53ba398d675b62d5ebf8c5324fbce2f3b2f79
Parents: fda3de6
Author: Vitaly Brodetskyi 
Authored: Thu Jan 26 01:34:23 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Thu Jan 26 01:34:23 2017 +0200

--
 .../AmbariManagementControllerImpl.java | 23 +---
 contrib/utils/perf/deploy-gce-perf-cluster.py   |  4 ++--
 2 files changed, 17 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3a53ba3/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 d03b2bb..2882db8 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
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.controller;
 
+import javax.persistence.RollbackException;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_DRIVER;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_PASSWORD;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.AMBARI_DB_RCA_URL;
@@ -64,8 +65,6 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
-import javax.persistence.RollbackException;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ClusterNotFoundException;
 import org.apache.ambari.server.DuplicateResourceException;
@@ -2186,7 +2185,9 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 RoleCommand roleCommand,
 Map commandParamsInp,
 ServiceComponentHostEvent event,
-boolean skipFailure
+boolean skipFailure,
+ClusterVersionEntity effectiveClusterVersion,
+boolean isUpgradeSuspended
 )
 throws AmbariException {
 
@@ -2302,7 +2303,6 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 commandParams.put(MAX_DURATION_OF_RETRIES, 
Integer.toString(retryMaxTime));
 commandParams.put(COMMAND_RETRY_ENABLED, 
Boolean.toString(retryEnabled));
 
-ClusterVersionEntity effectiveClusterVersion = 
cluster.getEffectiveClusterVersion();
 if (effectiveClusterVersion != null) {
  commandParams.put(VERSION, 
effectiveClusterVersion.getRepositoryVersion().getVersion());
 }
@@ -2360,7 +2360,6 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 // in the context of an upgrade and we should send the repo ID which 
matches
 // the version being send down
 RepositoryVersionEntity repoVersion = null;
-ClusterVersionEntity effectiveClusterVersion = 
cluster.getEffectiveClusterVersion();
 if (null != effectiveClusterVersion) {
   repoVersion = effectiveClusterVersion.getRepositoryVersion();
 } else {
@@ -2426,7 +2425,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 // !!! consistent with where custom commands put variables
 // !!! after-INSTALL hook checks this such that the stack selection tool 
won't
 // select-all to a version that is not being upgraded, breaking RU
-if (cluster.isUpgradeSuspended()) {
+if (isUpgradeSuspended) {
   cluster.addSuspendedUpgradeParameters(commandParams, roleParams);
 }
 
@@ -2561,6 +2560,12 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
   return requestStages;
 }
 
+// caching effective cluster version
+ClusterVersionEntity effectiveClusterVersion = 
cluster.getEffectiveClusterVersion();
+
+// caching upgrade suspended
+boolean isUpgradeSuspended = cluster.isUpgradeSuspended();
+
 // smoke test any service that goes from installed to started
 Set smokeTestServices = getServicesForSmokeTests(cluster,
 

[43/49] ambari git commit: AMBARI-19742. User preference like opened tabs/work in-progress should not be available to a different user. (Venkata Sairam via gauravn7)

2017-01-27 Thread ncole
AMBARI-19742. User preference like opened tabs/work in-progress should not be 
available to a different user. (Venkata Sairam via gauravn7)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: fb951387706387651f3b31d34f4c16c9b4c9ec4a
Parents: cc30798
Author: Gaurav Nagar 
Authored: Fri Jan 27 19:26:33 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 19:29:25 2017 +0530

--
 .../ui/app/components/bundle-config.js  | 27 ++---
 .../resources/ui/app/components/coord-config.js | 64 +++-
 .../ui/app/components/designer-workspace.js | 25 
 .../ui/app/components/flow-designer.js  | 12 ++--
 .../main/resources/ui/app/services/user-info.js | 56 +
 .../ui/app/services/workspace-manager.js| 61 ++-
 .../ui/tests/unit/services/user-info-test.js| 29 +
 7 files changed, 207 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb951387/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index e29935c..8b4c3d8 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -48,23 +48,19 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   fileBrowser : Ember.inject.service('file-browser'),
   workspaceManager : Ember.inject.service('workspace-manager'),
   initialize : function(){
-var draftBundle = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftBundle){
-  this.set('bundle', JSON.parse(draftBundle));
-}else{
-  this.set('bundle', this.createBundle());
-}
+var self = this;
+
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id')).promise.then(function(draftBundle){
+  self.loadBundle(draftBundle);
+}.bind(this)).catch(function(data){
+  self.loadBundle();
+}.bind(this));
 this.get('fileBrowser').on('fileBrowserOpened',function(context){
   this.get('fileBrowser').setContext(context);
 }.bind(this));
 this.on('fileSelected',function(fileName){
   this.set(this.get('filePathModel'), fileName);
 }.bind(this));
-if(Ember.isBlank(this.get('bundle.name'))){
-  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
-}
 this.set('showErrorMessage', false);
-this.schedulePersistWorkInProgress();
   }.on('init'),
   onDestroy : function(){
 Ember.run.cancel(this.schedulePersistWorkInProgress);
@@ -92,6 +88,17 @@ export default Ember.Component.extend(Ember.Evented, 
Validations, {
   bundleFilePath : Ember.computed('tabInfo.filePath', function(){
 return this.get('tabInfo.filePath');
   }),
+  loadBundle(draftBundle){
+if(draftBundle){
+  this.set('bundle', JSON.parse(draftBundle));
+}else{
+  this.set('bundle', this.createBundle());
+}
+if(Ember.isBlank(this.get('bundle.name'))){
+  this.set('bundle.name', Ember.copy(this.get('tabInfo.name')));
+}
+this.schedulePersistWorkInProgress();
+  }, 
   schedulePersistWorkInProgress (){
 Ember.run.later(function(){
   this.persistWorkInProgress();

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb951387/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index fa664c7..57dbeb0 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -75,22 +75,13 @@ export default Ember.Component.extend(Validations, 
Ember.Evented, {
 this.persistWorkInProgress();
   }.on('willDestroyElement'),
   initialize : function(){
-var draftCoordinator = 
this.get('workspaceManager').restoreWorkInProgress(this.get('tabInfo.id'));
-if(draftCoordinator){
-  this.set('coordinator', JSON.parse(draftCoordinator));
-}else{
-  this.set('coordinator', this.createNewCoordinator());
-}
-this.set('timeUnitOptions',Ember.A([]));
-this.get('timeUnitOptions').pushObject({v

[18/49] ambari git commit: AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan Shridhar via smohanty)

2017-01-27 Thread ncole
AMBARI-19721. Use llapstatus command watch mode from HDP 2.6 onwards (Swapan 
Shridhar via smohanty)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 35d27739976ccce1c1211def122b3dc7f404662d
Parents: 539a414
Author: Sumit Mohanty 
Authored: Wed Jan 25 19:49:21 2017 -0800
Committer: Sumit Mohanty 
Committed: Wed Jan 25 19:53:16 2017 -0800

--
 .../package/scripts/hive_server_interactive.py  | 181 ++
 .../HIVE/configuration/hive-interactive-env.xml |  13 +
 .../stacks/2.5/HIVE/test_hive_server_int.py | 341 ---
 3 files changed, 413 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/35d27739/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
index dd0d1c4..924c88c 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
@@ -253,6 +253,7 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 """
 def _llap_start(self, env, cleanup=False):
   import params
+  Logger.info("Entered _llap_start()")
   env.set_params(params)
 
   if params.hive_server_interactive_ha:
@@ -260,7 +261,11 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 Check llap app state
 """
 Logger.info("HSI HA is enabled. Checking if LLAP is already running 
...")
-status = self.check_llap_app_status(params.llap_app_name, 2, 
params.hive_server_interactive_ha)
+if params.stack_supports_hive_interactive_ga:
+  status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, 
2, params.hive_server_interactive_ha)
+else:
+  status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, 
2, params.hive_server_interactive_ha)
+
 if status:
   Logger.info("LLAP app '{0}' is already 
running.".format(params.llap_app_name))
   return True
@@ -347,7 +352,10 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 
 # We need to check the status of LLAP app to figure out it got
 # launched properly and is in running state. Then go ahead with Hive 
Interactive Server start.
-status = self.check_llap_app_status(params.llap_app_name, 
params.num_retries_for_checking_llap_status)
+if params.stack_supports_hive_interactive_ga:
+  status = self.check_llap_app_status_in_llap_ga(params.llap_app_name, 
params.num_retries_for_checking_llap_status)
+else:
+  status = self.check_llap_app_status_in_llap_tp(params.llap_app_name, 
params.num_retries_for_checking_llap_status)
 if status:
   Logger.info("LLAP app '{0}' deployed 
successfully.".format(params.llap_app_name))
   return True
@@ -420,9 +428,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
   Execute(llap_kinit_cmd, user=params.hive_user)
 
 """
-Get llap app status data.
+Get llap app status data for LLAP Tech Preview code base.
 """
-def _get_llap_app_status_info(self, app_name):
+def _get_llap_app_status_info_in_llap_tp(self, app_name):
   import status_params
   LLAP_APP_STATUS_CMD_TIMEOUT = 0
 
@@ -432,6 +440,29 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
   Logger.info("Received 'llapstatus' command 'output' : 
{0}".format(output))
   return self._make_valid_json(output)
 
+"""
+Get llap app status data for LLAP GA code base.
+
+Parameters: 'percent_desired_instances_to_be_up' : A value b/w 0.0 and 1.0.
+'total_timeout' : Total wait time while checking the status 
via llapstatus command
+'refresh_rate' : Frequency of polling for llapstatus.
+"""
+def _get_llap_app_status_info_in_llap_ga(self, 
percent_desired_instances_to_be_up, total_timeout, refresh_rate):
+  import status_params
+
+  # llapstatus comamnd : llapstatus -w -r  -i  -t 
+  # -w : Watch mode waits until all LLAP daemons are running or subset of 
the nodes are running (threshold can be specified via -r option) (Default wait 
until all nodes are running)
+  # -r : When watch mode is en

[12/49] ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang)

2017-01-27 Thread ncole
AMBARI-19701. Provide minimal call context from UI when making stack advisor 
calls.  (rzang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 71b743450442d62192c1aa25ebc0269c3cdd3d2b
Parents: 5162a59
Author: Richard Zang 
Authored: Wed Jan 25 16:57:24 2017 -0800
Committer: Richard Zang 
Committed: Wed Jan 25 16:59:33 2017 -0800

--
 ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/71b74345/ambari-web/app/mixins/common/configs/enhanced_configs.js
--
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 0e3f59b..c86f132 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -313,17 +313,17 @@ App.EnhancedConfigsMixin = 
Em.Mixin.create(App.ConfigWithOverrideRecommendationP
 var controllerName = this.get('content.controllerName');
 var changes = dataToSend.changed_configurations;
 if (changes) {
-  dataToSend['user-context'] = {"operation" : "EditConfig"};
+  dataToSend['user_context'] = {"operation" : "EditConfig"};
 } else {
   if (!controllerName) {
-dataToSend['user-context'] = {"operation" : "RecommendAttribute"};
+dataToSend['user_context'] = {"operation" : "RecommendAttribute"};
   } else if (controllerName == 'addServiceController') {
-dataToSend['user-context'] = {
+dataToSend['user_context'] = {
   "operation" : "AddService",
   "operation_details" : (this.get('content.services')|| 
[]).filterProperty('isSelected').filterProperty('isInstalled', 
false).mapProperty('serviceName').join(',')
 };
   } else if (controllerName == 'installerController'){
-dataToSend['user-context'] = {"operation" : "ClusterCreate"};
+dataToSend['user_context'] = {"operation" : "ClusterCreate"};
   }
 }
   },



[17/49] ambari git commit: AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)

2017-01-27 Thread ncole
AMBARI-19098. HDP 3.0 TP - create Service Advisor for YARN/MR (alejandro)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 539a4149ae7cddfb4b30c2b1deed9fdd9517abaa
Parents: 5a02a2a
Author: Alejandro Fernandez 
Authored: Mon Jan 16 17:59:59 2017 -0800
Committer: Alejandro Fernandez 
Committed: Wed Jan 25 19:13:39 2017 -0800

--
 .../HDFS/3.0.0.3.0/service_advisor.py   |4 -
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |   73 +-
 .../YARN/3.0.0.3.0/service_advisor.py   | 1789 ++
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |  343 +---
 .../stacks/HDP/2.1/services/stack_advisor.py|   19 +-
 .../stacks/HDP/2.2/services/stack_advisor.py|1 -
 .../stacks/HDP/2.3/services/stack_advisor.py|   18 +-
 .../stacks/HDP/2.5/services/stack_advisor.py|   47 +-
 .../stacks/HDP/3.0/role_command_order.json  |   27 +-
 .../stacks/HDP/3.0/services/YARN/metainfo.xml   |3 +-
 .../src/main/resources/stacks/stack_advisor.py  |  287 ++-
 11 files changed, 2162 insertions(+), 449 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
 
b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
index eb7f35c..2291c94 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/service_advisor.py
@@ -22,13 +22,9 @@ import imp
 import os
 import traceback
 import inspect
-import re
-import socket
-from urlparse import urlparse
 
 # Local imports
 from resource_management.core.logger import Logger
-from resource_management.libraries.functions.data_structure_utils import 
get_from_dict
 from resource_management.libraries.functions.mounted_dirs_helper import 
get_mounts_with_multiple_data_dirs
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/539a4149/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
index 48352e8..a094cba 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/metainfo.xml
@@ -27,38 +27,40 @@
   
 
 
-  
-APP_TIMELINE_SERVER
-App Timeline Server
-MASTER
-1
-true
-true
+  APP_TIMELINE_SERVER
+  App Timeline Server
+  MASTER
+  1
+  true
+  true
 
-
-  scripts/application_timeline_server.py
-  PYTHON
-  1200
-
+  
+scripts/application_timeline_server.py
+PYTHON
+1200
+  
 
-
-  
-TEZ/TEZ_CLIENT
-host
-
-  true
-
-  
-  
-SPARK/SPARK_CLIENT
-host
-
-  true
-
-  
-
-  
+  
+
 
+
   RESOURCEMANAGER
   ResourceManager
   MASTER
@@ -70,6 +72,8 @@
 PYTHON
 1200
   
+
+  
+
   
 
   yarn_resourcemanager
@@ -91,6 +97,7 @@
   yarn_jobsummary
 
   
+
   
 
   DECOMMISSION
@@ -109,6 +116,7 @@
   
 
   
+
   
 capacity-scheduler
 hdfs-site
@@ -245,7 +253,7 @@
   MAPREDUCE2
   MapReduce2
   Apache Hadoop NextGen MapReduce (YARN)
-  2.1.0.2.0.6.0
+  3.0.0.3.0
 
   
 
@@ -259,6 +267,8 @@
 true
 YARN/RESOURCEMANAGER
   
+
+  
+
   
 scripts/historyserver.py
 PYTHON
@@ -369,6 +381,7 @@
 hdfs-site
 hadoop-env
 core-site
+yarn-site
 mapred-site
 mapred-env
 ssl-client



[28/49] ambari git commit: AMBARI-19732. Allow all sinks a config override to point to a different ZK quorum. (swagle)

2017-01-27 Thread ncole
AMBARI-19732. Allow all sinks a config override to point to a different ZK 
quorum. (swagle)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 042f4279889b579bf09afd4f918e94b6598119d6
Parents: 828e24f
Author: Siddharth Wagle 
Authored: Thu Jan 26 14:03:10 2017 -0800
Committer: Siddharth Wagle 
Committed: Thu Jan 26 14:03:10 2017 -0800

--
 .../metrics2/sink/timeline/AbstractTimelineMetricsSink.java | 1 +
 .../metrics2/sink/kafka/KafkaTimelineMetricsReporter.java   | 6 --
 .../metrics2/sink/storm/StormTimelineMetricsReporter.java   | 9 -
 .../metrics2/sink/storm/StormTimelineMetricsReporter.java   | 5 -
 .../metrics2/sink/storm/StormTimelineMetricsSink.java   | 6 +-
 5 files changed, 22 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/042f4279/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index 9bc3be5..f5a02e4 100644
--- 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -70,6 +70,7 @@ public abstract class AbstractTimelineMetricsSink {
   public static final String COLLECTOR_PROTOCOL = "protocol";
   public static final String COLLECTOR_PORT = "port";
   public static final String ZOOKEEPER_QUORUM = "zookeeper.quorum";
+  public static final String COLLECTOR_ZOOKEEPER_QUORUM = 
"metrics.zookeeper.quorum";
   public static final int DEFAULT_POST_TIMEOUT_SECONDS = 10;
   public static final String SKIP_COUNTER_TRANSFROMATION = 
"skipCounterDerivative";
   public static final String RPC_METRIC_PREFIX = "metric.rpc";

http://git-wip-us.apache.org/repos/asf/ambari/blob/042f4279/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
index 5892599..b9ca9f5 100644
--- 
a/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
+++ 
b/ambari-metrics/ambari-metrics-kafka-sink/src/main/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporter.java
@@ -86,7 +86,7 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
   private TimelineScheduledReporter reporter;
   private TimelineMetricsCache metricsCache;
   private int timeoutSeconds = 10;
-  private String zookeeperQuorum;
+  private String zookeeperQuorum = null;
 
   private String[] excludedMetricsPrefixes;
   private String[] includedMetricsPrefixes;
@@ -155,7 +155,9 @@ public class KafkaTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
 int metricsSendInterval = 
props.getInt(TIMELINE_METRICS_SEND_INTERVAL_PROPERTY, MAX_EVICTION_TIME_MILLIS);
 int maxRowCacheSize = 
props.getInt(TIMELINE_METRICS_MAX_ROW_CACHE_SIZE_PROPERTY, 
MAX_RECS_PER_NAME_DEFAULT);
 
-zookeeperQuorum = props.getString("zookeeper.connect");
+zookeeperQuorum = props.containsKey(COLLECTOR_ZOOKEEPER_QUORUM) ?
+  props.getString(COLLECTOR_ZOOKEEPER_QUORUM) : 
props.getString("zookeeper.connect");
+
 metricCollectorPort = props.getString(TIMELINE_PORT_PROPERTY, 
TIMELINE_DEFAULT_PORT);
 collectorHosts = 
parseHostsStringIntoCollection(props.getString(TIMELINE_HOSTS_PROPERTY, 
TIMELINE_DEFAULT_HOST));
 metricCollectorProtocol = props.getString(TIMELINE_PROTOCOL_PROPERTY, 
TIMELINE_DEFAULT_PROTOCOL);

http://git-wip-us.apache.org/repos/asf/ambari/blob/042f4279/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-storm-sink-legacy/src/main/j

[48/49] ambari git commit: AMBARI-19732. Allow all sinks a config override to point to a different ZK quorum. Compilation failure. (swagle)

2017-01-27 Thread ncole
AMBARI-19732. Allow all sinks a config override to point to a different ZK 
quorum. Compilation failure. (swagle)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 9963ac81963e01eec66467f0536b4ebdf058aa6e
Parents: 7c7769b
Author: Siddharth Wagle 
Authored: Fri Jan 27 10:11:49 2017 -0800
Committer: Siddharth Wagle 
Committed: Fri Jan 27 10:11:49 2017 -0800

--
 .../hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9963ac81/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
--
diff --git 
a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
 
b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
index e72d01f..923de0f 100644
--- 
a/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
+++ 
b/ambari-metrics/ambari-metrics-storm-sink/src/main/java/org/apache/hadoop/metrics2/sink/storm/StormTimelineMetricsReporter.java
@@ -108,8 +108,8 @@ public class StormTimelineMetricsReporter extends 
AbstractTimelineMetricsSink
   protocol = configuration.getProperty(COLLECTOR_PROTOCOL, "http");
   port = configuration.getProperty(COLLECTOR_PORT, "6188");
   
-  zkQuorum = 
StringUtils.isEmpty(conf.getProperty(COLLECTOR_ZOOKEEPER_QUORUM)) ?
-conf.getProperty(ZOOKEEPER_QUORUM) : 
conf.getProperty(COLLECTOR_ZOOKEEPER_QUORUM);
+  zkQuorum = 
StringUtils.isEmpty(configuration.getProperty(COLLECTOR_ZOOKEEPER_QUORUM)) ?
+configuration.getProperty(ZOOKEEPER_QUORUM) : 
configuration.getProperty(COLLECTOR_ZOOKEEPER_QUORUM);
 
   timeoutSeconds = configuration.getProperty(METRICS_POST_TIMEOUT_SECONDS) 
!= null ?
   
Integer.parseInt(configuration.getProperty(METRICS_POST_TIMEOUT_SECONDS)) :



[30/49] ambari git commit: AMBARI-18431: Storm Ambari view - Fixes to DAG, kafka offset info , Misc fixes.

2017-01-27 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/7e00f585/contrib/views/storm/src/main/resources/scripts/components/BarChart.jsx
--
diff --git 
a/contrib/views/storm/src/main/resources/scripts/components/BarChart.jsx 
b/contrib/views/storm/src/main/resources/scripts/components/BarChart.jsx
index 7dabed1..ef05422 100644
--- a/contrib/views/storm/src/main/resources/scripts/components/BarChart.jsx
+++ b/contrib/views/storm/src/main/resources/scripts/components/BarChart.jsx
@@ -55,7 +55,7 @@ define(['react', 'react-dom', 'd3', 'd3.tip'], 
function(React, ReactDOM, d3) {
setUpSVG: function(){
this.svg = d3.select(ReactDOM.findDOMNode(this))
.attr('width', this.props.width+"px")
-   .attr('height', this.props.height+30+"px")
+   .attr('height', this.props.height+50+"px")
// .attr("viewBox", "-46 -5 " + 
(this.props.width+82) + " " + (this.props.height+28) );
 
this.container = this.svg.append("g")
@@ -136,7 +136,37 @@ define(['react', 'react-dom', 'd3', 'd3.tip'], 
function(React, ReactDOM, d3) {
this.xAxisGrp = container['xAxisEl'] = 
container.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + 
")")
-   .call(xAxis);
+   .call(xAxis)
+   .selectAll(".tick text")
+   .call(this.wrap, this.x.rangeBand());
+   },
+   wrap: function(text, width) {
+   text.each(function() {
+   var text = d3.select(this),
+   words = 
text.text().split(/-+/).reverse(),
+   word,
+   line = [],
+   lineNumber = 0,
+   lineHeight = 1.1, // ems
+   y = text.attr("y"),
+   dy = parseFloat(text.attr("dy")),
+   tspan = 
text.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em");
+
+   //Hack to show hidden div to find 
getComputedTextLength
+   $('#lag-graph').css({visibility: 'hidden', 
display: 'block', position: 'absolute'});
+
+   while (word = words.pop()) {
+   line.push(word);
+   tspan.text(line.join(" "));
+   if 
(tspan.node().getComputedTextLength() > width) {
+   line.pop();
+   tspan.text(line.join(" "));
+   line = [word];
+   tspan = 
text.append("tspan").attr("x", 0).attr("y", y).attr("dy", ++lineNumber * 
lineHeight + dy + "em").text(word);
+   }
+   }
+   $('#lag-graph').css({visibility: '', display: 
'none', position: ''});
+   });
},
drawYAxis: function(x) {
var yAxis = this.yAxis;

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e00f585/contrib/views/storm/src/main/resources/scripts/components/TopologyGraph.jsx
--
diff --git 
a/contrib/views/storm/src/main/resources/scripts/components/TopologyGraph.jsx 
b/contrib/views/storm/src/main/resources/scripts/components/TopologyGraph.jsx
index 44afd5d..8679661 100644
--- 
a/contrib/views/storm/src/main/resources/scripts/components/TopologyGraph.jsx
+++ 
b/contrib/views/storm/src/main/resources/scripts/components/TopologyGraph.jsx
@@ -16,7 +16,7 @@
  limitations under the License.
 */
 
-define(['react', 'react-dom', 'd3', 'd3.tip'], function(React, ReactDOM, d3) {
+define(['react', 'react-dom', 'd3', 'dagreD3', 'd3.tip'], function(React, 
ReactDOM, d3, dagreD3) {
'use strict';
return React.createClass({
displayName: 'TopologyGraph',
@@ -26,39 +26,24 @@ define(['react', 'react-dom', 'd3', 'd3.tip'], 
function(React, ReactDOM, d3) {
 height: React.PropTypes.string
 },
getInitialState: function(){
-   this.width = this.props.width || '1100';
-   this.height = this.props.height || '260';
this.syncData(this.props.data);
return null;
},
-componentWillUpdate

[02/49] ambari git commit: AMBARI-19701. Provide minimal call context from UI when making stack advisor calls. (rzang via yusaku)

2017-01-27 Thread ncole
AMBARI-19701. Provide minimal call context from UI when making stack advisor 
calls. (rzang via yusaku)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 6a2aca64e0d1eb789777e686829d7ec5babcd388
Parents: 5ddbb58
Author: Yusaku Sako 
Authored: Wed Jan 25 10:47:10 2017 -0800
Committer: Yusaku Sako 
Committed: Wed Jan 25 10:47:46 2017 -0800

--
 .../mixins/common/configs/enhanced_configs.js   | 22 +++-
 1 file changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6a2aca64/ambari-web/app/mixins/common/configs/enhanced_configs.js
--
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index d1d8f9b..0e3f59b 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -214,7 +214,8 @@ App.EnhancedConfigsMixin = 
Em.Mixin.create(App.ConfigWithOverrideRecommendationP
   if (App.Service.find().someProperty('serviceName', 'HDFS') && 
!stepConfigs.someProperty('serviceName', 'HDFS')) {
 requiredTags.push({site: 'core-site', serviceName: 'HDFS'});
   }
-
+  
+  this.setUserContext(dataToSend);
   if (requiredTags.length) {
 this.loadAdditionalSites(requiredTags, stepConfigs, recommendations, 
dataToSend, onComplete);
   } else {
@@ -308,6 +309,25 @@ App.EnhancedConfigsMixin = 
Em.Mixin.create(App.ConfigWithOverrideRecommendationP
 });
   },
 
+  setUserContext: function(dataToSend) {
+var controllerName = this.get('content.controllerName');
+var changes = dataToSend.changed_configurations;
+if (changes) {
+  dataToSend['user-context'] = {"operation" : "EditConfig"};
+} else {
+  if (!controllerName) {
+dataToSend['user-context'] = {"operation" : "RecommendAttribute"};
+  } else if (controllerName == 'addServiceController') {
+dataToSend['user-context'] = {
+  "operation" : "AddService",
+  "operation_details" : (this.get('content.services')|| 
[]).filterProperty('isSelected').filterProperty('isInstalled', 
false).mapProperty('serviceName').join(',')
+};
+  } else if (controllerName == 'installerController'){
+dataToSend['user-context'] = {"operation" : "ClusterCreate"};
+  }
+}
+  },
+
   /**
* Defines if there is any changes made by user.
* Check all properties except recommended properties from popup



[33/49] ambari git commit: AMBARI-19610. User is not able to import the draft version for a coordinator. (Padma Priya N via gauravn7)

2017-01-27 Thread ncole
AMBARI-19610. User is not able to import the draft version for a coordinator. 
(Padma Priya N via gauravn7)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8b4dd3a4826c8b13aec9087de51fce7a856326c4
Parents: 7e00f58
Author: Gaurav Nagar 
Authored: Fri Jan 27 11:23:55 2017 +0530
Committer: Gaurav Nagar 
Committed: Fri Jan 27 11:23:55 2017 +0530

--
 .../org/apache/oozie/ambari/view/Constants.java |  4 +-
 .../ambari/view/OozieProxyImpersonator.java | 56 --
 .../oozie/ambari/view/WorkflowFileInfo.java |  6 +-
 .../oozie/ambari/view/WorkflowFilesService.java | 64 
 .../workflowmanager/WorkflowManagerService.java | 10 +--
 .../ui/app/components/bundle-config.js  | 53 +++--
 .../resources/ui/app/components/coord-config.js | 46 +--
 .../ui/app/components/designer-workspace.js |  2 +-
 .../ui/app/components/flow-designer.js  | 80 +++-
 .../main/resources/ui/app/components/save-wf.js |  4 +-
 .../ui/app/services/workspace-manager.js|  3 +-
 .../app/templates/components/bundle-config.hbs  |  4 +-
 .../app/templates/components/coord-config.hbs   |  2 +-
 .../app/templates/components/flow-designer.hbs  |  2 +-
 14 files changed, 252 insertions(+), 84 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8b4dd3a4/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java
--
diff --git 
a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java
 
b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java
index f7c1936..f413a0d 100644
--- 
a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java
+++ 
b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java
@@ -24,7 +24,9 @@ public interface Constants {
   String MESSAGE_KEY = "message";
   String WF_DRAFT_EXTENSION = ".wfdraft";
   String WF_EXTENSION = ".xml";
-  String DEFAULT_WORKFLOW_FILENAME="workflow.xml";
+  String DEFAULT_WORKFLOW_FILENAME="workflow";
+  String DEFAULT_COORDINATOR_FILENAME="coordinator";
+  String DEFAULT_BUNDLE_FILENAME="bundle";
   String DEFAULT_DRAFT_FILENAME="workflow"+WF_DRAFT_EXTENSION;
   String WF_ASSET_EXTENSION = ".wfasset";
   String DEFAULT_WORKFLOW_ASSET_FILENAME="asset"+WF_ASSET_EXTENSION;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8b4dd3a4/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java
--
diff --git 
a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java
 
b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java
index d029c39..a119a7e 100644
--- 
a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java
+++ 
b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java
@@ -122,11 +122,15 @@ public class OozieProxyImpersonator {
   viewContext.getInstanceName()));
 
   }
+
+  @GET
   @Path("hdfsCheck")
   public Response hdfsCheck(){
 hdfsFileUtils.hdfsCheck();
 return Response.ok().build();
   }
+
+  @GET
   @Path("homeDirCheck")
   public Response homeDirCheck(){
 hdfsFileUtils.homeDirCheck();
@@ -179,13 +183,17 @@ public class OozieProxyImpersonator {
 if (StringUtils.isEmpty(appPath)) {
   throw new RuntimeException("app path can't be empty.");
 }
-appPath = workflowFilesService.getWorkflowFileName(appPath.trim());
+
+JobType deducedJobType = oozieUtils.deduceJobType(postBody);
+appPath = 
workflowFilesService.getWorkflowFileName(appPath.trim(),deducedJobType);
+
 if (!overwrite) {
   boolean fileExists = hdfsFileUtils.fileExists(appPath);
   if (fileExists) {
 return getFileExistsResponse();
   }
 }
+
 postBody = utils.formatXml(postBody);
 try {
   String filePath = workflowFilesService.createFile(appPath,
@@ -193,7 +201,6 @@ public class OozieProxyImpersonator {
   LOGGER.info(String.format(
 "submit workflow job done. filePath=[%s]", filePath));
   if (PROJ_MANAGER_ENABLED) {
-JobType deducedJobType = oozieUtils.deduceJobType(postBody);
 String workflowName = oozieUtils.deduceWorkflowNameFromXml(postBody);
 workflowManagerService.saveWorkflow(projectId, appPath,
   deducedJobType, description,
@@ -220,10 +227,10 @@ public clas

[11/49] ambari git commit: AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. (Vivek Subramanian via yusaku)

2017-01-27 Thread ncole
AMBARI-19717. HDFS TopN Operations by User graph showing wrong data in grafana. 
(Vivek Subramanian via yusaku)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5162a5931f7b29d4eb9b952fcebd8d7dc3b81273
Parents: 6f78e61
Author: Yusaku Sako 
Authored: Wed Jan 25 16:45:35 2017 -0800
Committer: Yusaku Sako 
Committed: Wed Jan 25 16:45:35 2017 -0800

--
 .../HDP/grafana-hdfs-topn.json  | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5162a593/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json
index 688d113..90fd37c 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/grafana-dashboards/HDP/grafana-hdfs-topn.json
@@ -82,11 +82,11 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "avg",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount",
+  "metric": "dfs.NNTopUserOpCounts.windowMs=6.op=%.TotalCount",
   "precision": "default",
   "refId": "A",
   "seriesAggregator": "none",
@@ -152,11 +152,11 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "avg",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"dfs.NNTopUserOpCounts.windowMs=150.op=%.TotalCount",
+  "metric": 
"dfs.NNTopUserOpCounts.windowMs=30.op=%.TotalCount",
   "precision": "default",
   "refId": "A",
   "seriesAggregator": "none",
@@ -222,7 +222,7 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "avg",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
@@ -305,7 +305,7 @@
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count",
+  "metric": 
"dfs.NNTopUserOpCounts.windowMs=6.op=*.user=%.count",
   "precision": "default",
   "refId": "A",
   "seriesAggregator": "none",
@@ -375,7 +375,7 @@
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
-  "metric": 
"dfs.NNTopUserOpCounts.windowMs=150.op=*.user=%.count",
+  "metric": 
"dfs.NNTopUserOpCounts.windowMs=30.op=*.user=%.count",
   "precision": "default",
   "refId": "A",
   "seriesAggregator": "none",
@@ -526,7 +526,7 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
@@ -614,7 +614,7 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},
@@ -702,7 +702,7 @@
   "steppedLine": false,
   "targets": [
 {
-  "aggregator": "max",
+  "aggregator": "none",
   "app": "namenode",
   "downsampleAggregator": "avg",
   "errors": {},



[08/49] ambari git commit: AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for Hiveserver2 (also floods HS2 log with error messages) (smohanty)

2017-01-27 Thread ncole
AMBARI-19642. Error during Alert: Unable to authenticate through LDAP for 
Hiveserver2 (also floods HS2 log with error messages) (smohanty)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: fda3de6e892a8f19d363f49860122929b4589e3d
Parents: 114f0e8
Author: Sumit Mohanty 
Authored: Wed Jan 25 13:49:56 2017 -0800
Committer: Sumit Mohanty 
Committed: Wed Jan 25 13:49:56 2017 -0800

--
 .../libraries/functions/hive_check.py   | 13 ---
 .../alert_hive_interactive_thrift_port.py   | 15 ++--
 .../package/alerts/alert_hive_thrift_port.py| 15 ++--
 .../services/HIVE/configuration/hive-env.xml| 36 +++-
 .../stacks/HDP/2.5/services/stack_advisor.py| 23 -
 .../services/HIVE/configuration/hive-env.xml|  2 +-
 .../2.0.6/HIVE/test_hive_service_check.py   | 10 +++---
 7 files changed, 98 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fda3de6e/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
index ebcf4f9..92d16a2 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
@@ -25,7 +25,7 @@ from resource_management.libraries.functions import format
 
 def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, 
kinitcmd=None, smokeuser='ambari-qa',
transport_mode="binary", 
http_endpoint="cliservice", ssl=False, ssl_keystore=None,
-   ssl_password=None, check_command_timeout=30):
+   ssl_password=None, check_command_timeout=30, 
ldap_username="", ldap_password=""):
   """
   Hive thrift SASL port check
   """
@@ -49,12 +49,17 @@ def check_thrift_port_sasl(address, port, 
hive_auth="NOSASL", key=None, kinitcmd
   if hive_auth == "NOSASL":
 beeline_url.append('auth=noSasl')
 
+  credential_str = ""
+  # append username and password for LDAP
+  if hive_auth == "LDAP":
+credential_str = "-n '{ldap_username}' -p '{ldap_password!p}'"
+
   # append url according to ssl configuration
   if ssl and ssl_keystore is not None and ssl_password is not None:
 beeline_url.extend(['ssl={ssl_str}', 'sslTrustStore={ssl_keystore}', 
'trustStorePassword={ssl_password!p}'])
 
   # append url according to principal and execute kinit
-  if kinitcmd:
+  if kinitcmd and hive_auth != "LDAP":
 beeline_url.append('principal={key}')
 
 # prevent concurrent kinit
@@ -65,8 +70,8 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", 
key=None, kinitcmd
 finally:
   kinit_lock.release()
 
-  cmd = "! beeline -u '%s' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection 
refused' -e 'Invalid URL'" % \
-format(";".join(beeline_url))
+  cmd = "! beeline -u '%s' %s -e '' 2>&1| awk '{print}'|grep -i -e 'Connection 
refused' -e 'Invalid URL'" % \
+(format(";".join(beeline_url)), format(credential_str))
 
   Execute(cmd,
 user=smokeuser,

http://git-wip-us.apache.org/repos/asf/ambari/blob/fda3de6e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py
index 1386c36..25c4b28 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_interactive_thrift_port.py
@@ -45,6 +45,8 @@ SMOKEUSER_KEY = '{{cluster-env/smokeuser}}'
 HIVE_SSL = '{{hive-site/hive.server2.use.SSL}}'
 HIVE_SSL_KEYSTORE_PATH = '{{hive-interactive-site/hive.server2.keystore.path}}'
 HIVE_SSL_KEYSTORE_PASSWORD = 
'{{hive-interactive-site/hive.server2.keystore.password}}'
+HIVE_LDAP_USERNAME = '{{hive-env/alert_ldap_username}}'
+HIVE_LDAP_PASSWORD = '{{hive-env/alert_ldap_password}}'
 
 # The configured Kerberos executable search paths, if any
 KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = 
'{{kerberos-

[05/49] ambari git commit: Revert "AMBARI-19630: Ambari should accept stack version in format of x.x.x.x without the build level digits (dili)"

2017-01-27 Thread ncole
Revert "AMBARI-19630: Ambari should accept stack version in format of x.x.x.x 
without the build level digits (dili)"

This reverts commit 21c18a78beb397da324c80d6943d55038167d855.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: f571cebdb53666d54b3365307ef5da4af9eeb493
Parents: 3217fbc
Author: Jaimin Jetly 
Authored: Wed Jan 25 12:09:07 2017 -0800
Committer: Jaimin Jetly 
Committed: Wed Jan 25 12:09:07 2017 -0800

--
 .../libraries/functions/get_stack_version.py|  2 +-
 .../libraries/functions/version_select_util.py  |  5 +--
 .../src/test/python/TestVersionSelectUtil.py| 40 
 3 files changed, 3 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f571cebd/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
index 463d61f..7274a59 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/get_stack_version.py
@@ -85,7 +85,7 @@ def get_stack_version(package_name):
 
   stack_version = re.sub(package_name + ' - ', '', stack_output)
   stack_version = stack_version.rstrip()
-  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?', stack_version)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', stack_version)
 
   if match is None:
 Logger.info('Failed to get extracted version with ' + stack_selector_path)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f571cebd/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
index ff00a1f..615a0cd 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/version_select_util.py
@@ -67,9 +67,8 @@ def get_component_version(stack_name, component_name):
   raise Exception("Code is nonzero or output is empty")
 
 Logger.debug("Command: %s\nOutput: %s" % (get_stack_comp_version_cmd, 
str(out)))
-matches = re.findall(r"( [\d\.]+(\-\d+)?)", out)
-version = matches[0][0].strip() if matches and len(matches) > 0 and 
len(matches[0]) > 0 else None
-Logger.debug("Version for component %s: %s" % (component_name, 
str(version)))
+matches = re.findall(r"([\d\.]+\-\d+)", out)
+version = matches[0] if matches and len(matches) > 0 else None
   except Exception, e:
 Logger.error("Could not determine stack version for component %s by 
calling '%s'. Return Code: %s, Output: %s." %
  (component_name, get_stack_comp_version_cmd, str(code), 
str(out)))

http://git-wip-us.apache.org/repos/asf/ambari/blob/f571cebd/ambari-server/src/test/python/TestVersionSelectUtil.py
--
diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py 
b/ambari-server/src/test/python/TestVersionSelectUtil.py
index 5facf31..38798e2 100644
--- a/ambari-server/src/test/python/TestVersionSelectUtil.py
+++ b/ambari-server/src/test/python/TestVersionSelectUtil.py
@@ -97,43 +97,3 @@ class TestVersionSelectUtil(TestCase):
 self.assertEquals(version, stack_expected_version)
 version = self.module.get_component_version("HDP", "hadoop-hdfs-datanode")
 self.assertEquals(version, stack_expected_version)
-
-  @patch('__builtin__.open')
-  @patch("resource_management.core.shell.call")
-  @patch('os.path.exists')
-  @patch("resource_management.libraries.functions.stack_tools.get_stack_tool")
-  def test_get_component_version_no_build_ids(self, get_stack_tool_mock, 
os_path_exists_mock, call_mock, open_mock):
-stack_expected_version = "2.2.1.0"
-
-# Mock classes for reading from a file
-class MagicFile(object):
-  allowed_names = set(["hive-server2",
-   "zookeeper-server"])
-  def read(self, value):
-return (value + " - " + stack_expected_version) if value in 
self.allowed_names

[47/49] ambari git commit: AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error "argument of type 'NoneType' is not iterable" (dsen)

2017-01-27 Thread ncole
AMBARI-19746 Ambari HDFS Metric alerts turns to UNKNOWN status with error 
"argument of type 'NoneType' is not iterable" (dsen)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 7c7769b1a00ebeb9a7cf10ae5e7865f13ece7f5e
Parents: 77937e3
Author: Dmytro Sen 
Authored: Fri Jan 27 19:06:52 2017 +0200
Committer: Dmytro Sen 
Committed: Fri Jan 27 19:06:52 2017 +0200

--
 .../src/main/python/ambari_commons/ambari_metrics_helper.py | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7769b1/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
--
diff --git 
a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py 
b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
index bfc786c..7841bde 100644
--- a/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
+++ b/ambari-common/src/main/python/ambari_commons/ambari_metrics_helper.py
@@ -24,6 +24,7 @@ from resource_management.libraries.functions import 
conf_select
 
 DEFAULT_COLLECTOR_SUFFIX = '.sink.timeline.collector.hosts'
 DEFAULT_METRICS2_PROPERTIES_FILE_NAME = 'hadoop-metrics2.properties'
+DEFAULT_HADOOP_CONF_DIR_PATH = '/usr/hdp/current/hadoop-client/conf/'
 
 def select_metric_collector_for_sink(sink_name):
   # TODO check '*' sink_name
@@ -42,7 +43,11 @@ def get_random_host(hosts):
   return random.choice(hosts)
 
 def get_metric_collectors_from_properties_file(sink_name):
-  hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  try:
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+  except Exception as e:
+print "Can't get hadoop conf directory from 
conf_select.get_hadoop_conf_dir() - " + str(e)
+hadoop_conf_dir = DEFAULT_HADOOP_CONF_DIR_PATH
   props = load_properties_from_file(os.path.join(hadoop_conf_dir, 
DEFAULT_METRICS2_PROPERTIES_FILE_NAME))
   return props.get(sink_name + DEFAULT_COLLECTOR_SUFFIX)
 
@@ -59,4 +64,4 @@ def load_properties_from_file(filepath, sep='=', 
comment_char='#'):
 key = key_value[0].strip()
 value = sep.join(key_value[1:]).strip('" \t')
 props[key] = value
-  return props
\ No newline at end of file
+  return props



[42/49] ambari git commit: AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)

2017-01-27 Thread ncole
AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: cc30798a6f1428fbe2a2dd6c64cac2c128cf9a23
Parents: 16c0b68
Author: Lisnichenko Dmitro 
Authored: Fri Jan 27 14:06:49 2017 +0200
Committer: Lisnichenko Dmitro 
Committed: Fri Jan 27 14:06:49 2017 +0200

--
 .../UpdateKerberosConfigsServerActionTest.java| 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc30798a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index e756491..c8ebb63 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.util.Collection;
@@ -43,7 +43,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -165,8 +164,15 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 action.setExecutionCommand(executionCommand);
 action.execute(null);
 
-assertEquals(configTypes.getValue(), "cluster-env");
-assertEquals(configUpdates.getValue().get("security_enabled"), "false");
+assertTrue(configTypes.getValues().contains("cluster-env"));
+boolean containsSecurityEnabled = false;
+for(Map properties: configUpdates.getValues()) {
+  if(properties.containsKey("security_enabled")) {
+containsSecurityEnabled = true;
+break;
+  }
+}
+assertTrue(containsSecurityEnabled);
 verifyAll();
   }
 



[38/49] ambari git commit: AMBARI-19722. Wizard modals are closed before confirmation popup appears (onechiporenko)

2017-01-27 Thread ncole
AMBARI-19722. Wizard modals are closed before confirmation popup appears 
(onechiporenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: a1f625f265b99634a4c18e7c7c69a88302b286a0
Parents: 22d4e18
Author: Oleg Nechiporenko 
Authored: Thu Jan 26 11:03:39 2017 +0200
Committer: Oleg Nechiporenko 
Committed: Fri Jan 27 10:07:11 2017 +0200

--
 ambari-web/app/views/common/modal_popup.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f625f2/ambari-web/app/views/common/modal_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index 47b7d61..2f2dc1c 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -86,6 +86,7 @@ App.ModalPopup = Ember.View.extend({
 var firstInputElement = this.$('#modal').find(':input').not(':disabled, 
.no-autofocus').first();
 if (!$.mocho) {
   this.$('#modal').modal({
+keyboard: false,
 backdrop: false
   });
 }



[45/49] ambari git commit: AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)

2017-01-27 Thread ncole
AMBARI-19748. Upgrade default JDK installed by Ambari to be >8u100.(vbrodetskyi)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 34d029bf9cd665312de4c6d4c54a21bc9ea83858
Parents: ad195c2
Author: Vitaly Brodetskyi 
Authored: Fri Jan 27 17:55:12 2017 +0200
Committer: Vitaly Brodetskyi 
Committed: Fri Jan 27 17:56:00 2017 +0200

--
 ambari-server/conf/unix/ambari.properties  | 4 ++--
 ambari-server/src/main/python/ambari_server/serverSetup.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34d029bf/ambari-server/conf/unix/ambari.properties
--
diff --git a/ambari-server/conf/unix/ambari.properties 
b/ambari-server/conf/unix/ambari.properties
index ca8ae77..f16402e 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -34,8 +34,8 @@ jdk1.7.jcpol-file=UnlimitedJCEPolicyJDK7.zip
 jdk1.7.home=$ROOT/usr/jdk64/
 jdk1.7.re=(jdk.*)/jre
 jdk1.8.desc=Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
-jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz
-jdk1.8.dest-file=jdk-8u77-linux-x64.tar.gz
+jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz
+jdk1.8.dest-file=jdk-8u112-linux-x64.tar.gz
 
jdk1.8.jcpol-url=http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip
 jdk1.8.jcpol-file=jce_policy-8.zip
 jdk1.8.home=$ROOT/usr/jdk64/

http://git-wip-us.apache.org/repos/asf/ambari/blob/34d029bf/ambari-server/src/main/python/ambari_server/serverSetup.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py 
b/ambari-server/src/main/python/ambari_server/serverSetup.py
index 7e2167d..adb5885 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -742,9 +742,9 @@ class JDKSetupLinux(JDKSetup):
 super(JDKSetupLinux, self).__init__()
 self.JDK_DEFAULT_CONFIGS = [
   JDKRelease("jdk1.8", "Oracle JDK 1.8 + Java Cryptography Extension (JCE) 
Policy Files 8",
- 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u77-linux-x64.tar.gz";, 
"jdk-8u77-linux-x64.tar.gz",
+ 
"http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz";, 
"jdk-8u112-linux-x64.tar.gz",
  
"http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip";, 
"jce_policy-8.zip",
- AmbariPath.get("/usr/jdk64/jdk1.8.0_77"),
+ AmbariPath.get("/usr/jdk64/jdk1.8.0_112"),
  "(jdk.*)/jre")
 ]
 



[40/49] ambari git commit: AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate with external Ranger (mugdha)

2017-01-27 Thread ncole
AMBARI-19739 Stack changes to allow : Hive Interactive plugin to communicate 
with external Ranger (mugdha)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2be01fbf1a22b8bf7bc5a8744196c0f8ed8bbd86
Parents: 9ebe170
Author: Mugdha Varadkar 
Authored: Fri Jan 27 12:10:55 2017 +0530
Committer: Mugdha Varadkar 
Committed: Fri Jan 27 16:17:22 2017 +0530

--
 .../package/scripts/setup_ranger_hive_interactive.py   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2be01fbf/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
index 2cbe952..de2e580 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive_interactive.py
@@ -22,7 +22,7 @@ from resource_management.core.logger import Logger
 def setup_ranger_hive_interactive(upgrade_type = None):
   import params
 
-  if params.has_ranger_admin:
+  if params.enable_ranger_hive:
 
 stack_version = None
 
@@ -34,7 +34,7 @@ def setup_ranger_hive_interactive(upgrade_type = None):
 else:
   Logger.info("Hive2: Setup ranger: command retry not enabled thus 
skipping if ranger admin is down !")
 
-if params.xml_configurations_supported and params.enable_ranger_hive and 
params.xa_audit_hdfs_is_enabled:
+if params.xml_configurations_supported and params.xa_audit_hdfs_is_enabled:
   params.HdfsResource("/ranger/audit",
  type="directory",
  action="create_on_execute",
@@ -74,4 +74,4 @@ def setup_ranger_hive_interactive(upgrade_type = None):
   component_user_principal=params.hive_principal if 
params.security_enabled else None,
   component_user_keytab=params.hive_server2_keytab if 
params.security_enabled else None)
   else:
-Logger.info('Ranger admin not installed')
+Logger.info('Ranger Hive plugin is not enabled')



ambari git commit: AMBARI-19737. Add a validation check in HSI about Capacity Scheduler preemption requirements.

2017-01-27 Thread swapan
Repository: ambari
Updated Branches:
  refs/heads/trunk 9963ac819 -> dcdf95b28


AMBARI-19737. Add a validation check in HSI about Capacity Scheduler preemption 
requirements.


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

Branch: refs/heads/trunk
Commit: dcdf95b28a98e47062727f270adf2b4c69816f93
Parents: 9963ac8
Author: Swapan Shridhar 
Authored: Fri Jan 27 11:02:48 2017 -0800
Committer: Swapan Shridhar 
Committed: Fri Jan 27 11:02:48 2017 -0800

--
 .../stacks/HDP/2.5/services/stack_advisor.py  | 12 
 .../2.5/common/services-normal-his-2-hosts.json   |  8 +++-
 .../2.5/common/services-normal-his-valid.json |  8 +++-
 .../stacks/2.5/common/test_stack_advisor.py   | 18 +++---
 4 files changed, 37 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dcdf95b2/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 8e377da..ca4a968 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -388,8 +388,11 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 
   def validateHiveInteractiveEnvConfigurations(self, properties, 
recommendedDefaults, configurations, services, hosts):
 hive_site_env_properties = self.getSiteProperties(configurations, 
"hive-interactive-env")
+yarn_site_properties = self.getSiteProperties(configurations, "yarn-site")
 validationItems = []
 hsi_hosts = self.getHostsForComponent(services, "HIVE", 
"HIVE_SERVER_INTERACTIVE")
+
+# Check for expecting 'enable_hive_interactive' is ON given that there is 
HSI on atleast one host present.
 if len(hsi_hosts) > 0:
   # HIVE_SERVER_INTERACTIVE is mapped to a host
   if 'enable_hive_interactive' not in hive_site_env_properties or (
@@ -407,6 +410,15 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 "item": self.getErrorItem(
   "enable_hive_interactive in 
hive-interactive-env should be set to false.")})
 
+# Check for 'yarn.resourcemanager.scheduler.monitor.enable' config to be 
true if HSI is ON.
+if yarn_site_properties and 
'yarn.resourcemanager.scheduler.monitor.enable' in yarn_site_properties:
+  scheduler_monitor_enabled = 
yarn_site_properties['yarn.resourcemanager.scheduler.monitor.enable']
+  if scheduler_monitor_enabled.lower() == 'false' and 
hive_site_env_properties and 'enable_hive_interactive' in 
hive_site_env_properties and \
+hive_site_env_properties['enable_hive_interactive'].lower() == 'true':
+validationItems.append({"config-name": "enable_hive_interactive",
+"item": self.getWarnItem(
+  "When enabling LLAP, set 
'yarn.resourcemanager.scheduler.monitor.enable' to true to ensure that LLAP 
gets the full allocated capacity.")})
+
 validationProblems = 
self.toConfigurationValidationProblems(validationItems, "hive-interactive-env")
 return validationProblems
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/dcdf95b2/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
 
b/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
index 44698ed..0044bf1 100644
--- 
a/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
+++ 
b/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
@@ -1108,7 +1108,8 @@
 "hive.llap.daemon.queue.name": "llap",
 "hive.server2.enable.doAs": "true",
 "hive.llap.daemon.num.executors": "0",
-"hive.server2.tez.sessions.per.default.queue": "32"
+"hive.server2.tez.sessions.per.default.queue": "32",
+"hive.tez.container.size" : "341"
   }
 },
 "hive-interactive-env" : {
@@ -1159,6 +1160,11 @@
   "properties": {
 "tez.am.resource.memory.mb" : "341"
   }
+},
+"tez-interactive-site": {
+  "properties": {
+"tez.am.resource.memory.mb" : "341"
+  }
 }
   },
   "changed-configurations" : [ ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/dcdf95b2/ambari-server/src

ambari git commit: AMBARI-19737. Add a validation check in HSI about Capacity Scheduler preemption requirements.

2017-01-27 Thread swapan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f353d013a -> 72cff6c68


AMBARI-19737. Add a validation check in HSI about Capacity Scheduler preemption 
requirements.


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

Branch: refs/heads/branch-2.5
Commit: 72cff6c680d35bd12903d49fdb9f47b5c1163790
Parents: f353d01
Author: Swapan Shridhar 
Authored: Fri Jan 27 11:02:48 2017 -0800
Committer: Swapan Shridhar 
Committed: Fri Jan 27 11:04:37 2017 -0800

--
 .../stacks/HDP/2.5/services/stack_advisor.py  | 12 
 .../2.5/common/services-normal-his-2-hosts.json   |  8 +++-
 .../2.5/common/services-normal-his-valid.json |  8 +++-
 .../stacks/2.5/common/test_stack_advisor.py   | 18 +++---
 4 files changed, 37 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/72cff6c6/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 70da914..71bde8a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -388,8 +388,11 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 
   def validateHiveInteractiveEnvConfigurations(self, properties, 
recommendedDefaults, configurations, services, hosts):
 hive_site_env_properties = self.getSiteProperties(configurations, 
"hive-interactive-env")
+yarn_site_properties = self.getSiteProperties(configurations, "yarn-site")
 validationItems = []
 hsi_hosts = self.getHostsForComponent(services, "HIVE", 
"HIVE_SERVER_INTERACTIVE")
+
+# Check for expecting 'enable_hive_interactive' is ON given that there is 
HSI on atleast one host present.
 if len(hsi_hosts) > 0:
   # HIVE_SERVER_INTERACTIVE is mapped to a host
   if 'enable_hive_interactive' not in hive_site_env_properties or (
@@ -407,6 +410,15 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
 "item": self.getErrorItem(
   "enable_hive_interactive in 
hive-interactive-env should be set to false.")})
 
+# Check for 'yarn.resourcemanager.scheduler.monitor.enable' config to be 
true if HSI is ON.
+if yarn_site_properties and 
'yarn.resourcemanager.scheduler.monitor.enable' in yarn_site_properties:
+  scheduler_monitor_enabled = 
yarn_site_properties['yarn.resourcemanager.scheduler.monitor.enable']
+  if scheduler_monitor_enabled.lower() == 'false' and 
hive_site_env_properties and 'enable_hive_interactive' in 
hive_site_env_properties and \
+hive_site_env_properties['enable_hive_interactive'].lower() == 'true':
+validationItems.append({"config-name": "enable_hive_interactive",
+"item": self.getWarnItem(
+  "When enabling LLAP, set 
'yarn.resourcemanager.scheduler.monitor.enable' to true to ensure that LLAP 
gets the full allocated capacity.")})
+
 validationProblems = 
self.toConfigurationValidationProblems(validationItems, "hive-interactive-env")
 return validationProblems
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/72cff6c6/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
 
b/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
index 46a6f4d..1c3d8b0 100644
--- 
a/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
+++ 
b/ambari-server/src/test/python/stacks/2.5/common/services-normal-his-2-hosts.json
@@ -1052,7 +1052,8 @@
 "hive.llap.daemon.queue.name": "llap",
 "hive.server2.enable.doAs": "true",
 "hive.llap.daemon.num.executors": "0",
-"hive.server2.tez.sessions.per.default.queue": "32"
+"hive.server2.tez.sessions.per.default.queue": "32",
+"hive.tez.container.size" : "341"
   }
 },
 "hive-interactive-env" : {
@@ -1103,6 +1104,11 @@
   "properties": {
 "tez.am.resource.memory.mb" : "341"
   }
+},
+"tez-interactive-site": {
+  "properties": {
+"tez.am.resource.memory.mb" : "341"
+  }
 }
   },
   "changed-configurations" : [ ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/72cff6c6/ambari-

ambari git commit: AMBARI-19663. LLAP metrics collector host gets wrongly updated. (prasanthj via Swapan Shridhar).

2017-01-27 Thread swapan
Repository: ambari
Updated Branches:
  refs/heads/trunk 6d02a7a5b -> 23522a281


AMBARI-19663. LLAP metrics collector host gets wrongly updated. (prasanthj via 
Swapan Shridhar).


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

Branch: refs/heads/trunk
Commit: 23522a28126bbb1216bb1b556fce1d24a7262d26
Parents: 6d02a7a
Author: Swapan Shridhar 
Authored: Fri Jan 27 11:16:03 2017 -0800
Committer: Swapan Shridhar 
Committed: Fri Jan 27 11:18:30 2017 -0800

--
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/23522a28/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 997975e..4907f93 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -513,7 +513,7 @@ hive_site_config = 
dict(config['configurations']['hive-site'])
 
 # AMS related params #
 
-ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
+ams_collector_hosts = 
",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
 has_metric_collector = not len(ams_collector_hosts) == 0
 if has_metric_collector:
   if 'cluster-env' in config['configurations'] and \
@@ -785,4 +785,4 @@ if enable_ranger_hive:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
-# ranger hive plugin section end
\ No newline at end of file
+# ranger hive plugin section end



ambari git commit: AMBARI-19663. LLAP metrics collector host gets wrongly updated. (prasanthj via Swapan Shridhar).

2017-01-27 Thread swapan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 72cff6c68 -> 3f19ca0c9


AMBARI-19663. LLAP metrics collector host gets wrongly updated. (prasanthj via 
Swapan Shridhar).


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

Branch: refs/heads/branch-2.5
Commit: 3f19ca0c9556f8772cb19ae3dea041bcd1f09341
Parents: 72cff6c
Author: Swapan Shridhar 
Authored: Fri Jan 27 11:16:03 2017 -0800
Committer: Swapan Shridhar 
Committed: Fri Jan 27 11:19:54 2017 -0800

--
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f19ca0c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 10bdd45..6d3455c 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -514,7 +514,7 @@ hive_site_config = 
dict(config['configurations']['hive-site'])
 
 # AMS related params #
 
-ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
+ams_collector_hosts = 
",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
 has_metric_collector = not len(ams_collector_hosts) == 0
 if has_metric_collector:
   if 'cluster-env' in config['configurations'] and \
@@ -784,4 +784,4 @@ if enable_ranger_hive:
   if has_ranger_admin and stack_supports_ranger_audit_db and 
xa_audit_db_flavor.lower() == 'sqla':
 xa_audit_db_is_enabled = False
 
-# ranger hive plugin section end
\ No newline at end of file
+# ranger hive plugin section end



ambari git commit: AMBARI-19641: Deleted configuration groups are displayed along with active group (Amruta Borkar via dili)

2017-01-27 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/trunk dcdf95b28 -> 6d02a7a5b


AMBARI-19641: Deleted configuration groups are displayed along with active 
group (Amruta Borkar via dili)


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

Branch: refs/heads/trunk
Commit: 6d02a7a5b3415a87b0cbcf21d360942719efcb9d
Parents: dcdf95b
Author: Di Li 
Authored: Fri Jan 27 14:13:55 2017 -0500
Committer: Di Li 
Committed: Fri Jan 27 14:13:55 2017 -0500

--
 .../orm/entities/ServiceConfigEntity.java   |  2 +-
 .../server/orm/dao/ServiceConfigDAOTest.java| 66 
 2 files changed, 56 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6d02a7a5/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
index 2d6ca20..8a1b316 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigEntity.java
@@ -50,7 +50,7 @@ import javax.persistence.TableGenerator;
 @NamedQuery(name = "ServiceConfigEntity.findNextServiceConfigVersion", 
query = "SELECT COALESCE(MAX(serviceConfig.version), 0) + 1 AS nextVersion FROM 
ServiceConfigEntity serviceConfig WHERE serviceConfig.serviceName=:serviceName 
AND serviceConfig.clusterId=:clusterId"),
 @NamedQuery(name = "ServiceConfigEntity.findAllServiceConfigsByStack", 
query = "SELECT serviceConfig FROM ServiceConfigEntity serviceConfig WHERE 
serviceConfig.clusterId=:clusterId AND serviceConfig.stack=:stack"),
 @NamedQuery(name = "ServiceConfigEntity.findLatestServiceConfigsByStack", 
query = "SELECT serviceConfig FROM ServiceConfigEntity serviceConfig WHERE 
serviceConfig.clusterId = :clusterId AND serviceConfig.version = (SELECT 
MAX(serviceConfig2.version) FROM ServiceConfigEntity serviceConfig2 WHERE 
serviceConfig2.clusterId=:clusterId AND serviceConfig2.stack=:stack AND 
serviceConfig2.serviceName = serviceConfig.serviceName)"),
-@NamedQuery(name = 
"ServiceConfigEntity.findLatestServiceConfigsByService", query = "SELECT scv 
FROM ServiceConfigEntity scv WHERE scv.clusterId = :clusterId AND 
scv.serviceName = :serviceName AND scv.version = (SELECT MAX(scv2.version) FROM 
ServiceConfigEntity scv2 WHERE (scv2.serviceName = :serviceName AND 
scv2.clusterId = :clusterId) AND (scv2.groupId = scv.groupId OR (scv2.groupId 
IS NULL AND scv.groupId IS NULL)))"),
+@NamedQuery(name = 
"ServiceConfigEntity.findLatestServiceConfigsByService", query = "SELECT scv 
FROM ServiceConfigEntity scv WHERE scv.clusterId = :clusterId AND 
scv.serviceName = :serviceName AND (scv.groupId = null OR scv.groupId IN 
(SELECT cg.groupId from ConfigGroupEntity cg)) AND scv.version = (SELECT 
MAX(scv2.version) FROM ServiceConfigEntity scv2 WHERE (scv2.serviceName = 
:serviceName AND scv2.clusterId = :clusterId) AND (scv2.groupId = scv.groupId 
OR (scv2.groupId IS NULL AND scv.groupId IS NULL)))"),
 @NamedQuery(name = 
"ServiceConfigEntity.findLatestServiceConfigsByCluster", query = "SELECT scv 
FROM ServiceConfigEntity scv WHERE scv.clusterId = :clusterId AND 
scv.serviceConfigId IN (SELECT MAX(scv1.serviceConfigId) FROM 
ServiceConfigEntity scv1 WHERE (scv1.clusterId = :clusterId) AND (scv1.groupId 
IS NULL) GROUP BY scv1.serviceName)")})
 public class ServiceConfigEntity {
   @Id

http://git-wip-us.apache.org/repos/asf/ambari/blob/6d02a7a5/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
index aafe557..5890c35 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
@@ -262,23 +262,43 @@ public class ServiceConfigDAOTest {
   @Test
   public void testGetLastServiceConfigsForService() throws Exception {
 String serviceName = "HDFS";
+Clusters clusters = injector.getInstance(Clusters.class);
+clusters.addCluster("c1", HDP_01);
+ConfigGroupEntity configGroupEntity1 = new ConfigGroupEntity();
+ClusterEntity clusterEnti

ambari git commit: Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

2017-01-27 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 23522a281 -> 65eb88672


Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

This reverts commit cc30798a6f1428fbe2a2dd6c64cac2c128cf9a23.


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

Branch: refs/heads/trunk
Commit: 65eb886720c2ccff344fe99928fabc23bcc48738
Parents: 23522a2
Author: Robert Levas 
Authored: Fri Jan 27 15:09:57 2017 -0500
Committer: Robert Levas 
Committed: Fri Jan 27 15:09:57 2017 -0500

--
 .../UpdateKerberosConfigsServerActionTest.java| 14 --
 1 file changed, 4 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/65eb8867/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index c8ebb63..e756491 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.util.Collection;
@@ -43,6 +43,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -164,15 +165,8 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 action.setExecutionCommand(executionCommand);
 action.execute(null);
 
-assertTrue(configTypes.getValues().contains("cluster-env"));
-boolean containsSecurityEnabled = false;
-for(Map properties: configUpdates.getValues()) {
-  if(properties.containsKey("security_enabled")) {
-containsSecurityEnabled = true;
-break;
-  }
-}
-assertTrue(containsSecurityEnabled);
+assertEquals(configTypes.getValue(), "cluster-env");
+assertEquals(configUpdates.getValue().get("security_enabled"), "false");
 verifyAll();
   }
 



ambari git commit: Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

2017-01-27 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 3f19ca0c9 -> 687d701af


Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

This reverts commit 31527a01564d337986568e58d0d49122a5f952a4.


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

Branch: refs/heads/branch-2.5
Commit: 687d701af60998743dd1d97ab62459e8630b18e7
Parents: 3f19ca0
Author: Robert Levas 
Authored: Fri Jan 27 15:13:01 2017 -0500
Committer: Robert Levas 
Committed: Fri Jan 27 15:13:01 2017 -0500

--
 .../UpdateKerberosConfigsServerActionTest.java | 13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/687d701a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index 710f474..98b3f00 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.util.Collection;
@@ -163,15 +163,8 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
 action.setExecutionCommand(executionCommand);
 action.execute(null);
 
-assertTrue(configTypes.getValues().contains("cluster-env"));
-boolean containsSecurityEnabled = false;
-for(Map properties: configUpdates.getValues()) {
-  if(properties.containsKey("security_enabled")) {
-containsSecurityEnabled = true;
-break;
-  }
-}
-assertTrue(containsSecurityEnabled);
+assertEquals(configTypes.getValue(), "cluster-env");
+assertEquals(configUpdates.getValue().get("security_enabled"), "false");
 verifyAll();
   }
 



ambari git commit: AMBARI-19751: Credential Store params should be in the command json for RESTART

2017-01-27 Thread smnaha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 687d701af -> c2e51758f


AMBARI-19751: Credential Store params should be in the command json for RESTART


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

Branch: refs/heads/branch-2.5
Commit: c2e51758f81bac1f0b1646e8f92846810799ce70
Parents: 687d701
Author: Nahappan Somasundaram 
Authored: Fri Jan 27 09:56:03 2017 -0800
Committer: Nahappan Somasundaram 
Committed: Fri Jan 27 12:32:33 2017 -0800

--
 .../AmbariCustomCommandExecutionHelper.java | 16 
 1 file changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c2e51758/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 8b851ac..93f4a8f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -175,6 +175,8 @@ public class AmbariCustomCommandExecutionHelper {
   @Inject
   private HostRoleCommandDAO hostRoleCommandDAO;
 
+  private Map>> 
configCredentialsForService = new HashMap<>();
+
   protected static final String SERVICE_CHECK_COMMAND_NAME = "SERVICE_CHECK";
   protected static final String START_COMMAND_NAME = "START";
   protected static final String RESTART_COMMAND_NAME = "RESTART";
@@ -382,6 +384,20 @@ public class AmbariCustomCommandExecutionHelper {
 
   
execCmd.setAvailableServicesFromServiceInfoMap(ambariMetaInfo.getServices(stackId.getStackName(),
 stackId.getStackVersion()));
 
+  // Get the value of credential store enabled from the DB
+  Service clusterService = cluster.getService(serviceName);
+  
execCmd.setCredentialStoreEnabled(String.valueOf(clusterService.isCredentialStoreEnabled()));
+
+  // Get the map of service config type to password properties for the 
service
+  Map> configCredentials;
+  configCredentials = 
configCredentialsForService.get(clusterService.getName());
+  if (configCredentials == null) {
+configCredentials = 
configHelper.getCredentialStoreEnabledProperties(stackId, clusterService);
+configCredentialsForService.put(clusterService.getName(), 
configCredentials);
+  }
+
+  execCmd.setConfigurationCredentials(configCredentials);
+
   Map hostLevelParams = new TreeMap<>();
 
   hostLevelParams.put(CUSTOM_COMMAND, commandName);



ambari git commit: AMBARI-19751: Credential Store params should be in the command json for RESTART

2017-01-27 Thread smnaha
Repository: ambari
Updated Branches:
  refs/heads/trunk 65eb88672 -> 9d8a54c23


AMBARI-19751: Credential Store params should be in the command json for RESTART


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

Branch: refs/heads/trunk
Commit: 9d8a54c23146db595e81d72785c4f9779f3bee00
Parents: 65eb886
Author: Nahappan Somasundaram 
Authored: Fri Jan 27 09:56:03 2017 -0800
Committer: Nahappan Somasundaram 
Committed: Fri Jan 27 12:32:59 2017 -0800

--
 .../AmbariCustomCommandExecutionHelper.java | 16 
 1 file changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9d8a54c2/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 8b851ac..93f4a8f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -175,6 +175,8 @@ public class AmbariCustomCommandExecutionHelper {
   @Inject
   private HostRoleCommandDAO hostRoleCommandDAO;
 
+  private Map>> 
configCredentialsForService = new HashMap<>();
+
   protected static final String SERVICE_CHECK_COMMAND_NAME = "SERVICE_CHECK";
   protected static final String START_COMMAND_NAME = "START";
   protected static final String RESTART_COMMAND_NAME = "RESTART";
@@ -382,6 +384,20 @@ public class AmbariCustomCommandExecutionHelper {
 
   
execCmd.setAvailableServicesFromServiceInfoMap(ambariMetaInfo.getServices(stackId.getStackName(),
 stackId.getStackVersion()));
 
+  // Get the value of credential store enabled from the DB
+  Service clusterService = cluster.getService(serviceName);
+  
execCmd.setCredentialStoreEnabled(String.valueOf(clusterService.isCredentialStoreEnabled()));
+
+  // Get the map of service config type to password properties for the 
service
+  Map> configCredentials;
+  configCredentials = 
configCredentialsForService.get(clusterService.getName());
+  if (configCredentials == null) {
+configCredentials = 
configHelper.getCredentialStoreEnabledProperties(stackId, clusterService);
+configCredentialsForService.put(clusterService.getName(), 
configCredentials);
+  }
+
+  execCmd.setConfigurationCredentials(configCredentials);
+
   Map hostLevelParams = new TreeMap<>();
 
   hostLevelParams.put(CUSTOM_COMMAND, commandName);



ambari git commit: AMBARI-19754. Remove white border from the content area in popup wizards.(xiwang)

2017-01-27 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 9d8a54c23 -> b3391f0dd


AMBARI-19754. Remove white border from the content area in popup 
wizards.(xiwang)


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

Branch: refs/heads/trunk
Commit: b3391f0dd030130add23b9ffb09fb7a776dfe969
Parents: 9d8a54c
Author: Xi Wang 
Authored: Fri Jan 27 11:16:49 2017 -0800
Committer: Xi Wang 
Committed: Fri Jan 27 14:22:02 2017 -0800

--
 ambari-web/app/styles/modal_popups.less | 42 +++-
 .../views/common/modal_popups/log_tail_popup.js |  2 +-
 .../admin/stack_upgrade/upgrade_history_view.js |  2 +-
 3 files changed, 42 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3391f0d/ambari-web/app/styles/modal_popups.less
--
diff --git a/ambari-web/app/styles/modal_popups.less 
b/ambari-web/app/styles/modal_popups.less
index c10ef30..a6a0196 100644
--- a/ambari-web/app/styles/modal_popups.less
+++ b/ambari-web/app/styles/modal_popups.less
@@ -81,10 +81,14 @@
   margin: 0;
 }
 
-/*90% width modal window start*/
+/*90% width wizard modal window start*/
 .wizard-modal-wrapper {
   .modal {
 .modal-body {
+  padding: 0;
+  .wizard {
+border: none;
+  }
   div.error {
 color: #b94a48;
 .help-block {
@@ -114,8 +118,42 @@
   }
 
 }
+/*90% width wizard modal window end*/
+
+/*90% width modal (non-wizard) window start*/
+
+.wide-modal-wrapper {
+  .modal {
+.modal-body {
+  div.error {
+color: #b94a48;
+.help-block {
+  color: #b94a48;
+}
+  }
+
+  div.error input{
+border-color: #b94a48;
+-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  }
+}
+  }
+
+  .content {
+padding: 0;
+  }
 
-/*90% width modal window end*/
+  //fix stripped in inner table
+  .table-striped tbody tr:nth-child(odd)
+  td .table-striped tbody
+  tr:nth-child(odd) td,
+  tr:nth-child(even) th {
+background-color: transparent;
+  }
+}
+/*90% width modal window (non-wizard) end*/
 
 /*700px width modal window start*/
 .modal-690px-width {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3391f0d/ambari-web/app/views/common/modal_popups/log_tail_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popups/log_tail_popup.js 
b/ambari-web/app/views/common/modal_popups/log_tail_popup.js
index 1e6924f..6510ac9 100644
--- a/ambari-web/app/views/common/modal_popups/log_tail_popup.js
+++ b/ambari-web/app/views/common/modal_popups/log_tail_popup.js
@@ -22,7 +22,7 @@ var fileUtils = require('utils/file_utils');
 
 App.showLogTailPopup = function(content) {
   return App.ModalPopup.show({
-classNames: ['log-tail-popup', 'wizard-modal-wrapper', 
'full-height-modal'],
+classNames: ['log-tail-popup', 'wide-modal-wrapper', 'full-height-modal'],
 modalDialogClasses: ['modal-xlg'],
 header: fileUtils.fileNameFromPath(content.get('filePath')),
 primary: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3391f0d/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index c4a428e..aeee96e 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -297,7 +297,7 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
 this.get('controller').set('currentUpgradeRecord', record);
 
 App.ModalPopup.show({
-  classNames: ['wizard-modal-wrapper'],
+  classNames: ['wide-modal-wrapper'],
   modalDialogClasses: ['modal-xlg'],
   header: 
Em.I18n.t('admin.stackVersions.upgradeHistory.record.title').format(displayName,
 direction, toVersion),
   bodyClass: App.MainAdminStackUpgradeHistoryDetailsView,



ambari git commit: AMBARI-19759. Fix Spark2 service description string (Bikas Saha via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c2e51758f -> 094e7ae4c


AMBARI-19759. Fix Spark2 service description string (Bikas Saha via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 094e7ae4c3f691f05b516c86a7892411fd00d4ee
Parents: c2e5175
Author: Sumit Mohanty 
Authored: Fri Jan 27 16:02:15 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 16:02:15 2017 -0800

--
 .../main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/094e7ae4/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
index 34d3fdd..66341c9 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
@@ -23,8 +23,9 @@
   
 
   SPARK2
-  Apache Spark 2.1 is a fast and general engine for large-scale 
data processing. This service is Technical Preview.
-  2.1.x
+  Apache Spark is a fast and general engine for large-scale data 
processing
+  2.x
+  DEFAULT
 
   
 



ambari git commit: AMBARI-19759. Fix Spark2 service description string (Bikas Saha via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk b3391f0dd -> c60098536


AMBARI-19759. Fix Spark2 service description string (Bikas Saha via smohanty)


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

Branch: refs/heads/trunk
Commit: c60098536dcd7faf85e364fdcafed17cbba340a6
Parents: b3391f0
Author: Sumit Mohanty 
Authored: Fri Jan 27 16:02:15 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 16:02:46 2017 -0800

--
 .../main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c6009853/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
index 34d3fdd..66341c9 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/metainfo.xml
@@ -23,8 +23,9 @@
   
 
   SPARK2
-  Apache Spark 2.1 is a fast and general engine for large-scale 
data processing. This service is Technical Preview.
-  2.1.x
+  Apache Spark is a fast and general engine for large-scale data 
processing
+  2.x
+  DEFAULT
 
   
 



ambari git commit: AMBARI-19761. HSI start fails after Ambari upgrade with Unrecognized option: --skiphadoopversion and --skiphbasecp (Swapan Shridhar via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk c60098536 -> 771c9c011


AMBARI-19761. HSI start fails after Ambari upgrade with Unrecognized option: 
--skiphadoopversion and --skiphbasecp (Swapan Shridhar via smohanty)


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

Branch: refs/heads/trunk
Commit: 771c9c011b3ea00e4ad0171b04bd851c7ee74ee0
Parents: c600985
Author: Sumit Mohanty 
Authored: Fri Jan 27 17:53:04 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 17:53:04 2017 -0800

--
 .../HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/771c9c01/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
index 924c88c..ce10824 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
@@ -284,9 +284,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
   cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service 
llap --instances {params.num_llap_nodes}"
" --slider-am-container-mb {params.slider_am_container_mb} 
--size {params.llap_daemon_container_size}m"
" --cache {params.hive_llap_io_mem_size}m --xmx 
{params.llap_heap_size}m --loglevel {params.llap_log_level}"
-   " {params.llap_extra_slider_opts} --skiphadoopversion 
--skiphbasecp --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
+   " {params.llap_extra_slider_opts} --output 
{LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
 
-  # '--slider-placement' param is supported from HDP Hive GA version.
+  # Append params that are supported from Hive llap GA version.
   if params.stack_supports_hive_interactive_ga:
 # Figure out the Slider Anti-affinity to be used.
 # YARN does not support anti-affinity, and therefore Slider implements 
AA by the means of exclusion lists, i.e, it
@@ -300,7 +300,7 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 else:
   Logger.info("Setting slider_placement: 4, as 
llap_daemon_container_size : {0} <= 0.5 * "
  "YARN NodeManager 
Memory({1})".format(params.llap_daemon_container_size, params.yarn_nm_mem))
-cmd += format(" --slider-placement {slider_placement}")
+cmd += format(" --slider-placement {slider_placement} 
--skiphadoopversion --skiphbasecp")
 
   if params.security_enabled:
 llap_keytab_splits = params.hive_llap_keytab_file.split("/")



ambari git commit: AMBARI-19761. HSI start fails after Ambari upgrade with Unrecognized option: --skiphadoopversion and --skiphbasecp (Swapan Shridhar via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 094e7ae4c -> 80636b900


AMBARI-19761. HSI start fails after Ambari upgrade with Unrecognized option: 
--skiphadoopversion and --skiphbasecp (Swapan Shridhar via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 80636b9009b5c331e41dc8653ac7098eac897418
Parents: 094e7ae
Author: Sumit Mohanty 
Authored: Fri Jan 27 17:53:04 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 17:53:45 2017 -0800

--
 .../HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/80636b90/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
index 5c56823..e1b938f 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
@@ -285,9 +285,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
   cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service 
llap --instances {params.num_llap_nodes}"
" --slider-am-container-mb {params.slider_am_container_mb} 
--size {params.llap_daemon_container_size}m"
" --cache {params.hive_llap_io_mem_size}m --xmx 
{params.llap_heap_size}m --loglevel {params.llap_log_level}"
-   " {params.llap_extra_slider_opts} --skiphadoopversion 
--skiphbasecp --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
+   " {params.llap_extra_slider_opts} --output 
{LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
 
-  # '--slider-placement' param is supported from HDP Hive GA version.
+  # Append params that are supported from Hive llap GA version.
   if params.stack_supports_hive_interactive_ga:
 # Figure out the Slider Anti-affinity to be used.
 # YARN does not support anti-affinity, and therefore Slider implements 
AA by the means of exclusion lists, i.e, it
@@ -301,7 +301,7 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 else:
   Logger.info("Setting slider_placement: 4, as 
llap_daemon_container_size : {0} <= 0.5 * "
  "YARN NodeManager 
Memory({1})".format(params.llap_daemon_container_size, params.yarn_nm_mem))
-cmd += format(" --slider-placement {slider_placement}")
+cmd += format(" --slider-placement {slider_placement} 
--skiphadoopversion --skiphbasecp")
 
   if params.security_enabled:
 llap_keytab_splits = params.hive_llap_keytab_file.split("/")



ambari git commit: AMBARI-19743. Agent registration fails with non-root agent user (Attila Doroszlai via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 80636b900 -> 4a2c24627


AMBARI-19743. Agent registration fails with non-root agent user (Attila 
Doroszlai via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 4a2c24627205b459ff2ec2b874a2311957df8369
Parents: 80636b9
Author: Sumit Mohanty 
Authored: Fri Jan 27 18:17:48 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 18:17:48 2017 -0800

--
 ambari-server/src/main/python/bootstrap.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4a2c2462/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 d836040..f1c53ce 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -630,8 +630,7 @@ class BootstrapDefault(Bootstrap):
 self.host_log.write("==\n")
 self.host_log.write("Running create-python-wrap script...")
 
-command = "chmod a+x %s && %s" % \
-  (REMOTE_CREATE_PYTHON_WRAP_SCRIPT, 
REMOTE_CREATE_PYTHON_WRAP_SCRIPT)
+command = "chmod a+x {script} && {sudo} {script}".format(sudo=AMBARI_SUDO, 
script=REMOTE_CREATE_PYTHON_WRAP_SCRIPT)
 
 ssh = SSH(params.user, params.sshPort, params.sshkey_file, self.host, 
command,
   params.bootdir, self.host_log)



ambari git commit: AMBARI-19743. Agent registration fails with non-root agent user (Attila Doroszlai via smohanty)

2017-01-27 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 771c9c011 -> 0e8c966d2


AMBARI-19743. Agent registration fails with non-root agent user (Attila 
Doroszlai via smohanty)


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

Branch: refs/heads/trunk
Commit: 0e8c966d20b895442ea461ce488dcb9aae4d8638
Parents: 771c9c0
Author: Sumit Mohanty 
Authored: Fri Jan 27 18:17:48 2017 -0800
Committer: Sumit Mohanty 
Committed: Fri Jan 27 18:19:36 2017 -0800

--
 ambari-server/src/main/python/bootstrap.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e8c966d/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 d836040..f1c53ce 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -630,8 +630,7 @@ class BootstrapDefault(Bootstrap):
 self.host_log.write("==\n")
 self.host_log.write("Running create-python-wrap script...")
 
-command = "chmod a+x %s && %s" % \
-  (REMOTE_CREATE_PYTHON_WRAP_SCRIPT, 
REMOTE_CREATE_PYTHON_WRAP_SCRIPT)
+command = "chmod a+x {script} && {sudo} {script}".format(sudo=AMBARI_SUDO, 
script=REMOTE_CREATE_PYTHON_WRAP_SCRIPT)
 
 ssh = SSH(params.user, params.sshPort, params.sshkey_file, self.host, 
command,
   params.bootdir, self.host_log)



ambari git commit: AMBARI-19762. Kerberizing PERF cluster fails since cannot find principal name config in dummy.py. (Madhuvanthi Radhakrishnan via swagle)

2017-01-27 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 0e8c966d2 -> 50403914c


AMBARI-19762. Kerberizing PERF cluster fails since cannot find principal name 
config in dummy.py. (Madhuvanthi Radhakrishnan via swagle)


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

Branch: refs/heads/trunk
Commit: 50403914c7a092f6e66726b3bf2331be13625f71
Parents: 0e8c966
Author: Siddharth Wagle 
Authored: Fri Jan 27 18:42:47 2017 -0800
Committer: Siddharth Wagle 
Committed: Fri Jan 27 18:42:47 2017 -0800

--
 .../PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py| 5 +
 .../resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml| 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/50403914/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
index 66e36ad..45f6348 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
@@ -33,6 +33,11 @@ class ZkfcSlave(Dummy):
   def __init__(self):
 super(ZkfcSlave, self).__init__()
 self.component_name = "FAKEZKFC"
+self.principal_conf_name = "hadoop-env"
+self.principal_name = "hdfs_principal_name"
+self.keytab_conf_name = "hadoop-env"
+self.keytab_name = "hdfs_user_keytab"
+
 
 if __name__ == "__main__":
   ZkfcSlave().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/50403914/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
index 0f926dd..e07f3a7 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
@@ -229,9 +229,9 @@
 
 
 
-  FAKEFAKEMAPREDUCE2
+  FAKEMAPREDUCE2
   2.7.1.2.5
-  FAKEFAKEMapReduce2
+  FAKEMapReduce2
   Apache Hadoop NextGen MapReduce (FAKEYARN)
   configuration-mapred
 



ambari git commit: AMBARI-19762. Kerberizing PERF cluster fails since cannot find principal name config in dummy.py. (Madhuvanthi Radhakrishnan via swagle)

2017-01-27 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 4a2c24627 -> e273668b7


AMBARI-19762. Kerberizing PERF cluster fails since cannot find principal name 
config in dummy.py. (Madhuvanthi Radhakrishnan via swagle)


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

Branch: refs/heads/branch-2.5
Commit: e273668b74cf5f3dd30cb7e4c7ac282e1bc62b39
Parents: 4a2c246
Author: Siddharth Wagle 
Authored: Fri Jan 27 18:43:22 2017 -0800
Committer: Siddharth Wagle 
Committed: Fri Jan 27 18:43:22 2017 -0800

--
 .../PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py| 5 +
 .../resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml| 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e273668b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
index 66e36ad..45f6348 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEHDFS/package/scripts/zkfc_slave.py
@@ -33,6 +33,11 @@ class ZkfcSlave(Dummy):
   def __init__(self):
 super(ZkfcSlave, self).__init__()
 self.component_name = "FAKEZKFC"
+self.principal_conf_name = "hadoop-env"
+self.principal_name = "hdfs_principal_name"
+self.keytab_conf_name = "hadoop-env"
+self.keytab_name = "hdfs_user_keytab"
+
 
 if __name__ == "__main__":
   ZkfcSlave().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/e273668b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
index 0f926dd..e07f3a7 100644
--- 
a/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/PERF/1.0/services/FAKEYARN/metainfo.xml
@@ -229,9 +229,9 @@
 
 
 
-  FAKEFAKEMAPREDUCE2
+  FAKEMAPREDUCE2
   2.7.1.2.5
-  FAKEFAKEMapReduce2
+  FAKEMapReduce2
   Apache Hadoop NextGen MapReduce (FAKEYARN)
   configuration-mapred