ambari git commit: AMBARI-19042: Ambari-server: OOZIE stack definition changes required to support credential store

2016-11-30 Thread smnaha
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f04e79ab -> 337c5f29f


AMBARI-19042: Ambari-server: OOZIE stack definition changes required to support 
credential store


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

Branch: refs/heads/trunk
Commit: 337c5f29fd31fa8b7f8391d81125dc1e5eef160c
Parents: 7f04e79
Author: Nahappan Somasundaram 
Authored: Wed Nov 30 17:50:21 2016 -0800
Committer: Nahappan Somasundaram 
Committed: Wed Nov 30 22:07:14 2016 -0800

--
 .../main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/337c5f29/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
index 027e8b4..df1092a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
@@ -20,6 +20,10 @@
   
 
   OOZIE
+  
+true
+false
+  
   common-services/OOZIE/4.2.0.2.5
   
 



ambari git commit: AMBARI-19042: Ambari-server: OOZIE stack definition changes required to support credential store

2016-11-30 Thread smnaha
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7b53d0704 -> 7f60b1f17


AMBARI-19042: Ambari-server: OOZIE stack definition changes required to support 
credential store


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

Branch: refs/heads/branch-2.5
Commit: 7f60b1f176d9add5ceacfc631d00245623a6edd5
Parents: 7b53d07
Author: Nahappan Somasundaram 
Authored: Wed Nov 30 17:50:21 2016 -0800
Committer: Nahappan Somasundaram 
Committed: Wed Nov 30 22:07:44 2016 -0800

--
 .../main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f60b1f1/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
index f0a7754..75aa9d9 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/OOZIE/metainfo.xml
@@ -20,6 +20,10 @@
   
 
   OOZIE
+  
+true
+false
+  
   common-services/OOZIE/4.2.0.2.5
 
   



ambari git commit: AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas)

2016-11-30 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a5ce8230e -> 7b53d0704


AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas)


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

Branch: refs/heads/branch-2.5
Commit: 7b53d07040fee054fa3592da69d9d7f68b3adfd9
Parents: a5ce823
Author: Robert Levas 
Authored: Wed Nov 30 20:40:12 2016 -0500
Committer: Robert Levas 
Committed: Wed Nov 30 20:40:12 2016 -0500

--
 .../org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b53d070/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index 4135919..ce0b387 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -211,11 +211,13 @@ public class UpgradeCatalog250Test {
   public void testExecuteDMLUpdates() throws Exception {
 Method updateAmsConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAMSConfigs");
 Method updateKafkaConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs");
+Method updateHiveLlapConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs");
 Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 
 UpgradeCatalog250 upgradeCatalog250 = 
createMockBuilder(UpgradeCatalog250.class)
   .addMockedMethod(updateAmsConfigs)
   .addMockedMethod(updateKafkaConfigs)
+  .addMockedMethod(updateHiveLlapConfigs)
   .addMockedMethod(addNewConfigurationsFromXml)
   .createMock();
 
@@ -229,6 +231,9 @@ public class UpgradeCatalog250Test {
 upgradeCatalog250.updateKafkaConfigs();
 expectLastCall().once();
 
+upgradeCatalog250.updateHiveLlapConfigs();
+expectLastCall().once();
+
 replay(upgradeCatalog250);
 
 upgradeCatalog250.executeDMLUpdates();



ambari git commit: AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas)

2016-11-30 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 1e65ba694 -> 7f04e79ab


AMBARI-19040. Fix NPE in UpgradeCatalog250Test.testExecuteDMLUpdates (rlevas)


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

Branch: refs/heads/trunk
Commit: 7f04e79ab33dc173eb174fd9fcc60bbb54d2c947
Parents: 1e65ba6
Author: Robert Levas 
Authored: Wed Nov 30 20:38:34 2016 -0500
Committer: Robert Levas 
Committed: Wed Nov 30 20:38:34 2016 -0500

--
 .../org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f04e79a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index 14fc20b..978e2dc 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -212,11 +212,13 @@ public class UpgradeCatalog250Test {
 Method updateAmsConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAMSConfigs");
 Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 Method updateKafkaConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs");
+Method updateHiveLlapConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs");
 
 UpgradeCatalog250 upgradeCatalog250 = 
createMockBuilder(UpgradeCatalog250.class)
 .addMockedMethod(updateAmsConfigs)
 .addMockedMethod(addNewConfigurationsFromXml)
 .addMockedMethod(updateKafkaConfigs)
+.addMockedMethod(updateHiveLlapConfigs)
 .createMock();
 
 upgradeCatalog250.updateAMSConfigs();
@@ -228,6 +230,9 @@ public class UpgradeCatalog250Test {
 upgradeCatalog250.updateKafkaConfigs();
 expectLastCall().once();
 
+upgradeCatalog250.updateHiveLlapConfigs();
+expectLastCall().once();
+
 replay(upgradeCatalog250);
 
 upgradeCatalog250.executeDMLUpdates();



ambari git commit: AMBARI-18755. Deployment failing at creating principal [addendum] (rlevas)

2016-11-30 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 707f07f63 -> a5ce8230e


AMBARI-18755. Deployment failing at creating principal [addendum] (rlevas)


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

Branch: refs/heads/branch-2.5
Commit: a5ce8230e59d515e6bcbe0db949ef6bfcd447c7a
Parents: 707f07f
Author: Robert Levas 
Authored: Wed Nov 30 19:57:28 2016 -0500
Committer: Robert Levas 
Committed: Wed Nov 30 19:57:28 2016 -0500

--
 ambari-server/docs/configuration/index.md   | 25 +---
 .../server/configuration/Configuration.java |  7 ++
 .../kerberos/MITKerberosOperationHandler.java   | 22 -
 .../ambari/server/utils/ShellCommandUtil.java   | 11 -
 .../MITKerberosOperationHandlerTest.java| 23 ++
 .../server/utils/TestShellCommandUtil.java  | 13 ++
 6 files changed, 81 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a5ce8230/ambari-server/docs/configuration/index.md
--
diff --git a/ambari-server/docs/configuration/index.md 
b/ambari-server/docs/configuration/index.md
index 77d3a4d..34dafc2 100644
--- a/ambari-server/docs/configuration/index.md
+++ b/ambari-server/docs/configuration/index.md
@@ -49,15 +49,17 @@ The following are the properties which can be used to 
configure Ambari.
 | agent.stack.retry.tries | The number of times an Ambari Agent should retry 
package installation when it fails due to a repository error.  This 
property is related to `agent.stack.retry.on_repo_unavailability`. |`5` | 
 | agent.task.timeout | The time, in seconds, before agent commands are killed. 
This does not include package installation commands. |`900` | 
 | agent.threadpool.size.max | The size of the Jetty connection pool used for 
handling incoming Ambari Agent requests. |`25` | 
+| alerts.ambari.snmp.dispatcher.udp.port | The UDP port to use when binding 
the Ambari SNMP dispatcher on Ambari Server startup. If no port is specified, 
then a random port will be used. | | 
 | alerts.cache.enabled | Determines whether current alerts should be cached. 
Enabling this can increase performance on large cluster, but can also result in 
lost alert data if the cache is not flushed frequently. |`false` | 
 | alerts.cache.flush.interval | The time, in minutes, after which cached alert 
information is flushed to the database This property is related to 
`alerts.cache.enabled`. |`10` | 
 | alerts.cache.size | The size of the alert cache. This property is 
related to `alerts.cache.enabled`. |`5` | 
 | alerts.execution.scheduler.maxThreads | The number of threads used to handle 
alerts received from the Ambari Agents. The value should be increased as the 
size of the cluster increases. |`2` | 
 | alerts.snmp.dispatcher.udp.port | The UDP port to use when binding the SNMP 
dispatcher on Ambari Server startup. If no port is specified, then a random 
port will be used. | | 
-| alerts.ambari.snmp.dispatcher.udp.port | The UDP port to use when binding 
the SNMP dispatcher on Ambari Server startup. If no port is specified, then a 
random port will be used. | |
-| alerts.template.file | The full path to the XML file that describes the 
different alert templates. | |
+| alerts.template.file | The full path to the XML file that describes the 
different alert templates. | | 
 | ambari.display.url | The URL to use when creating messages which should 
include the Ambari Server URL.The following are examples of valid 
values:`http://ambari.apache.org:8080` | | 
 | ambari.ldap.isConfigured | An internal property used for unit testing and 
development purposes. |`false` | 
+| ambari.post.user.creation.hook | The location of the post user creation hook 
on the ambari server hosting machine. 
|`/var/lib/ambari-server/resources/scripts/post-user-creation-hook.sh` | 
+| ambari.post.user.creation.hook.enabled | Indicates whether the post user 
creation is enabled or not. By default is false. |`false` | 
 | ambari.python.wrap | The name of the shell script used to wrap all 
invocations of Python by Ambari.  |`ambari-python-wrap` | 
 | anonymous.audit.name | The name of the user given to requests which are 
executed without any credentials. |`_anonymous` | 
 | api.authenticated.user | The username of the default user assumed to be 
executing API calls. When set, authentication is not required in order to login 
to Ambari or use the REST APIs.   | | 
@@ -105,6 +107,7 @@ The following are the properties which can be used to 
configure Ambari.
 | 

ambari git commit: AMBARI-19035. LLAP startup: Ambari should not use slider anti-affinity when it's avoidable

2016-11-30 Thread swapan
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18901 24045aa89 -> b74905495


AMBARI-19035. LLAP startup: Ambari should not use slider anti-affinity when 
it's avoidable


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

Branch: refs/heads/branch-feature-AMBARI-18901
Commit: b74905495babf00dc93dd24e28290aea3c7acb3d
Parents: 24045aa
Author: Swapan Shridhar 
Authored: Wed Nov 30 11:24:49 2016 -0800
Committer: Swapan Shridhar 
Committed: Wed Nov 30 16:02:14 2016 -0800

--
 .../package/scripts/hive_server_interactive.py  | 12 +++-
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7490549/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 00e5fc1..4866432 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
@@ -277,10 +277,20 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
 
   unique_name = "llap-slider%s" % 
datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S')
 
+  # 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
+  # starts containers one by one and excludes the nodes it gets (adding a 
delay of ~2sec./machine). When the LLAP
+  # container memory size configuration is more than half of YARN node 
memory, AA is implicit and should be avoided.
+  slider_placement = 4
+  if long(params.llap_daemon_container_size) > (0.5 * 
long(params.yarn_nm_mem)):
+slider_placement = 0
+Logger.info("Setting slider_placement : 0, as 
llap_daemon_container_size : {0} > 0.5 * "
+"YARN NodeManager 
Memory({1})".format(params.llap_daemon_container_size, params.yarn_nm_mem))
+
   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}"
-   " --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
+   " --slider-placement {slider_placement} --output 
{LLAP_PACKAGE_CREATION_PATH}/{unique_name}")
   if params.security_enabled:
 llap_keytab_splits = params.hive_llap_keytab_file.split("/")
 Logger.debug("llap_keytab_splits : {0}".format(llap_keytab_splits))

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7490549/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 bba0f3b..e7461fd 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
@@ -599,6 +599,7 @@ if has_hive_interactive:
   tez_interactive_user = config['configurations']['tez-env']['tez_user']
   num_retries_for_checking_llap_status = 
default('/configurations/hive-interactive-env/num_retries_for_checking_llap_status',
 10)
   # Used in LLAP slider package creation
+  yarn_nm_mem = 
config['configurations']['yarn-site']['yarn.nodemanager.resource.memory-mb']
   num_llap_nodes = 
config['configurations']['hive-interactive-env']['num_llap_nodes']
   llap_daemon_container_size = 
config['configurations']['hive-interactive-site']['hive.llap.daemon.yarn.container.mb']
   llap_log_level = 
config['configurations']['hive-interactive-env']['llap_log_level']



ambari git commit: AMBARI-18755. Deployment failing at creating principal [addendum] (rlevas)

2016-11-30 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 32c9f5a83 -> 1e65ba694


AMBARI-18755. Deployment failing at creating principal [addendum] (rlevas)


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

Branch: refs/heads/trunk
Commit: 1e65ba6943a10d04c38f780f476eca3806e2d9f3
Parents: 32c9f5a
Author: Robert Levas 
Authored: Wed Nov 30 19:16:53 2016 -0500
Committer: Robert Levas 
Committed: Wed Nov 30 19:16:53 2016 -0500

--
 ambari-server/docs/configuration/index.md   | 33 +++-
 .../server/configuration/Configuration.java |  7 +
 .../kerberos/MITKerberosOperationHandler.java   | 22 +
 .../ambari/server/utils/ShellCommandUtil.java   | 11 ++-
 .../MITKerberosOperationHandlerTest.java| 23 ++
 .../server/utils/TestShellCommandUtil.java  | 13 +---
 6 files changed, 89 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1e65ba69/ambari-server/docs/configuration/index.md
--
diff --git a/ambari-server/docs/configuration/index.md 
b/ambari-server/docs/configuration/index.md
index 77d3a4d..6ff263c 100644
--- a/ambari-server/docs/configuration/index.md
+++ b/ambari-server/docs/configuration/index.md
@@ -49,15 +49,17 @@ The following are the properties which can be used to 
configure Ambari.
 | agent.stack.retry.tries | The number of times an Ambari Agent should retry 
package installation when it fails due to a repository error.  This 
property is related to `agent.stack.retry.on_repo_unavailability`. |`5` | 
 | agent.task.timeout | The time, in seconds, before agent commands are killed. 
This does not include package installation commands. |`900` | 
 | agent.threadpool.size.max | The size of the Jetty connection pool used for 
handling incoming Ambari Agent requests. |`25` | 
+| alerts.ambari.snmp.dispatcher.udp.port | The UDP port to use when binding 
the Ambari SNMP dispatcher on Ambari Server startup. If no port is specified, 
then a random port will be used. | | 
 | alerts.cache.enabled | Determines whether current alerts should be cached. 
Enabling this can increase performance on large cluster, but can also result in 
lost alert data if the cache is not flushed frequently. |`false` | 
 | alerts.cache.flush.interval | The time, in minutes, after which cached alert 
information is flushed to the database This property is related to 
`alerts.cache.enabled`. |`10` | 
 | alerts.cache.size | The size of the alert cache. This property is 
related to `alerts.cache.enabled`. |`5` | 
 | alerts.execution.scheduler.maxThreads | The number of threads used to handle 
alerts received from the Ambari Agents. The value should be increased as the 
size of the cluster increases. |`2` | 
 | alerts.snmp.dispatcher.udp.port | The UDP port to use when binding the SNMP 
dispatcher on Ambari Server startup. If no port is specified, then a random 
port will be used. | | 
-| alerts.ambari.snmp.dispatcher.udp.port | The UDP port to use when binding 
the SNMP dispatcher on Ambari Server startup. If no port is specified, then a 
random port will be used. | |
-| alerts.template.file | The full path to the XML file that describes the 
different alert templates. | |
+| alerts.template.file | The full path to the XML file that describes the 
different alert templates. | | 
 | ambari.display.url | The URL to use when creating messages which should 
include the Ambari Server URL.The following are examples of valid 
values:`http://ambari.apache.org:8080` | | 
 | ambari.ldap.isConfigured | An internal property used for unit testing and 
development purposes. |`false` | 
+| ambari.post.user.creation.hook | The location of the post user creation hook 
on the ambari server hosting machine. 
|`/var/lib/ambari-server/resources/scripts/post-user-creation-hook.sh` | 
+| ambari.post.user.creation.hook.enabled | Indicates whether the post user 
creation is enabled or not. By default is false. |`false` | 
 | ambari.python.wrap | The name of the shell script used to wrap all 
invocations of Python by Ambari.  |`ambari-python-wrap` | 
 | anonymous.audit.name | The name of the user given to requests which are 
executed without any credentials. |`_anonymous` | 
 | api.authenticated.user | The username of the default user assumed to be 
executing API calls. When set, authentication is not required in order to login 
to Ambari or use the REST APIs.   | | 
@@ -105,6 +107,7 @@ The following are the properties which can be used to 
configure Ambari.
 | authentication.ldap.usernameAttribute | The 

ambari git commit: AMBARI-19037. Clean up logs for the usage of taskId for easy lookup of command progress and status (smohanty)

2016-11-30 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 15f843bbb -> 32c9f5a83


AMBARI-19037. Clean up logs for the usage of taskId for easy lookup of command 
progress and status (smohanty)


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

Branch: refs/heads/trunk
Commit: 32c9f5a83bef6bca90ebecb7721de256c19061c7
Parents: 15f843b
Author: Sumit Mohanty 
Authored: Wed Nov 30 14:45:40 2016 -0800
Committer: Sumit Mohanty 
Committed: Wed Nov 30 14:45:40 2016 -0800

--
 ambari-agent/src/main/python/ambari_agent/ActionQueue.py  | 10 +-
 .../main/python/ambari_agent/CustomServiceOrchestrator.py |  4 ++--
 .../org/apache/ambari/server/agent/HeartBeatHandler.java  |  2 +-
 .../apache/ambari/server/agent/HeartbeatProcessor.java|  2 +-
 .../server/state/services/RetryUpgradeActionService.java  |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/32c9f5a8/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index a9f1084..4416b9a 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -128,7 +128,7 @@ class ActionQueue(threading.Thread):
   def cancel(self, commands):
 for command in commands:
 
-  logger.info("Canceling command {tid}".format(tid = 
str(command['target_task_id'])))
+  logger.info("Canceling command with taskId = {tid}".format(tid = 
str(command['target_task_id'])))
   logger.debug(pprint.pformat(command))
 
   task_id = command['target_task_id']
@@ -327,7 +327,7 @@ class ActionQueue(threading.Thread):
 else:
   status = self.FAILED_STATUS
   if (commandresult['exitcode'] == -signal.SIGTERM) or 
(commandresult['exitcode'] == -signal.SIGKILL):
-logger.info('Command {cid} was canceled!'.format(cid=taskId))
+logger.info('Command with taskId = {cid} was 
canceled!'.format(cid=taskId))
 break
 
   if status != self.COMPLETED_STATUS and retryAble and retryDuration > 0:
@@ -336,17 +336,17 @@ class ActionQueue(threading.Thread):
   delay = retryDuration
 retryDuration -= delay  # allow one last attempt
 commandresult['stderr'] += "\n\nCommand failed. Retrying command 
execution ...\n\n"
-logger.info("Retrying command id {cid} after a wait of 
{delay}".format(cid=taskId, delay=delay))
+logger.info("Retrying command with taskId = {cid} after a wait of 
{delay}".format(cid=taskId, delay=delay))
 time.sleep(delay)
 continue
   else:
-logger.info("Quit retrying for command id {cid}. Status: {status}, 
retryAble: {retryAble}, retryDuration (sec): {retryDuration}, last delay (sec): 
{delay}"
+logger.info("Quit retrying for command with taskId = {cid}. Status: 
{status}, retryAble: {retryAble}, retryDuration (sec): {retryDuration}, last 
delay (sec): {delay}"
 .format(cid=taskId, status=status, retryAble=retryAble, 
retryDuration=retryDuration, delay=delay))
 break
 
 # final result to stdout
 commandresult['stdout'] += '\n\nCommand completed successfully!\n' if 
status == self.COMPLETED_STATUS else '\n\nCommand failed after ' + 
str(numAttempts) + ' tries\n'
-logger.info('Command {cid} completed successfully!'.format(cid=taskId) if 
status == self.COMPLETED_STATUS else 'Command {cid} failed after {attempts} 
tries'.format(cid=taskId, attempts=numAttempts))
+logger.info('Command with taskId = {cid} completed 
successfully!'.format(cid=taskId) if status == self.COMPLETED_STATUS else 
'Command with taskId = {cid} failed after {attempts} tries'.format(cid=taskId, 
attempts=numAttempts))
 
 roleResult = self.commandStatuses.generate_report_template(command)
 roleResult.update({

http://git-wip-us.apache.org/repos/asf/ambari/blob/32c9f5a8/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
--
diff --git 
a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index ebd3506..7d61611 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -97,12 +97,12 @@ class 

ambari git commit: AMBARI-19037. Clean up logs for the usage of taskId for easy lookup of command progress and status (smohanty)

2016-11-30 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c578a3707 -> 707f07f63


AMBARI-19037. Clean up logs for the usage of taskId for easy lookup of command 
progress and status (smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 707f07f637db30b5b9cf26f165fcaaeb51ef0fce
Parents: c578a37
Author: Sumit Mohanty 
Authored: Wed Nov 30 14:45:40 2016 -0800
Committer: Sumit Mohanty 
Committed: Wed Nov 30 14:46:12 2016 -0800

--
 ambari-agent/src/main/python/ambari_agent/ActionQueue.py  | 10 +-
 .../main/python/ambari_agent/CustomServiceOrchestrator.py |  4 ++--
 .../org/apache/ambari/server/agent/HeartBeatHandler.java  |  2 +-
 .../apache/ambari/server/agent/HeartbeatProcessor.java|  2 +-
 .../server/state/services/RetryUpgradeActionService.java  |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/707f07f6/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index f104939..3ec0621 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -125,7 +125,7 @@ class ActionQueue(threading.Thread):
   def cancel(self, commands):
 for command in commands:
 
-  logger.info("Canceling command {tid}".format(tid = 
str(command['target_task_id'])))
+  logger.info("Canceling command with taskId = {tid}".format(tid = 
str(command['target_task_id'])))
   logger.debug(pprint.pformat(command))
 
   task_id = command['target_task_id']
@@ -321,7 +321,7 @@ class ActionQueue(threading.Thread):
 else:
   status = self.FAILED_STATUS
   if (commandresult['exitcode'] == -signal.SIGTERM) or 
(commandresult['exitcode'] == -signal.SIGKILL):
-logger.info('Command {cid} was canceled!'.format(cid=taskId))
+logger.info('Command with taskId = {cid} was 
canceled!'.format(cid=taskId))
 break
 
   if status != self.COMPLETED_STATUS and retryAble and retryDuration > 0:
@@ -330,17 +330,17 @@ class ActionQueue(threading.Thread):
   delay = retryDuration
 retryDuration -= delay  # allow one last attempt
 commandresult['stderr'] += "\n\nCommand failed. Retrying command 
execution ...\n\n"
-logger.info("Retrying command id {cid} after a wait of 
{delay}".format(cid=taskId, delay=delay))
+logger.info("Retrying command with taskId = {cid} after a wait of 
{delay}".format(cid=taskId, delay=delay))
 time.sleep(delay)
 continue
   else:
-logger.info("Quit retrying for command id {cid}. Status: {status}, 
retryAble: {retryAble}, retryDuration (sec): {retryDuration}, last delay (sec): 
{delay}"
+logger.info("Quit retrying for command with taskId = {cid}. Status: 
{status}, retryAble: {retryAble}, retryDuration (sec): {retryDuration}, last 
delay (sec): {delay}"
 .format(cid=taskId, status=status, retryAble=retryAble, 
retryDuration=retryDuration, delay=delay))
 break
 
 # final result to stdout
 commandresult['stdout'] += '\n\nCommand completed successfully!\n' if 
status == self.COMPLETED_STATUS else '\n\nCommand failed after ' + 
str(numAttempts) + ' tries\n'
-logger.info('Command {cid} completed successfully!'.format(cid=taskId) if 
status == self.COMPLETED_STATUS else 'Command {cid} failed after {attempts} 
tries'.format(cid=taskId, attempts=numAttempts))
+logger.info('Command with taskId = {cid} completed 
successfully!'.format(cid=taskId) if status == self.COMPLETED_STATUS else 
'Command with taskId = {cid} failed after {attempts} tries'.format(cid=taskId, 
attempts=numAttempts))
 
 roleResult = self.commandStatuses.generate_report_template(command)
 roleResult.update({

http://git-wip-us.apache.org/repos/asf/ambari/blob/707f07f6/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
--
diff --git 
a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index ebd3506..7d61611 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -97,12 +97,12 @@ class 

ambari git commit: AMBARI-19023. After adding an Atlas server the first restart command fails since stop doesn't have any configs; if no pid dir exists during stop, perform no-op (alejandro)

2016-11-30 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 47d2f7074 -> c578a3707


AMBARI-19023. After adding an Atlas server the first restart command fails 
since stop doesn't have any configs; if no pid dir exists during stop, perform 
no-op (alejandro)


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

Branch: refs/heads/branch-2.5
Commit: c578a370722907361393cde668a6b9dedb678829
Parents: 47d2f70
Author: Alejandro Fernandez 
Authored: Wed Nov 30 13:51:02 2016 -0800
Committer: Alejandro Fernandez 
Committed: Wed Nov 30 13:51:02 2016 -0800

--
 .../0.1.0.2.3/package/scripts/metadata_server.py  | 18 ++
 .../stacks/2.3/ATLAS/test_metadata_server.py  |  5 -
 2 files changed, 22 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c578a370/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 712c15c..833f5d3 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
@@ -16,6 +16,10 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
+# Python Imports
+import os
+
+# Local Imports
 from metadata import metadata
 from resource_management import Fail
 from resource_management.libraries.functions import conf_select
@@ -122,6 +126,20 @@ class MetadataServer(Script):
 env.set_params(params)
 daemon_cmd = format('source {params.conf_dir}/atlas-env.sh; 
{params.metadata_stop_script}')
 
+# If the pid dir doesn't exist, this means either
+# 1. The user just added Atlas service and issued a restart command 
(stop+start). So stop should be a no-op
+# since there's nothing to stop.
+# OR
+# 2. The user changed the value of the pid dir config and incorrectly 
issued a restart command.
+# In which case the stop command cannot do anything since Ambari doesn't 
know which process to kill.
+# The start command will spawn another instance.
+# The user should have issued a stop, changed the config, and then started 
it.
+if not os.path.isdir(params.pid_dir):
+  
Logger.info("***")
+  Logger.info("Will skip the stop command since this is the first time 
stopping/restarting Atlas "
+  "and the pid dir does not exist, %s\n" % params.pid_dir)
+  return
+
 try:
   Execute(daemon_cmd,
   user=params.metadata_user,

http://git-wip-us.apache.org/repos/asf/ambari/blob/c578a370/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index 585dc94..f2fec70 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -366,7 +366,10 @@ class TestMetadataServer(RMFTestCase):
   user = 'atlas',
 )
 
-  def test_stop_default(self):
+  @patch('os.path.isdir')
+  def test_stop_default(self, is_dir_mock):
+is_dir_mock.return_value = True
+
 self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/metadata_server.py",
classname = "MetadataServer",
command = "stop",



ambari git commit: AMBARI-19023. After adding an Atlas server the first restart command fails since stop doesn't have any configs; if no pid dir exists during stop, perform no-op (alejandro)

2016-11-30 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 72b940e72 -> 15f843bbb


AMBARI-19023. After adding an Atlas server the first restart command fails 
since stop doesn't have any configs; if no pid dir exists during stop, perform 
no-op (alejandro)


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

Branch: refs/heads/trunk
Commit: 15f843bbb0679d93f836c0fa4a3b23370b1ae91c
Parents: 72b940e
Author: Alejandro Fernandez 
Authored: Tue Nov 29 17:10:16 2016 -0800
Committer: Alejandro Fernandez 
Committed: Wed Nov 30 13:48:07 2016 -0800

--
 .../0.1.0.2.3/package/scripts/metadata_server.py  | 18 ++
 .../stacks/2.3/ATLAS/test_metadata_server.py  |  5 -
 2 files changed, 22 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/15f843bb/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 a469ebb..36d990d 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
@@ -16,6 +16,10 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 
 """
+# Python Imports
+import os
+
+# Local Imports
 from metadata import metadata
 from resource_management import Fail
 from resource_management.libraries.functions import conf_select, stack_select
@@ -124,6 +128,20 @@ class MetadataServer(Script):
 env.set_params(params)
 daemon_cmd = format('source {params.conf_dir}/atlas-env.sh; 
{params.metadata_stop_script}')
 
+# If the pid dir doesn't exist, this means either
+# 1. The user just added Atlas service and issued a restart command 
(stop+start). So stop should be a no-op
+# since there's nothing to stop.
+# OR
+# 2. The user changed the value of the pid dir config and incorrectly 
issued a restart command.
+# In which case the stop command cannot do anything since Ambari doesn't 
know which process to kill.
+# The start command will spawn another instance.
+# The user should have issued a stop, changed the config, and then started 
it.
+if not os.path.isdir(params.pid_dir):
+  
Logger.info("***")
+  Logger.info("Will skip the stop command since this is the first time 
stopping/restarting Atlas "
+  "and the pid dir does not exist, %s\n" % params.pid_dir)
+  return
+
 try:
   Execute(daemon_cmd,
   user=params.metadata_user,

http://git-wip-us.apache.org/repos/asf/ambari/blob/15f843bb/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index 585dc94..f2fec70 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -366,7 +366,10 @@ class TestMetadataServer(RMFTestCase):
   user = 'atlas',
 )
 
-  def test_stop_default(self):
+  @patch('os.path.isdir')
+  def test_stop_default(self, is_dir_mock):
+is_dir_mock.return_value = True
+
 self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/metadata_server.py",
classname = "MetadataServer",
command = "stop",



ambari git commit: AMBARI-18600: Workflow Designer View: When logs are empty, you see the spinner, instead of a message (sangeetar)

2016-11-30 Thread sangeetar
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 037ed6326 -> 47d2f7074


AMBARI-18600: Workflow Designer View: When logs are empty, you see the spinner, 
instead of a message (sangeetar)


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

Branch: refs/heads/branch-2.5
Commit: 47d2f707499275a35269f7335182e5c8715d7f8b
Parents: 037ed63
Author: Sangeeta Ravindran 
Authored: Wed Nov 30 13:09:19 2016 -0800
Committer: Sangeeta Ravindran 
Committed: Wed Nov 30 13:09:35 2016 -0800

--
 .../wfmanager/src/main/resources/ui/app/components/job-details.js | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/47d2f707/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
index e403dc4..0e5fd36 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
@@ -349,6 +349,7 @@ export default Ember.Component.extend({
   url = url + '=action='+ params.logActionList;
 }
 Ember.$.get(url,function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.jobLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);
@@ -356,6 +357,7 @@ export default Ember.Component.extend({
   },
   getErrorLog : function (){
 
Ember.$.get(Ember.ENV.API_URL+'/v2/job/'+this.get('id')+'?show=errorlog',function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.errorLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);
@@ -363,6 +365,7 @@ export default Ember.Component.extend({
   },
   getAuditLog : function (){
 
Ember.$.get(Ember.ENV.API_URL+'/v2/job/'+this.get('id')+'?show=auditlog',function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.auditLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);



ambari git commit: AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger conf directory (Mugdha Varadkar via smohanty)

2016-11-30 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 4bfbf281c -> 72b940e72


AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger 
conf directory (Mugdha Varadkar via smohanty)


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

Branch: refs/heads/trunk
Commit: 72b940e725658599f055a1c1eaadaa2a9c65075b
Parents: 4bfbf28
Author: Sumit Mohanty 
Authored: Wed Nov 30 12:51:46 2016 -0800
Committer: Sumit Mohanty 
Committed: Wed Nov 30 12:52:22 2016 -0800

--
 .../RANGER/0.4.0/package/scripts/params.py  | 14 +
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 21 
 .../common-services/RANGER/0.6.0/metainfo.xml   |  2 ++
 3 files changed, 37 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/72b940e7/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 6debaf1..e27b363 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -385,3 +385,17 @@ if audit_solr_enabled and is_solrCloud_enabled:
   # Check external solrCloud
   if is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
 ranger_is_solr_kerberised = "true"
+
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
+is_hbase_ha_enabled = True if len(hbase_master_hosts) > 1 else False
+is_namenode_ha_enabled = True if len(namenode_hosts) > 1 else False
+ranger_hbase_plugin_enabled = False
+ranger_hdfs_plugin_enabled = False
+
+
+if is_hbase_ha_enabled:
+  if not 
is_empty(config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled']):
+ranger_hbase_plugin_enabled = 
config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower()
 == 'yes'
+if is_namenode_ha_enabled:
+  if not 
is_empty(config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled']):
+ranger_hdfs_plugin_enabled = 
config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower()
 == 'yes'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/72b940e7/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 316d207..8036f28 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -216,6 +216,27 @@ def setup_ranger_admin(upgrade_type=None):
 
   create_core_site_xml(ranger_conf)
 
+  if params.stack_supports_ranger_kerberos and params.security_enabled:
+if params.is_hbase_ha_enabled and params.ranger_hbase_plugin_enabled:
+  XmlConfig("hbase-site.xml",
+conf_dir=ranger_conf,
+configurations=params.config['configurations']['hbase-site'],
+
configuration_attributes=params.config['configuration_attributes']['hbase-site'],
+owner=params.unix_user,
+group=params.unix_group,
+mode=0644
+  )
+
+if params.is_namenode_ha_enabled and params.ranger_hdfs_plugin_enabled:
+  XmlConfig("hdfs-site.xml",
+conf_dir=ranger_conf,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.unix_user,
+group=params.unix_group,
+mode=0644
+  )
+
 def setup_ranger_db(stack_version=None):
   import params
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/72b940e7/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml
index f330bc9..12fde7e 100644
--- 

ambari git commit: AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger conf directory (Mugdha Varadkar via smohanty)

2016-11-30 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7632917d5 -> 037ed6326


AMBARI-18994. In HA cluster copy the hdfs-site.xml and hbase-site.xml to Ranger 
conf directory (Mugdha Varadkar via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 037ed63264c21d723bbba6b0acd3724f0eed687b
Parents: 7632917
Author: Sumit Mohanty 
Authored: Wed Nov 30 12:51:46 2016 -0800
Committer: Sumit Mohanty 
Committed: Wed Nov 30 12:51:46 2016 -0800

--
 .../RANGER/0.4.0/package/scripts/params.py  | 14 +
 .../0.4.0/package/scripts/setup_ranger_xml.py   | 21 
 .../common-services/RANGER/0.6.0/metainfo.xml   |  2 ++
 3 files changed, 37 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 6debaf1..e27b363 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -385,3 +385,17 @@ if audit_solr_enabled and is_solrCloud_enabled:
   # Check external solrCloud
   if is_external_solrCloud_enabled and is_external_solrCloud_kerberos:
 ranger_is_solr_kerberised = "true"
+
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
+is_hbase_ha_enabled = True if len(hbase_master_hosts) > 1 else False
+is_namenode_ha_enabled = True if len(namenode_hosts) > 1 else False
+ranger_hbase_plugin_enabled = False
+ranger_hdfs_plugin_enabled = False
+
+
+if is_hbase_ha_enabled:
+  if not 
is_empty(config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled']):
+ranger_hbase_plugin_enabled = 
config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower()
 == 'yes'
+if is_namenode_ha_enabled:
+  if not 
is_empty(config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled']):
+ranger_hdfs_plugin_enabled = 
config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower()
 == 'yes'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index f1b4797..6386778 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -198,6 +198,27 @@ def setup_ranger_admin(upgrade_type=None):
 
   create_core_site_xml(ranger_conf)
 
+  if params.stack_supports_ranger_kerberos and params.security_enabled:
+if params.is_hbase_ha_enabled and params.ranger_hbase_plugin_enabled:
+  XmlConfig("hbase-site.xml",
+conf_dir=ranger_conf,
+configurations=params.config['configurations']['hbase-site'],
+
configuration_attributes=params.config['configuration_attributes']['hbase-site'],
+owner=params.unix_user,
+group=params.unix_group,
+mode=0644
+  )
+
+if params.is_namenode_ha_enabled and params.ranger_hdfs_plugin_enabled:
+  XmlConfig("hdfs-site.xml",
+conf_dir=ranger_conf,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.unix_user,
+group=params.unix_group,
+mode=0644
+  )
+
 def setup_ranger_db(stack_version=None):
   import params
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/037ed632/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/RANGER/0.6.0/metainfo.xml
index f330bc9..12fde7e 100644
--- 

ambari git commit: Revert "AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via ncole)"

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 1632f9b5c -> 7632917d5


Revert "AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le 
via ncole)"

This reverts commit 1632f9b5c6f7822c1fe59c4532250b47ae902513.


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

Branch: refs/heads/branch-2.5
Commit: 7632917d5c7dc24e2025358e176a53ff1b6fe430
Parents: 1632f9b
Author: Nate Cole 
Authored: Wed Nov 30 14:53:18 2016 -0500
Committer: Nate Cole 
Committed: Wed Nov 30 14:53:18 2016 -0500

--
 .../stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml | 13 -
 1 file changed, 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7632917d/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
index 9b9477e..de8ebd9 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
@@ -21,19 +21,6 @@
 
   ZOOKEEPER
   3.4.6.2.5
-  
-
-  ubuntu14,ubuntu16
-  
-
-  zookeeper-${stack_version}
-
-
-  zookeeper-${stack_version}-server
-
-  
-
-  
 
   
 



ambari git commit: Revert "AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via ncole)"

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk 0afdf6512 -> 4bfbf281c


Revert "AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le 
via ncole)"

This reverts commit 3a14b4afc9572b9aeb0310cdc0cd80700f27ee8d.


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

Branch: refs/heads/trunk
Commit: 4bfbf281ce17eacc2243962191dfb41c38c962b3
Parents: 0afdf65
Author: Nate Cole 
Authored: Wed Nov 30 14:52:23 2016 -0500
Committer: Nate Cole 
Committed: Wed Nov 30 14:52:48 2016 -0500

--
 .../stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml | 13 -
 1 file changed, 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4bfbf281/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
index 9b9477e..de8ebd9 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
@@ -21,19 +21,6 @@
 
   ZOOKEEPER
   3.4.6.2.5
-  
-
-  ubuntu14,ubuntu16
-  
-
-  zookeeper-${stack_version}
-
-
-  zookeeper-${stack_version}-server
-
-  
-
-  
 
   
 



ambari git commit: AMBARI-18600: Workflow Designer View: When logs are empty, you see the spinner, instead of a message (sangeetar)

2016-11-30 Thread sangeetar
Repository: ambari
Updated Branches:
  refs/heads/trunk 3a14b4afc -> 0afdf6512


AMBARI-18600: Workflow Designer View: When logs are empty, you see the spinner, 
instead of a message (sangeetar)


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

Branch: refs/heads/trunk
Commit: 0afdf6512b914b01417d0fecd2fba334e8dc0195
Parents: 3a14b4a
Author: Sangeeta Ravindran 
Authored: Wed Nov 30 11:16:31 2016 -0800
Committer: Sangeeta Ravindran 
Committed: Wed Nov 30 11:16:31 2016 -0800

--
 .../wfmanager/src/main/resources/ui/app/components/job-details.js | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0afdf651/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
index e403dc4..0e5fd36 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js
@@ -349,6 +349,7 @@ export default Ember.Component.extend({
   url = url + '=action='+ params.logActionList;
 }
 Ember.$.get(url,function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.jobLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);
@@ -356,6 +357,7 @@ export default Ember.Component.extend({
   },
   getErrorLog : function (){
 
Ember.$.get(Ember.ENV.API_URL+'/v2/job/'+this.get('id')+'?show=errorlog',function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.errorLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);
@@ -363,6 +365,7 @@ export default Ember.Component.extend({
   },
   getAuditLog : function (){
 
Ember.$.get(Ember.ENV.API_URL+'/v2/job/'+this.get('id')+'?show=auditlog',function(response){
+  response = response.trim().length > 0 ? response : "No messages 
present";
   this.set('model.auditLog', response);
 }.bind(this)).fail(function(error){
   this.set('error', error);



ambari git commit: AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via ncole)

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ef4183771 -> 1632f9b5c


AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via 
ncole)


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

Branch: refs/heads/branch-2.5
Commit: 1632f9b5c6f7822c1fe59c4532250b47ae902513
Parents: ef41837
Author: Nate Cole 
Authored: Wed Nov 30 12:49:48 2016 -0500
Committer: Nate Cole 
Committed: Wed Nov 30 14:08:39 2016 -0500

--
 .../stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1632f9b5/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
index de8ebd9..9b9477e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
@@ -21,6 +21,19 @@
 
   ZOOKEEPER
   3.4.6.2.5
+  
+
+  ubuntu14,ubuntu16
+  
+
+  zookeeper-${stack_version}
+
+
+  zookeeper-${stack_version}-server
+
+  
+
+  
 
   
 



ambari git commit: AMBARI-12697 Rolling upgrade: Ambari UI should be able to display rolling upgrade history (dili via atkach)

2016-11-30 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 502cffba1 -> ef4183771


AMBARI-12697 Rolling upgrade: Ambari UI should be able to display rolling 
upgrade history (dili via atkach)


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

Branch: refs/heads/branch-2.5
Commit: ef41837712fee03772aca344b2edc337396974a0
Parents: 502cffb
Author: Andrii Tkach 
Authored: Wed Nov 30 20:32:16 2016 +0200
Committer: Andrii Tkach 
Committed: Wed Nov 30 20:32:16 2016 +0200

--
 ambari-web/app/assets/test/tests.js |   5 +
 ambari-web/app/controllers.js   |   1 +
 .../admin/stack_upgrade_history_controller.js   | 217 +++
 ambari-web/app/mappers.js   |   3 +-
 .../app/mappers/stack_upgrade_history_mapper.js |  54 +++
 ambari-web/app/messages.js  |  28 ++
 ambari-web/app/models.js|   2 +
 .../app/models/finished_upgrade_entity.js   |  92 +
 .../stack_version/stack_upgrade_history.js  |  37 ++
 ambari-web/app/routes/main.js   |   7 +
 ambari-web/app/styles/stack_versions.less   |  69 
 .../admin/stack_upgrade/upgrade_history.hbs | 105 ++
 .../stack_upgrade/upgrade_history_details.hbs   |  46 +++
 ambari-web/app/views.js |   2 +
 .../views/main/admin/stack_upgrade/menu_view.js |   6 +
 .../upgrade_history_details_view.js |  85 +
 .../admin/stack_upgrade/upgrade_history_view.js | 303 +++
 .../stack_upgrade_history_controller_test.js| 125 +++
 .../stack_upgrade_history_mapper_test.js| 372 +++
 .../test/models/finished_upgrade_entity_test.js | 197 ++
 .../upgrade_history_details_view_test.js| 248 +
 .../stack_upgrade/upgrade_history_view_test.js  | 173 +
 22 files changed, 2176 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef418377/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 8571fc4..7440819 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -70,6 +70,7 @@ var files = [
   'test/controllers/main/admin/kerberos/step8_controller_test',
 
   'test/controllers/main/admin/stack_and_upgrade_controller_test',
+  'test/controllers/main/admin/stack_upgrade_history_controller_test',
   'test/controllers/main/admin/serviceAccounts_controller_test',
   'test/controllers/main/admin/highAvailability_controller_test',
   'test/controllers/main/admin/highAvailability/progress_controller_test',
@@ -145,6 +146,7 @@ var files = [
   'test/mappers/users_mapper_test',
   'test/mappers/stack_mapper_test',
   'test/mappers/stack_service_mapper_test',
+  'test/mappers/stack_upgrade_history_mapper_test',
   'test/mappers/repository_version_mapper_test',
   'test/mappers/configs/config_groups_mapper_test',
   'test/mappers/configs/service_config_version_mapper_test',
@@ -251,6 +253,8 @@ var files = [
   'test/views/main/admin/stack_upgrade/upgrade_group_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_task_view_test',
   'test/views/main/admin/stack_upgrade/upgrade_wizard_view_test',
+  'test/views/main/admin/stack_upgrade/upgrade_history_view_test',
+  'test/views/main/admin/stack_upgrade/upgrade_history_details_view_test',
   'test/views/main/admin/stack_upgrade/version_view_test',
   'test/views/main/admin/stack_upgrade/services_view_test',
   'test/views/main/admin/stack_upgrade/menu_view_test',
@@ -384,6 +388,7 @@ var files = [
   'test/models/widget_property_test',
   'test/models/host_stack_version_test',
   'test/models/upgrade_entity_test',
+  'test/models/finished_upgrade_entity_test',
   'test/models/configs/sub_section_test',
   'test/models/configs/section_test',
   'test/models/configs/service_config_version_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef418377/ambari-web/app/controllers.js
--
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index 5664029..81e5eb7 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -85,6 +85,7 @@ 
require('controllers/main/admin/highAvailability/journalNode/step6_controller');
 
require('controllers/main/admin/highAvailability/journalNode/step7_controller');
 
require('controllers/main/admin/highAvailability/journalNode/step8_controller');
 

ambari git commit: AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via ncole)

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk fff998099 -> 3a14b4afc


AMBARI-19020. Ubuntu14/16 Add Support for Zookeeper on HDP 2.5 (Duc Le via 
ncole)


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

Branch: refs/heads/trunk
Commit: 3a14b4afc9572b9aeb0310cdc0cd80700f27ee8d
Parents: fff9980
Author: Nate Cole 
Authored: Wed Nov 30 12:49:48 2016 -0500
Committer: Nate Cole 
Committed: Wed Nov 30 12:53:00 2016 -0500

--
 .../stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a14b4af/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
index de8ebd9..9b9477e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZOOKEEPER/metainfo.xml
@@ -21,6 +21,19 @@
 
   ZOOKEEPER
   3.4.6.2.5
+  
+
+  ubuntu14,ubuntu16
+  
+
+  zookeeper-${stack_version}
+
+
+  zookeeper-${stack_version}-server
+
+  
+
+  
 
   
 



ambari git commit: AMBARI-18987 A general preupgrade check on if services cannot be upgrade are installed (dili)

2016-11-30 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 841a064d4 -> 502cffba1


AMBARI-18987 A general preupgrade check on if services cannot be upgrade are 
installed (dili)


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

Branch: refs/heads/branch-2.5
Commit: 502cffba182f33f8e5d98cc986d90b6d3b4c602a
Parents: 841a064
Author: Di Li 
Authored: Wed Nov 30 12:49:03 2016 -0500
Committer: Di Li 
Committed: Wed Nov 30 13:04:59 2016 -0500

--
 .../server/checks/ServicePresenceCheck.java | 55 +---
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |  5 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |  5 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml |  5 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |  5 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml |  5 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |  5 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml |  5 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml |  5 +-
 9 files changed, 57 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/502cffba/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
index 0f4eeb1..4642b88 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
@@ -19,7 +19,6 @@ package org.apache.ambari.server.checks;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -47,7 +46,7 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
 
   private static final Logger LOG = 
LoggerFactory.getLogger(ServicePresenceCheck.class);
 
-  static final String KEY_SERVICE_REMOVED = "servcie_removed";
+  static final String KEY_SERVICE_REMOVED = "service_removed";
   /*
* List of services that do not support upgrade
* services must be removed before the stack upgrade
@@ -77,28 +76,26 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
 Map removedServices = getRemovedServices(request);
 List failReasons = new ArrayList<>();
 
-if(null != noUpgradeSupportServices && 
!noUpgradeSupportServices.isEmpty()){
-  String reason = getFailReason(prerequisiteCheck, request);
-  for(String service: noUpgradeSupportServices){
-if (installedServices.contains(service.toUpperCase())){
-  prerequisiteCheck.getFailedOn().add(service);
-  String msg = String.format(reason, service, service);
-  failReasons.add(msg);
-}
+String reason = getFailReason(prerequisiteCheck, request);
+for(String service: noUpgradeSupportServices){
+  if (installedServices.contains(service.toUpperCase())){
+prerequisiteCheck.getFailedOn().add(service);
+String msg = String.format(reason, service, service);
+failReasons.add(msg);
   }
 }
-if(null != removedServices){
-  String reason = getFailReason(KEY_SERVICE_REMOVED, prerequisiteCheck, 
request);
-  for (Map.Entry entry : removedServices.entrySet()) {
-String removedService = entry.getKey();
-if(installedServices.contains(removedService.toUpperCase())){
-  prerequisiteCheck.getFailedOn().add(removedService);
-  String newService = entry.getValue();
-  String msg = String.format(reason, removedService, newService);
-  failReasons.add(msg);
-}
+
+reason = getFailReason(KEY_SERVICE_REMOVED, prerequisiteCheck, request);
+for (Map.Entry entry : removedServices.entrySet()) {
+  String removedService = entry.getKey();
+  if(installedServices.contains(removedService.toUpperCase())){
+prerequisiteCheck.getFailedOn().add(removedService);
+String newService = entry.getValue();
+String msg = String.format(reason, removedService, newService);
+failReasons.add(msg);
   }
 }
+
 if(!failReasons.isEmpty()){
   prerequisiteCheck.setStatus(PrereqCheckStatus.FAIL);
   prerequisiteCheck.setFailReason(StringUtils.join(failReasons, '\n'));
@@ -126,52 +123,50 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
* @return 

ambari git commit: AMBARI-18987 A general preupgrade check on if services cannot be upgrade are installed (dili)

2016-11-30 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/trunk 10878592c -> fff998099


AMBARI-18987 A general preupgrade check on if services cannot be upgrade are 
installed (dili)


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

Branch: refs/heads/trunk
Commit: fff9980992ffcb40e643a4235a7cc36899f1fa5a
Parents: 1087859
Author: Di Li 
Authored: Wed Nov 30 12:49:03 2016 -0500
Committer: Di Li 
Committed: Wed Nov 30 12:49:03 2016 -0500

--
 .../server/checks/ServicePresenceCheck.java | 55 +---
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |  5 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |  5 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml |  5 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |  5 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml |  5 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |  5 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml |  5 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml |  5 +-
 9 files changed, 57 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fff99809/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
index 0f4eeb1..4642b88 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicePresenceCheck.java
@@ -19,7 +19,6 @@ package org.apache.ambari.server.checks;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -47,7 +46,7 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
 
   private static final Logger LOG = 
LoggerFactory.getLogger(ServicePresenceCheck.class);
 
-  static final String KEY_SERVICE_REMOVED = "servcie_removed";
+  static final String KEY_SERVICE_REMOVED = "service_removed";
   /*
* List of services that do not support upgrade
* services must be removed before the stack upgrade
@@ -77,28 +76,26 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
 Map removedServices = getRemovedServices(request);
 List failReasons = new ArrayList<>();
 
-if(null != noUpgradeSupportServices && 
!noUpgradeSupportServices.isEmpty()){
-  String reason = getFailReason(prerequisiteCheck, request);
-  for(String service: noUpgradeSupportServices){
-if (installedServices.contains(service.toUpperCase())){
-  prerequisiteCheck.getFailedOn().add(service);
-  String msg = String.format(reason, service, service);
-  failReasons.add(msg);
-}
+String reason = getFailReason(prerequisiteCheck, request);
+for(String service: noUpgradeSupportServices){
+  if (installedServices.contains(service.toUpperCase())){
+prerequisiteCheck.getFailedOn().add(service);
+String msg = String.format(reason, service, service);
+failReasons.add(msg);
   }
 }
-if(null != removedServices){
-  String reason = getFailReason(KEY_SERVICE_REMOVED, prerequisiteCheck, 
request);
-  for (Map.Entry entry : removedServices.entrySet()) {
-String removedService = entry.getKey();
-if(installedServices.contains(removedService.toUpperCase())){
-  prerequisiteCheck.getFailedOn().add(removedService);
-  String newService = entry.getValue();
-  String msg = String.format(reason, removedService, newService);
-  failReasons.add(msg);
-}
+
+reason = getFailReason(KEY_SERVICE_REMOVED, prerequisiteCheck, request);
+for (Map.Entry entry : removedServices.entrySet()) {
+  String removedService = entry.getKey();
+  if(installedServices.contains(removedService.toUpperCase())){
+prerequisiteCheck.getFailedOn().add(removedService);
+String newService = entry.getValue();
+String msg = String.format(reason, removedService, newService);
+failReasons.add(msg);
   }
 }
+
 if(!failReasons.isEmpty()){
   prerequisiteCheck.setStatus(PrereqCheckStatus.FAIL);
   prerequisiteCheck.setFailReason(StringUtils.join(failReasons, '\n'));
@@ -126,52 +123,50 @@ public class ServicePresenceCheck extends 
AbstractCheckDescriptor{
* @return service 

ambari git commit: AMBARI-18962:Make check_package_condition in script.py overridable by services in stacks (dili)

2016-11-30 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 eec985b16 -> 841a064d4


AMBARI-18962:Make check_package_condition in script.py overridable by services 
in stacks (dili)


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

Branch: refs/heads/branch-2.5
Commit: 841a064d47410184e8bc5101660aa957ac78e268
Parents: eec985b
Author: Di Li 
Authored: Wed Nov 30 11:13:19 2016 -0500
Committer: Di Li 
Committed: Wed Nov 30 11:22:15 2016 -0500

--
 .../resource_management/libraries/script/script.py   | 15 +--
 .../custom_actions/scripts/install_packages.py   |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/841a064d/ambari-common/src/main/python/resource_management/libraries/script/script.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 99970ca..5375a53 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -555,7 +555,7 @@ class Script(object):
   if isinstance(package_list_str, basestring) and len(package_list_str) > 
0:
 package_list = json.loads(package_list_str)
 for package in package_list:
-  if Script.check_package_condition(package):
+  if self.check_package_condition(package):
 name = self.format_package_name(package['name'])
 # HACK: On Windows, only install ambari-metrics packages using 
Choco Package Installer
 # TODO: Update this once choco packages for hadoop are created. 
This is because, service metainfo.xml support
@@ -579,22 +579,25 @@ class Script(object):
   str(config['hostLevelParams']['stack_version']))
   reload_windows_env()
   
-  @staticmethod
-  def check_package_condition(package):
-from resource_management.libraries.functions import package_conditions
+  def check_package_condition(self, package):
 condition = package['condition']
-name = package['name']
 
 if not condition:
   return True
 
+return self.should_install_package(package)
+
+  def should_install_package(self, package):
+from resource_management.libraries.functions import package_conditions
+condition = package['condition']
 try:
   chooser_method = getattr(package_conditions, condition)
 except AttributeError:
+  name = package['name']
   raise Fail("Condition with name '{0}', when installing package {1}. 
Please check package_conditions.py.".format(condition, name))
 
 return chooser_method()
-  
+
   @staticmethod
   def matches_any_regexp(string, regexp_list):
 for regex in regexp_list:

http://git-wip-us.apache.org/repos/asf/ambari/blob/841a064d/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index 0e31310..112abe3 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -460,7 +460,7 @@ class InstallPackages(Script):
 """
 filtered_package_list = []
 for package in package_list:
-  if Script.check_package_condition(package):
+  if self.check_package_condition(package):
 filtered_package_list.append(package)
 return filtered_package_list
 



ambari git commit: AMBARI-18962:Make check_package_condition in script.py overridable by services in stacks (dili)

2016-11-30 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/trunk 9559a1626 -> 10878592c


AMBARI-18962:Make check_package_condition in script.py overridable by services 
in stacks (dili)


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

Branch: refs/heads/trunk
Commit: 10878592c2e2f5ac0412be8085c634d471f7358f
Parents: 9559a16
Author: Di Li 
Authored: Wed Nov 30 11:13:19 2016 -0500
Committer: Di Li 
Committed: Wed Nov 30 11:13:19 2016 -0500

--
 .../resource_management/libraries/script/script.py   | 15 +--
 .../custom_actions/scripts/install_packages.py   |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/10878592/ambari-common/src/main/python/resource_management/libraries/script/script.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index f8df842..584775e 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -580,7 +580,7 @@ class Script(object):
   if isinstance(package_list_str, basestring) and len(package_list_str) > 
0:
 package_list = json.loads(package_list_str)
 for package in package_list:
-  if Script.check_package_condition(package):
+  if self.check_package_condition(package):
 name = self.format_package_name(package['name'])
 # HACK: On Windows, only install ambari-metrics packages using 
Choco Package Installer
 # TODO: Update this once choco packages for hadoop are created. 
This is because, service metainfo.xml support
@@ -604,22 +604,25 @@ class Script(object):
   str(config['hostLevelParams']['stack_version']))
   reload_windows_env()
   
-  @staticmethod
-  def check_package_condition(package):
-from resource_management.libraries.functions import package_conditions
+  def check_package_condition(self, package):
 condition = package['condition']
-name = package['name']
 
 if not condition:
   return True
 
+return self.should_install_package(package)
+
+  def should_install_package(self, package):
+from resource_management.libraries.functions import package_conditions
+condition = package['condition']
 try:
   chooser_method = getattr(package_conditions, condition)
 except AttributeError:
+  name = package['name']
   raise Fail("Condition with name '{0}', when installing package {1}. 
Please check package_conditions.py.".format(condition, name))
 
 return chooser_method()
-  
+
   @staticmethod
   def matches_any_regexp(string, regexp_list):
 for regex in regexp_list:

http://git-wip-us.apache.org/repos/asf/ambari/blob/10878592/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index 0e31310..112abe3 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -460,7 +460,7 @@ class InstallPackages(Script):
 """
 filtered_package_list = []
 for package in package_list:
-  if Script.check_package_condition(package):
+  if self.check_package_condition(package):
 filtered_package_list.append(package)
 return filtered_package_list
 



[7/8] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-11-30 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 1f804d1392fc076542b9905766108d658258bcb4
Parents: 936626b ece1de3
Author: Jonathan Hurley 
Authored: Mon Nov 28 08:37:22 2016 -0500
Committer: Jonathan Hurley 
Committed: Mon Nov 28 08:37:22 2016 -0500

--
 ambari-agent/conf/unix/agent-multiplier.py  |   14 +-
 .../ambari_agent/CustomServiceOrchestrator.py   |   17 +-
 .../TestCustomServiceOrchestrator.py|   25 +-
 .../ambari-metrics/datasource.js|6 +-
 ambari-server/pom.xml   |2 +
 ambari-server/sbin/ambari-server|6 +-
 .../server/actionmanager/ActionScheduler.java   |2 +-
 .../checks/DatabaseConsistencyCheckHelper.java  |   10 +-
 .../server/configuration/Configuration.java |   23 +-
 .../ambari/server/events/AmbariEvent.java   |5 +
 .../events/ClusterConfigFinishedEvent.java  |   53 +
 .../AmbariLdapAuthenticationProvider.java   |   23 +-
 .../AmbariLdapBindAuthenticator.java|  233 +-
 .../apache/ambari/server/stack/StackModule.java |  101 +-
 .../ambari/server/state/stack/UpgradePack.java  |   12 +-
 .../ambari/server/topology/TopologyManager.java |   16 +-
 .../ambari/server/view/ViewExtractor.java   |2 +-
 .../apache/ambari/server/view/ViewRegistry.java |  381 +--
 ambari-server/src/main/python/ambari-server.py  |  137 +-
 .../python/ambari_server/serverConfiguration.py |9 +-
 .../main/python/ambari_server/setupActions.py   |1 +
 .../main/python/ambari_server/setupMpacks.py|  167 +-
 .../0.1.0/configuration/storm-site.xml  |   84 -
 .../AMBARI_METRICS/0.1.0/metainfo.xml   |4 -
 .../FLUME/1.4.0.2.0/metrics.json|   62 -
 .../HIVE/0.12.0.2.0/package/scripts/hive.py |  497 ++--
 .../package/scripts/hive_server_interactive.py  |4 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |1 +
 .../0.4.0/package/scripts/setup_ranger_xml.py   |   18 +
 .../0.4.0/package/templates/ranger_admin_pam.j2 |   22 +
 .../package/templates/ranger_remote_pam.j2  |   22 +
 .../0.5.0/configuration/ranger-admin-site.xml   |2 +-
 .../STORM/1.0.1/configuration/storm-site.xml|   54 +
 .../src/main/resources/scripts/stack_advisor.py |   11 +-
 .../HDP/2.0.6/configuration/cluster-env.xml |   10 -
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |   50 +-
 .../stacks/HDP/2.1/services/stack_advisor.py|   20 +-
 .../stacks/HDP/2.2/services/stack_advisor.py|7 -
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 1042 ---
 .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 1050 ---
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml |4 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |4 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml |4 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml |4 +-
 .../HIVE/configuration/hive-interactive-env.xml |   10 +
 .../HIVE/configuration/hivemetastore-site.xml   |8 +
 .../hiveserver2-interactive-site.xml|8 +
 .../HIVE/configuration/hiveserver2-site.xml |8 +
 .../stacks/HDP/2.5/services/stack_advisor.py|   52 +-
 .../services/ATLAS/themes/theme_version_2.json  |   28 +-
 .../stacks/HDP/2.6/services/stack_advisor.py|2 +-
 .../PERF/1.0/configuration/cluster-env.xml  |6 +-
 .../GRUMPY/configuration/grumpy-site.xml|2 +-
 .../services/HAPPY/configuration/happy-site.xml |2 +-
 .../services/HBASE/configuration/hbase-env.xml  |   30 +-
 .../HBASE/configuration/hbase-log4j.xml |2 +-
 .../configuration/hbase-logsearch-conf.xml  |6 +-
 .../HBASE/configuration/hbase-policy.xml|6 +-
 .../services/HBASE/configuration/hbase-site.xml |   74 +-
 .../services/HDFS/configuration/core-site.xml   |   32 +-
 .../services/HDFS/configuration/hadoop-env.xml  |   44 +-
 .../hadoop-metrics2.properties.xml  |2 +-
 .../HDFS/configuration/hadoop-policy.xml|   22 +-
 .../services/HDFS/configuration/hdfs-log4j.xml  |2 +-
 .../HDFS/configuration/hdfs-logsearch-conf.xml  |6 +-
 .../services/HDFS/configuration/hdfs-site.xml   |  108 +-
 .../services/HDFS/configuration/ssl-client.xml  |   14 +-
 .../services/HDFS/configuration/ssl-server.xml  |   16 +-
 .../SLEEPY/configuration/sleepy-site.xml|2 +-
 .../services/SNOW/configuration/snow-site.xml   |2 +-
 .../YARN/configuration-mapred/mapred-env.xml|2 +-
 .../YARN/configuration-mapred/mapred-site.xml   |   28 +-
 .../services/YARN/configuration/yarn-env.xml|8 

[5/8] ambari git commit: AMBARI-18933 - Remove Unnecessary Locks Inside Of ConfigGroup Business Object Implementations (jonathanhurley)

2016-11-30 Thread jonathanhurley
AMBARI-18933 - Remove Unnecessary Locks Inside Of ConfigGroup Business Object 
Implementations (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: ab1c1001688b333817ac20ec5c20b635f566c353
Parents: 0a0e9a5
Author: Jonathan Hurley 
Authored: Fri Nov 18 12:48:52 2016 -0500
Committer: Jonathan Hurley 
Committed: Fri Nov 18 18:36:41 2016 -0500

--
 .../internal/ConfigGroupResourceProvider.java   |  49 +-
 .../apache/ambari/server/state/ConfigImpl.java  |  14 +-
 .../server/state/cluster/ClusterImpl.java   |   6 +-
 .../server/state/configgroup/ConfigGroup.java   |  33 +-
 .../state/configgroup/ConfigGroupFactory.java   |  34 +-
 .../state/configgroup/ConfigGroupImpl.java  | 583 +--
 .../ambari/server/topology/AmbariContext.java   |   2 -
 .../AmbariManagementControllerTest.java |   2 -
 .../ambari/server/state/ConfigGroupTest.java|  18 +-
 .../ambari/server/state/ConfigHelperTest.java   |   1 -
 .../server/state/cluster/ClusterTest.java   |   7 -
 .../svccomphost/ServiceComponentHostTest.java   |   3 -
 .../server/topology/AmbariContextTest.java  |   1 -
 13 files changed, 342 insertions(+), 411 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab1c1001/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index b957f0a..2373068 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -17,7 +17,16 @@
  */
 package org.apache.ambari.server.controller.internal;
 
-import com.google.inject.Inject;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ClusterNotFoundException;
 import org.apache.ambari.server.ConfigGroupNotFoundException;
@@ -49,7 +58,6 @@ import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigFactory;
-import org.apache.ambari.server.state.ConfigImpl;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.configgroup.ConfigGroup;
 import org.apache.ambari.server.state.configgroup.ConfigGroupFactory;
@@ -57,15 +65,7 @@ import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import com.google.inject.Inject;
 
 @StaticallyInject
 public class ConfigGroupResourceProvider extends
@@ -101,7 +101,7 @@ public class ConfigGroupResourceProvider extends
 
   @Inject
   private static HostDAO hostDAO;
-  
+
   /**
* Used for creating {@link Config} instances to return in the REST response.
*/
@@ -575,22 +575,19 @@ public class ConfigGroupResourceProvider extends
 }
   }
 
+  configLogger.info("User {} is creating new configuration group {} for 
tag {} in cluster {}",
+  getManagementController().getAuthName(), request.getGroupName(), 
request.getTag(),
+  cluster.getClusterName());
+
   ConfigGroup configGroup = configGroupFactory.createNew(cluster,
 request.getGroupName(),
 request.getTag(), request.getDescription(),
 request.getConfigs(), hosts);
 
-  verifyConfigs(configGroup.getConfigurations(), cluster.getClusterName());
   configGroup.setServiceName(serviceName);
 
-  // Persist before add, since id is auto-generated
-  configLogger.info("Persisting new Config group"
-+ ", clusterName = " + cluster.getClusterName()
-+ ", name = " + configGroup.getName()
-+ ", tag = " + configGroup.getTag()
-+ ", user = " + 

[2/8] ambari git commit: AMBARI-18906 - Remove Unnecessary Locks Inside Of Config Business Object Implementations (jonathanhurley)

2016-11-30 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/a6639a7c/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 0fdaa46..098efa9 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -122,7 +122,6 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigFactory;
 import org.apache.ambari.server.state.ConfigHelper;
-import org.apache.ambari.server.state.ConfigImpl;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.HostComponentAdminState;
 import org.apache.ambari.server.state.HostState;
@@ -1933,10 +1932,8 @@ public class AmbariManagementControllerTest {
 Map properties = new HashMap();
 Map> propertiesAttributes = new 
HashMap>();
 
-Config c1 = new ConfigImpl(cluster, "hdfs-site", properties, 
propertiesAttributes, injector);
-c1.setTag("v1");
-cluster.addConfig(c1);
-c1.persist();
+ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
+Config c1 = configFactory.createNew(cluster, "hdfs-site", "v1",  
properties, propertiesAttributes);
 configs.put(c1.getType(), c1);
 
 ServiceRequest r = new ServiceRequest(cluster1, serviceName, 
State.INSTALLED.toString());
@@ -1976,26 +1973,17 @@ public class AmbariManagementControllerTest {
 properties.put("a", "a1");
 properties.put("b", "b1");
 
-Config c1 = new ConfigImpl(cluster, "hdfs-site", properties, 
propertiesAttributes, injector);
+ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
+Config c1 = configFactory.createNew(cluster, "hdfs-site", "v1", 
properties, propertiesAttributes);
 properties.put("c", cluster1);
 properties.put("d", "d1");
-Config c2 = new ConfigImpl(cluster, "core-site", properties, 
propertiesAttributes, injector);
-Config c3 = new ConfigImpl(cluster, "foo-site", properties, 
propertiesAttributes, injector);
+
+Config c2 = configFactory.createNew(cluster, "core-site", "v1", 
properties, propertiesAttributes);
+Config c3 = configFactory.createNew(cluster, "foo-site", "v1", properties, 
propertiesAttributes);
 
 Map mapRequestProps = new HashMap();
 mapRequestProps.put("context", "Called from a test");
 
-c1.setTag("v1");
-c2.setTag("v1");
-c3.setTag("v1");
-
-cluster.addConfig(c1);
-cluster.addConfig(c2);
-cluster.addConfig(c3);
-c1.persist();
-c2.persist();
-c3.persist();
-
 configs.put(c1.getType(), c1);
 configs.put(c2.getType(), c2);
 
@@ -4203,27 +4191,20 @@ public class AmbariManagementControllerTest {
 cluster.setCurrentStackVersion(new StackId("HDP-2.0.6"));
 
 ConfigFactory cf = injector.getInstance(ConfigFactory.class);
-Config config1 = cf.createNew(cluster, "global",
+Config config1 = cf.createNew(cluster, "global", "version1",
 new HashMap() {{
   put("key1", "value1");
 }}, new HashMap>());
-config1.setTag("version1");
 
-Config config2 = cf.createNew(cluster, "core-site",
+Config config2 = cf.createNew(cluster, "core-site", "version1",
 new HashMap() {{
   put("key1", "value1");
 }}, new HashMap>());
-config2.setTag("version1");
 
-Config config3 = cf.createNew(cluster, "yarn-site",
+Config config3 = cf.createNew(cluster, "yarn-site", "version1",
 new HashMap() {{
   put("test.password", "supersecret");
 }}, new HashMap>());
-config3.setTag("version1");
-
-cluster.addConfig(config1);
-cluster.addConfig(config2);
-cluster.addConfig(config3);
 
 Service hdfs = cluster.addService("HDFS");
 Service mapred = cluster.addService("YARN");
@@ -4376,20 +4357,15 @@ public class AmbariManagementControllerTest {
 cluster.setCurrentStackVersion(new StackId("HDP-2.0.7"));
 
 ConfigFactory cf = injector.getInstance(ConfigFactory.class);
-Config config1 = cf.createNew(cluster, "global",
+Config config1 = cf.createNew(cluster, "global", "version1",
   new HashMap() {{
 put("key1", "value1");
   }}, new HashMap>());
-config1.setTag("version1");
 
-Config config2 = cf.createNew(cluster, 

[4/8] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-11-30 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 0a0e9a5005ef1c410938f6059c0d8f9cb0a16ba5
Parents: a6639a7 2c884ab
Author: Jonathan Hurley 
Authored: Thu Nov 17 11:26:54 2016 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 17 11:26:54 2016 -0500

--
 .../main/resources/ui/admin-web/app/index.html  |1 +
 .../controllers/groups/GroupsEditCtrl.js|5 +-
 .../controllers/groups/GroupsListCtrl.js|   18 +-
 .../scripts/controllers/users/UsersShowCtrl.js  |8 +-
 .../ui/admin-web/app/scripts/i18n.config.js |1 +
 .../ui/admin-web/app/scripts/services/Group.js  |   33 +-
 .../app/scripts/services/GroupConstants.js  |   38 +
 .../app/scripts/services/UserConstants.js   |4 +
 .../ui/admin-web/app/views/groups/edit.html |8 +-
 .../ui/admin-web/app/views/groups/list.html |2 +-
 .../ui/admin-web/app/views/users/show.html  |8 +-
 ambari-agent/conf/unix/ambari-agent.ini |3 +
 ambari-agent/conf/windows/ambari-agent.ini  |2 +
 .../src/main/python/ambari_agent/Controller.py  |8 +-
 .../ambari_agent/CustomServiceOrchestrator.py   |3 +-
 .../src/main/python/ambari_agent/FileCache.py   |   10 +
 .../src/main/python/ambari_agent/HostCleanup.py |   87 +-
 .../src/main/python/ambari_agent/NetUtil.py |   10 +-
 .../TestCustomServiceOrchestrator.py|   11 +-
 .../test/python/ambari_agent/TestFileCache.py   |   12 +
 .../test/python/ambari_agent/TestHostCleanup.py |   18 +-
 .../libraries/functions/constants.py|1 +
 .../ambari-logsearch-assembly/pom.xml   |2 +
 .../src/main/resources/solr | 1464 +
 .../ambari-logsearch-portal/pom.xml |6 +
 .../org/apache/ambari/logsearch/LogSearch.java  |   14 +-
 .../ambari/logsearch/conf/AuthPropsConfig.java  |   62 +
 .../ambari/logsearch/conf/SecurityConfig.java   |   56 +-
 .../web/filters/LogsearchJWTFilter.java |  181 +++
 ...LogsearchSecurityContextFormationFilter.java |3 +-
 ...rchUsernamePasswordAuthenticationFilter.java |1 -
 .../web/model/JWTAuthenticationToken.java   |   53 +
 .../src/main/resources/swagger/swagger.html |  119 ++
 ambari-metrics/ambari-metrics-assembly/pom.xml  |1 -
 ambari-metrics/ambari-metrics-common/pom.xml|   11 +-
 .../timeline/AbstractTimelineMetricsSink.java   |   20 +-
 .../AbstractTimelineMetricSinkTest.java |   98 ++
 .../conf/unix/metric_monitor.ini|2 -
 .../src/main/python/core/config_reader.py   |   10 +-
 .../src/main/python/core/emitter.py |   57 +-
 .../src/main/python/core/krberr.py  |   42 -
 .../main/python/core/spnego_kerberos_auth.py|  163 --
 .../src/test/python/core/TestEmitter.py |   26 -
 .../metrics/timeline/TimelineMetricStore.java   |2 +-
 ambari-server/docs/configuration/index.md   |   35 +-
 ambari-server/pom.xml   |   10 +
 ambari-server/sbin/ambari-server|4 +
 ambari-server/src/main/assemblies/server.xml|8 +
 .../server/agent/RecoveryConfigHelper.java  |   71 +-
 .../stackadvisor/StackAdvisorHelper.java|   18 +-
 .../server/configuration/Configuration.java |  179 +-
 .../AmbariManagementControllerImpl.java |   49 +-
 .../ambari/server/controller/AmbariServer.java  |  219 +--
 .../server/controller/ControllerModule.java |   73 +-
 .../ambari/server/controller/GroupResponse.java |   14 +
 .../server/controller/KerberosHelperImpl.java   |6 -
 .../internal/GroupResourceProvider.java |4 +
 .../internal/UpgradeResourceProvider.java   |6 +
 .../internal/UserPrivilegeResourceProvider.java |3 +
 .../metrics/MetricsCollectorHAClusterState.java |   10 +
 .../ambari/server/events/AmbariEvent.java   |7 +-
 .../server/events/MaintenanceModeEvent.java |   30 +-
 .../ambari/server/hooks/AmbariEventFactory.java |   33 +
 .../apache/ambari/server/hooks/HookContext.java |   26 +
 .../ambari/server/hooks/HookContextFactory.java |   44 +
 .../apache/ambari/server/hooks/HookService.java |   36 +
 .../users/PostUserCreationHookContext.java  |   55 +
 .../server/hooks/users/UserCreatedEvent.java|   45 +
 .../server/hooks/users/UserHookParams.java  |   49 +
 .../server/hooks/users/UserHookService.java |  279 
 .../apache/ambari/server/orm/dao/GroupDAO.java  |   19 +-
 .../ambari/server/orm/dao/ResourceDAO.java  |   21 +
 .../ambari/server/orm/entities/GroupEntity.java |   18 +
 

[1/8] ambari git commit: AMBARI-18906 - Remove Unnecessary Locks Inside Of Config Business Object Implementations (jonathanhurley)

2016-11-30 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 [created] 276d1244e


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6639a7c/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index d50c92d..a3a7e11 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -38,7 +38,6 @@ import javax.persistence.EntityManager;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.RequestFactory;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
-import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ClusterRequest;
@@ -88,6 +87,7 @@ public class ConfigHelperTest {
 private static ConfigHelper configHelper;
 private static AmbariManagementController managementController;
 private static AmbariMetaInfo metaInfo;
+private static ConfigFactory configFactory;
 
 @BeforeClass
 public static void setup() throws Exception {
@@ -102,6 +102,7 @@ public class ConfigHelperTest {
   configHelper = injector.getInstance(ConfigHelper.class);
   managementController = 
injector.getInstance(AmbariManagementController.class);
   metaInfo = injector.getInstance(AmbariMetaInfo.class);
+  configFactory = injector.getInstance(ConfigFactory.class);
 
   clusterName = "c1";
   clusters.addCluster(clusterName, new StackId("HDP-2.0.6"));
@@ -339,14 +340,11 @@ public class ConfigHelperTest {
 add(clusterRequest6);
   }}, null);
 
-  final Config config = new ConfigImpl("ams-env");
-  config.setTag("version122");
-
   Map properties = new HashMap();
   properties.put("a", "b");
   properties.put("c", "d");
-  config.setProperties(properties);
 
+  final Config config = configFactory.createNew(cluster, "ams-env", 
"version122", properties, null);
   Long groupId = addConfigGroup("g1", "t1", new ArrayList() {{
 add("h1");
   }}, new ArrayList() {{
@@ -419,19 +417,14 @@ public class ConfigHelperTest {
 add(clusterRequest3);
   }}, null);
 
-  final Config config1 = new ConfigImpl("core-site2");
-  config1.setTag("version122");
-
   Map properties = new HashMap();
   properties.put("a", "b");
   properties.put("c", "d");
-  config1.setProperties(properties);
+  final Config config1 = configFactory.createNew(cluster, "core-site2", 
"version122", properties, null);
 
-  final Config config2 = new ConfigImpl("global2");
-  config2.setTag("version122");
   Map properties2 = new HashMap();
   properties2.put("namenode_heapsize", "");
-  config2.setProperties(properties2);
+  final Config config2 = configFactory.createNew(cluster, "global2", 
"version122", properties2, null);
 
   Long groupId = addConfigGroup("g2", "t1", new ArrayList() {{
 add("h1");
@@ -511,24 +504,23 @@ public class ConfigHelperTest {
   }}, null);
 
 
-  final Config config1 = new ConfigImpl("core-site3");
-  config1.setTag("version122");
-
   Map attributes = new HashMap();
   attributes.put("fs.trash.interval", "11");
   attributes.put("b", "y");
   Map> config1Attributes = new HashMap>();
   config1Attributes.put("attribute1", attributes);
-  config1.setPropertiesAttributes(config1Attributes);
 
-  final Config config2 = new ConfigImpl("global3");
-  config2.setTag("version122");
+  final Config config1 = configFactory.createNew(cluster, "core-site3", 
"version122",
+  new HashMap(), config1Attributes);
+
   attributes = new HashMap();
   attributes.put("namenode_heapsize", "z");
   attributes.put("c", "q");
   Map> config2Attributes = new HashMap>();
   config2Attributes.put("attribute2", attributes);
-  config2.setPropertiesAttributes(config2Attributes);
+
+  final Config config2 = configFactory.createNew(cluster, "global3", 
"version122",
+  new HashMap(), config2Attributes);
 
   Long groupId = addConfigGroup("g3", "t1", new ArrayList() {{
 add("h3");
@@ -690,7 +682,8 @@ public class ConfigHelperTest {
   

[6/8] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-11-30 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 936626bdba424d3972704a68f98b34cc542f8a64
Parents: ab1c100 c9a4881
Author: Jonathan Hurley 
Authored: Mon Nov 21 11:03:42 2016 -0500
Committer: Jonathan Hurley 
Committed: Mon Nov 21 11:08:19 2016 -0500

--
 .../src/main/python/ambari_agent/AmbariAgent.py |   19 +-
 .../ambari_agent/StatusCommandsExecutor.py  |4 +-
 .../test/python/ambari_agent/TestAmbariAgent.py |7 +-
 .../timeline/AbstractTimelineMetricsSink.java   |5 +-
 .../availability/MetricCollectorHAHelper.java   |6 +
 .../availability/MetricCollectorHATest.java |   10 +-
 .../apache/ambari/server/state/ConfigImpl.java  |   13 +-
 .../alerts/alert_segment_registration_status.py |   10 +-
 .../package/scripts/hive_server_interactive.py  |   22 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |1 +
 .../MAHOUT/1.0.0.2.3/metainfo.xml   |2 +-
 .../OOZIE/4.0.0.2.0/metainfo.xml|2 +-
 .../OOZIE/4.2.0.2.3/metainfo.xml|2 +-
 .../common-services/PIG/0.12.0.2.0/metainfo.xml |2 +-
 .../common-services/TEZ/0.4.0.2.1/metainfo.xml  |2 +-
 .../common-services/YARN/2.1.0.2.0/metainfo.xml |2 +-
 .../stacks/HDP/2.5/services/SPARK/kerberos.json |   60 +-
 .../stacks/HDP/2.6/services/SPARK/kerberos.json |   62 +-
 .../GRUMPY/configuration/grumpy-site.xml|   36 +
 .../PERF/1.0/services/GRUMPY/metainfo.xml   |   57 +
 .../services/GRUMPY/package/scripts/dwarf.py|   38 +
 .../GRUMPY/package/scripts/service_check.py |   30 +
 .../PERF/1.0/services/GRUMPY/themes/theme.json  |   65 +
 .../stacks/PERF/1.0/services/HBASE/alerts.json  |  127 +
 .../services/HBASE/configuration/hbase-env.xml  |  292 +
 .../HBASE/configuration/hbase-log4j.xml |  146 +
 .../configuration/hbase-logsearch-conf.xml  |  111 +
 .../HBASE/configuration/hbase-policy.xml|   53 +
 .../services/HBASE/configuration/hbase-site.xml |  573 ++
 .../HBASE/configuration/ranger-hbase-audit.xml  |  122 +
 .../ranger-hbase-policymgr-ssl.xml  |   66 +
 .../configuration/ranger-hbase-security.xml |   68 +
 .../PERF/1.0/services/HBASE/kerberos.json   |  159 +
 .../stacks/PERF/1.0/services/HBASE/metainfo.xml |  196 +
 .../stacks/PERF/1.0/services/HBASE/metrics.json | 9374 ++
 .../HBASE/package/scripts/hbase_client.py   |   38 +
 .../HBASE/package/scripts/hbase_master.py   |   41 +
 .../HBASE/package/scripts/hbase_regionserver.py |   41 +
 .../package/scripts/phoenix_queryserver.py  |   38 +
 .../HBASE/package/scripts/service_check.py  |   30 +
 .../services/HBASE/quicklinks/quicklinks.json   |   97 +
 .../PERF/1.0/services/HBASE/themes/theme.json   |  411 +
 .../stacks/PERF/1.0/services/HBASE/widgets.json |  510 +
 .../stacks/PERF/1.0/services/HDFS/alerts.json   | 1786 
 .../services/HDFS/configuration/core-site.xml   |  225 +
 .../services/HDFS/configuration/hadoop-env.xml  |  419 +
 .../hadoop-metrics2.properties.xml  |  125 +
 .../HDFS/configuration/hadoop-policy.xml|  130 +
 .../services/HDFS/configuration/hdfs-log4j.xml  |  225 +
 .../HDFS/configuration/hdfs-logsearch-conf.xml  |  248 +
 .../services/HDFS/configuration/hdfs-site.xml   |  633 ++
 .../HDFS/configuration/ranger-hdfs-audit.xml|  124 +
 .../ranger-hdfs-plugin-properties.xml   |   88 +
 .../configuration/ranger-hdfs-policymgr-ssl.xml |   67 +
 .../HDFS/configuration/ranger-hdfs-security.xml |   65 +
 .../services/HDFS/configuration/ssl-client.xml  |   70 +
 .../services/HDFS/configuration/ssl-server.xml  |   80 +
 .../stacks/PERF/1.0/services/HDFS/kerberos.json |  246 +
 .../stacks/PERF/1.0/services/HDFS/metainfo.xml  |  265 +
 .../stacks/PERF/1.0/services/HDFS/metrics.json  | 7905 +++
 .../package/alerts/alert_checkpoint_time.py |   69 +
 .../alerts/alert_datanode_unmounted_data_dir.py |   74 +
 .../package/alerts/alert_ha_namenode_health.py  |   75 +
 .../package/alerts/alert_metrics_deviation.py   |   85 +
 .../package/alerts/alert_upgrade_finalized.py   |   74 +
 .../services/HDFS/package/scripts/datanode.py   |   38 +
 .../HDFS/package/scripts/hdfs_client.py |   38 +
 .../HDFS/package/scripts/journalnode.py |   38 +
 .../services/HDFS/package/scripts/namenode.py   |   54 +
 .../services/HDFS/package/scripts/nfsgateway.py |   38 +
 .../HDFS/package/scripts/service_check.py   |   30 +
 .../services/HDFS/package/scripts/snamenode.py  |   38 +
 .../services/HDFS/package/scripts/zkfc_slave.py |   38 +
 

[8/8] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-11-30 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 276d1244e1b1d8200cf644b7cccfaa0a757f8146
Parents: 1f804d1 85c9104
Author: Jonathan Hurley 
Authored: Tue Nov 29 16:51:58 2016 -0500
Committer: Jonathan Hurley 
Committed: Tue Nov 29 17:00:59 2016 -0500

--
 .../views/stackVersions/stackVersionPage.html   |   2 +-
 .../org/apache/ambari/logsearch/LogSearch.java  |  15 +-
 .../logsearch/common/ExternalServerClient.java  |  12 +-
 .../logsearch/common/LogSearchConstants.java|   1 +
 .../AbstractOperationHolderConverter.java   |   9 +
 ...actServiceLogRequestFacetQueryConverter.java |  44 ++
 .../BaseServiceLogRequestQueryConverter.java|   1 +
 ...ServiceLogAnyGraphRequestQueryConverter.java |  13 +
 ...eLogComponentLevelRequestQueryConverter.java |  15 +-
 ...eLogComponentRequestFacetQueryConverter.java |  15 +-
 ...rviceLogLevelCountRequestQueryConverter.java |  16 +
 ...eLogLevelDateRangeRequestQueryConverter.java |  16 +-
 ...erviceLogTreeRequestFacetQueryConverter.java |  17 +-
 .../ambari/logsearch/doc/DocConstants.java  |   1 +
 .../logsearch/graph/GraphDataGenerator.java |  26 +-
 .../logsearch/manager/ServiceLogsManager.java   |   2 +-
 .../request/ServiceLogParamDefinition.java  |   6 +
 .../request/impl/BaseServiceLogRequest.java |  13 +
 .../LogsearchKRBAuthenticationFilter.java   |   4 +-
 .../src/main/resources/logsearch.properties |   2 +-
 .../dashboard/BubbleGraphTableLayoutView.js |   4 +-
 .../views/dashboard/ComponentListView.js|   2 +-
 .../scripts/views/dashboard/HostListView.js |  14 +-
 .../main/webapp/scripts/views/tabs/TreeView.js  |  10 +-
 .../webapp/templates/tabs/TreeView_tmpl.html| 115 ++--
 ...ComponentLevelRequestQueryConverterTest.java |   7 +-
 ...ComponentRequestFacetQueryConverterTest.java |   4 +-
 .../conf/unix/ambari-metrics-grafana|  34 +-
 .../ambari/server/checks/CheckDescription.java  |  13 +
 .../server/checks/ServicePresenceCheck.java | 177 ++
 .../internal/ClusterControllerImpl.java |   2 +-
 .../ServiceConfigVersionResourceProvider.java   |   3 +-
 .../logging/LoggingSearchPropertyProvider.java  |  11 +-
 .../ambari/server/orm/dao/ClusterDAO.java   |  24 +
 .../ambari/server/orm/dao/ServiceConfigDAO.java |  13 +-
 .../orm/entities/ClusterConfigEntity.java   |   7 +-
 .../entities/ClusterConfigMappingEntity.java|   6 +
 .../orm/entities/ServiceConfigEntity.java   |   5 +-
 .../server/orm/helpers/dbms/MySqlHelper.java|  18 +
 .../upgrades/RangerKmsProxyConfig.java  |  94 +++
 .../server/state/cluster/ClusterImpl.java   |  42 +-
 .../server/upgrade/SchemaUpgradeHelper.java |  35 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   1 +
 .../FLUME/1.4.0.2.0/package/scripts/flume.py|   1 +
 .../package/files/hbaseSmokeVerify.sh   |   2 +-
 .../HDFS/2.1.0.2.0/kerberos.json|   2 +-
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  |  19 +
 .../HIVE/0.12.0.2.0/package/scripts/webhcat.py  |  10 -
 .../configuration/logfeeder-ambari-config.xml   |  37 ++
 .../configuration/logfeeder-output-config.xml   |  37 ++
 .../configuration/logsearch-properties.xml  |  40 ++
 .../LOGSEARCH/0.5.0/metainfo.xml|   5 +
 .../LOGSEARCH/0.5.0/package/scripts/params.py   |  17 +-
 .../0.5.0/package/scripts/setup_logfeeder.py|  10 +
 .../templates/input.config-ambari.json.j2   | 602 ---
 .../package/templates/output.config.json.j2 |  61 --
 .../properties/input.config-ambari.json.j2  | 602 +++
 .../0.5.0/properties/output.config.json.j2  |  61 ++
 .../OOZIE/4.0.0.2.0/configuration/oozie-env.xml |  19 +
 .../0.6.0.2.5/package/scripts/master.py |  15 +-
 .../0.6.0.2.5/package/scripts/params.py |  28 +-
 .../ZEPPELIN/0.6.0.2.5/role_command_order.json  |   2 +-
 .../HDP/2.0.6/configuration/cluster-env.xml |   6 +
 .../HDP/2.2/services/HIVE/themes/theme.json | 107 +++-
 .../services/HIVE/configuration/hive-env.xml|  35 ++
 .../services/OOZIE/configuration/oozie-env.xml  |  33 +
 .../stacks/HDP/2.3/services/OOZIE/metainfo.xml  |   6 +
 .../HDP/2.3/services/OOZIE/themes/theme.json| 116 
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |   7 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   7 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml |  11 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml |  11 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml |   7 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml 

[3/8] ambari git commit: AMBARI-18906 - Remove Unnecessary Locks Inside Of Config Business Object Implementations (jonathanhurley)

2016-11-30 Thread jonathanhurley
AMBARI-18906 - Remove Unnecessary Locks Inside Of Config Business Object 
Implementations (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: a6639a7c72043ff7bda03e6ba305913c7503193a
Parents: 5d7824e
Author: Jonathan Hurley 
Authored: Wed Nov 16 08:35:20 2016 -0500
Committer: Jonathan Hurley 
Committed: Thu Nov 17 11:20:55 2016 -0500

--
 .../AmbariManagementControllerImpl.java |  13 +-
 .../internal/ConfigGroupResourceProvider.java   |  13 +-
 .../serveraction/upgrades/ConfigureAction.java  |  16 +-
 .../serveraction/upgrades/FixLzoCodecPath.java  |  16 +-
 .../upgrades/FixOozieAdminUsers.java|   9 +-
 .../upgrades/HBaseConfigCalculation.java|  14 +-
 .../HBaseEnvMaxDirectMemorySizeAction.java  |  13 +-
 .../upgrades/HiveEnvClasspathAction.java|  13 +-
 .../upgrades/HiveZKQuorumConfigAction.java  |   2 +-
 .../upgrades/OozieConfigCalculation.java|  13 +-
 .../upgrades/RangerConfigCalculation.java   |   4 +-
 .../RangerKerberosConfigCalculation.java|  20 +-
 .../upgrades/SparkShufflePropertyConfig.java|   3 +-
 .../upgrades/YarnConfigCalculation.java |   2 +-
 .../org/apache/ambari/server/state/Config.java  |  22 +-
 .../ambari/server/state/ConfigFactory.java  |  20 +-
 .../apache/ambari/server/state/ConfigImpl.java  | 474 +--
 .../state/configgroup/ConfigGroupImpl.java  |  38 +-
 .../ambari/server/topology/AmbariContext.java   |  23 +-
 .../ambari/server/update/HostUpdateHelper.java  |  10 +-
 .../ExecutionCommandWrapperTest.java|  17 +-
 .../TestActionSchedulerThreading.java   |  19 +-
 .../server/agent/HeartbeatTestHelper.java   |   6 +-
 .../server/agent/TestHeartbeatMonitor.java  |  13 +-
 .../configuration/RecoveryConfigHelperTest.java |   2 +-
 .../AmbariManagementControllerImplTest.java |  22 +-
 .../AmbariManagementControllerTest.java | 107 ++---
 .../UpgradeResourceProviderHDP22Test.java   |  14 +-
 .../internal/UpgradeResourceProviderTest.java   |  15 +-
 .../ComponentVersionCheckActionTest.java|  19 +-
 .../upgrades/ConfigureActionTest.java   |  96 +---
 .../upgrades/FixOozieAdminUsersTest.java|  76 ++-
 .../HBaseEnvMaxDirectMemorySizeActionTest.java  | 187 
 .../upgrades/HiveEnvClasspathActionTest.java| 148 +++---
 .../upgrades/HiveZKQuorumConfigActionTest.java  |   2 +-
 .../upgrades/KerberosKeytabsActionTest.java |  28 +-
 .../upgrades/RangerConfigCalculationTest.java   |  72 +--
 .../RangerKerberosConfigCalculationTest.java| 173 ++-
 .../SparkShufflePropertyConfigTest.java |  30 +-
 .../upgrades/UpgradeActionTest.java |  28 +-
 .../ambari/server/state/ConfigGroupTest.java|   8 +-
 .../ambari/server/state/ConfigHelperTest.java   |  48 +-
 .../state/alerts/AlertReceivedListenerTest.java |   8 +-
 .../state/cluster/ClusterDeadlockTest.java  |  17 +-
 .../server/state/cluster/ClusterTest.java   | 126 ++---
 .../server/state/cluster/ClustersTest.java  |   8 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |   9 +-
 .../ambari/server/state/host/HostTest.java  |   6 +-
 .../svccomphost/ServiceComponentHostTest.java   |  21 +-
 .../server/topology/AmbariContextTest.java  |  37 +-
 .../server/update/HostUpdateHelperTest.java |  40 +-
 .../ambari/server/utils/StageUtilsTest.java |   4 +
 52 files changed, 846 insertions(+), 1298 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6639a7c/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 b04fdd7..7da1034 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
@@ -54,7 +54,6 @@ import java.util.EnumMap;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -79,10 +78,10 @@ import 
org.apache.ambari.server.ServiceComponentNotFoundException;
 import 

ambari git commit: AMBARI-18949 Extend current quick link JSON with properties

2016-11-30 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 964c56e7a -> eec985b16


AMBARI-18949 Extend current quick link JSON with properties

Change-Id: Ie994b82cea7abddcb6d4c32afc6b8597b608f025


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

Branch: refs/heads/branch-2.5
Commit: eec985b1675d35f407913c66b405bfee95527931
Parents: 964c56e
Author: Balazs Bence Sari 
Authored: Wed Nov 30 16:23:40 2016 +0100
Committer: Miklos Gergely 
Committed: Wed Nov 30 16:23:40 2016 +0100

--
 .../ambari/server/state/quicklinks/Link.java| 21 +++
 .../QuickLinksConfigurationModuleTest.java  | 36 +++
 .../child_quicklinks_with_properties.json   | 64 +++
 .../parent_quicklinks_with_properties.json  | 65 
 4 files changed, 186 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/eec985b1/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
index 091926f..f7c14f3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
@@ -18,6 +18,11 @@
 
 package org.apache.ambari.server.state.quicklinks;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
@@ -46,6 +51,9 @@ public class Link{
   @JsonProperty("protocol")
   private Protocol protocol;
 
+  @JsonProperty("properties")
+  private List properties;
+
   public String getName() {
 return name;
   }
@@ -102,6 +110,14 @@ public class Link{
 this.protocol = protocol;
   }
 
+  @Nullable
+  public List getProperties() {
+return properties;
+  }
+
+  public void setProperties(List properties) {
+this.properties = properties;
+  }
 
   public boolean isRemoved(){
 //treat a link as removed if the section only contains a name
@@ -132,5 +148,10 @@ public class Link{
 } else {
   port.mergetWithParent(parentLink.getPort());
 }
+
+if (null == properties && null != parentLink.properties) {
+  properties = parentLink.properties;
+}
   }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/eec985b1/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
index 38176aa..f44f741 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.stack;
 
+import com.google.common.collect.Lists;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.state.quicklinks.Check;
 import org.apache.ambari.server.state.quicklinks.Link;
@@ -28,7 +29,10 @@ import 
org.apache.ambari.server.state.quicklinks.QuickLinksConfiguration;
 import org.junit.Test;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import static org.junit.Assert.*;
 
@@ -111,6 +115,38 @@ public class QuickLinksConfigurationModuleTest {
 }
   }
 
+  @Test
+  public void testResolveOverrideProperties() throws Exception{
+QuickLinks[] results = 
resolveQuickLinks("parent_quicklinks_with_properties.json",
+"child_quicklinks_with_properties.json");
+QuickLinks parentQuickLinks = results[0];
+QuickLinks childQuickLinks = results[1];
+
+//resolved quicklinks configuration
+QuickLinksConfiguration childQuickLinksConfig = 
childQuickLinks.getQuickLinksConfiguration();
+assertNotNull(childQuickLinksConfig);
+
+//links
+List links = childQuickLinksConfig.getLinks();
+assertNotNull(links);
+assertEquals(3, links.size());
+Map linksByName = new HashMap<>();
+for (Link link: links) {
+  

[ambari] Git Push Summary

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18634 [deleted] 2c7c0a704


ambari git commit: AMBARI-18949 Extend current quick link JSON with properties

2016-11-30 Thread mgergely
Repository: ambari
Updated Branches:
  refs/heads/trunk e3b9a9f80 -> 9559a1626


AMBARI-18949 Extend current quick link JSON with properties

Change-Id: I209e594e74964b2bab71a454c2b77f785bb02a82


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

Branch: refs/heads/trunk
Commit: 9559a1626ac5e6dd3f6ddf65b1fd450171bc4f26
Parents: e3b9a9f
Author: Balazs Bence Sari 
Authored: Wed Nov 30 16:24:04 2016 +0100
Committer: Miklos Gergely 
Committed: Wed Nov 30 16:24:04 2016 +0100

--
 .../ambari/server/state/quicklinks/Link.java| 21 +++
 .../QuickLinksConfigurationModuleTest.java  | 36 +++
 .../child_quicklinks_with_properties.json   | 64 +++
 .../parent_quicklinks_with_properties.json  | 65 
 4 files changed, 186 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9559a162/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
index 091926f..f7c14f3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java
@@ -18,6 +18,11 @@
 
 package org.apache.ambari.server.state.quicklinks;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
@@ -46,6 +51,9 @@ public class Link{
   @JsonProperty("protocol")
   private Protocol protocol;
 
+  @JsonProperty("properties")
+  private List properties;
+
   public String getName() {
 return name;
   }
@@ -102,6 +110,14 @@ public class Link{
 this.protocol = protocol;
   }
 
+  @Nullable
+  public List getProperties() {
+return properties;
+  }
+
+  public void setProperties(List properties) {
+this.properties = properties;
+  }
 
   public boolean isRemoved(){
 //treat a link as removed if the section only contains a name
@@ -132,5 +148,10 @@ public class Link{
 } else {
   port.mergetWithParent(parentLink.getPort());
 }
+
+if (null == properties && null != parentLink.properties) {
+  properties = parentLink.properties;
+}
   }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/9559a162/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
index 38176aa..f44f741 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/QuickLinksConfigurationModuleTest.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.stack;
 
+import com.google.common.collect.Lists;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.state.quicklinks.Check;
 import org.apache.ambari.server.state.quicklinks.Link;
@@ -28,7 +29,10 @@ import 
org.apache.ambari.server.state.quicklinks.QuickLinksConfiguration;
 import org.junit.Test;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import static org.junit.Assert.*;
 
@@ -111,6 +115,38 @@ public class QuickLinksConfigurationModuleTest {
 }
   }
 
+  @Test
+  public void testResolveOverrideProperties() throws Exception{
+QuickLinks[] results = 
resolveQuickLinks("parent_quicklinks_with_properties.json",
+"child_quicklinks_with_properties.json");
+QuickLinks parentQuickLinks = results[0];
+QuickLinks childQuickLinks = results[1];
+
+//resolved quicklinks configuration
+QuickLinksConfiguration childQuickLinksConfig = 
childQuickLinks.getQuickLinksConfiguration();
+assertNotNull(childQuickLinksConfig);
+
+//links
+List links = childQuickLinksConfig.getLinks();
+assertNotNull(links);
+assertEquals(3, links.size());
+Map linksByName = new HashMap<>();
+for (Link link: links) {
+  

[ambari] Git Push Summary

2016-11-30 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 [deleted] 276d1244e


[1/2] ambari git commit: AMBARI-19000. Ambari-server fails to restart with --debug if it is already running (aonishuk)

2016-11-30 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 1bd562a18 -> 964c56e7a
  refs/heads/trunk 28d783486 -> e3b9a9f80


AMBARI-19000. Ambari-server fails to restart with --debug if it is already 
running (aonishuk)


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

Branch: refs/heads/trunk
Commit: e3b9a9f804537796fa46273b378935a14b75bb33
Parents: 28d7834
Author: Andrew Onishuk 
Authored: Wed Nov 30 17:07:22 2016 +0200
Committer: Andrew Onishuk 
Committed: Wed Nov 30 17:07:22 2016 +0200

--
 ambari-server/src/main/python/ambari-server.py  | 12 +++-
 .../src/main/python/ambari_server/serverUtils.py| 11 +++
 2 files changed, 22 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3b9a9f8/ambari-server/src/main/python/ambari-server.py
--
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index 41b2234..21bd0bb 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -35,7 +35,7 @@ from ambari_commons.os_utils import remove_file
 from ambari_server.BackupRestore import main as BackupRestore_main
 from ambari_server.dbConfiguration import DATABASE_NAMES, LINUX_DBMS_KEYS_LIST
 from ambari_server.serverConfiguration import configDefaults, 
get_ambari_properties, PID_NAME
-from ambari_server.serverUtils import is_server_runing, refresh_stack_hash
+from ambari_server.serverUtils import is_server_runing, refresh_stack_hash, 
wait_for_server_to_stop
 from ambari_server.serverSetup import reset, setup, setup_jce_policy
 from ambari_server.serverUpgrade import upgrade, upgrade_stack, set_current
 from ambari_server.setupHttps import setup_https, setup_truststore
@@ -63,6 +63,8 @@ logger = logging.getLogger()
 
 formatstr = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d - %(message)s"
 
+SERVER_STOP_TIMEOUT = 30
+
 class UserActionPossibleArgs(object):
   def __init__(self, i_fn, i_possible_args_numbers, *args, **kwargs):
 self.fn = i_fn
@@ -166,6 +168,14 @@ def stop(args):
 except OSError, e:
   print_info_msg("Unable to stop Ambari Server - " + str(e))
   return
+
+print "Waiting for server stop..."
+logger.info("Waiting for server stop...")
+
+if not wait_for_server_to_stop(SERVER_STOP_TIMEOUT):
+  print "Ambari-server failed to stop"
+  logger.info("Ambari-server failed to stop")
+
 pid_file_path = os.path.join(configDefaults.PID_DIR, PID_NAME)
 os.remove(pid_file_path)
 print "Ambari Server stopped"

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3b9a9f8/ambari-server/src/main/python/ambari_server/serverUtils.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUtils.py 
b/ambari-server/src/main/python/ambari_server/serverUtils.py
index 3af233c..4621646 100644
--- a/ambari-server/src/main/python/ambari_server/serverUtils.py
+++ b/ambari-server/src/main/python/ambari_server/serverUtils.py
@@ -19,6 +19,7 @@ limitations under the License.
 '''
 
 import os
+import time
 from ambari_commons.exceptions import FatalException, NonFatalException
 from ambari_commons.logging_utils import get_verbose
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
@@ -62,6 +63,16 @@ def is_server_runing():
 return False, None
 
 
+def wait_for_server_to_stop(wait_timeout):
+  start_time = time.time()
+  is_timeout = lambda: time.time() - start_time > wait_timeout
+
+  while is_server_runing()[0] and not is_timeout():
+time.sleep(0.1)
+
+  return not is_timeout()
+
+
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def is_server_runing():
   from ambari_commons.os_windows import SERVICE_STATUS_STARTING, 
SERVICE_STATUS_RUNNING, SERVICE_STATUS_STOPPING, \



[2/2] ambari git commit: AMBARI-19000. Ambari-server fails to restart with --debug if it is already running (aonishuk)

2016-11-30 Thread aonishuk
AMBARI-19000. Ambari-server fails to restart with --debug if it is already 
running (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 964c56e7a80e621103fe5ed318b3050d2c6fe07c
Parents: 1bd562a
Author: Andrew Onishuk 
Authored: Wed Nov 30 17:07:26 2016 +0200
Committer: Andrew Onishuk 
Committed: Wed Nov 30 17:07:26 2016 +0200

--
 ambari-server/src/main/python/ambari-server.py  | 12 +++-
 .../src/main/python/ambari_server/serverUtils.py| 11 +++
 2 files changed, 22 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/964c56e7/ambari-server/src/main/python/ambari-server.py
--
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index ee6259b..ab26c0d 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -35,7 +35,7 @@ from ambari_commons.os_utils import remove_file
 from ambari_server.BackupRestore import main as BackupRestore_main
 from ambari_server.dbConfiguration import DATABASE_NAMES, LINUX_DBMS_KEYS_LIST
 from ambari_server.serverConfiguration import configDefaults, 
get_ambari_properties, PID_NAME
-from ambari_server.serverUtils import is_server_runing, refresh_stack_hash
+from ambari_server.serverUtils import is_server_runing, refresh_stack_hash, 
wait_for_server_to_stop
 from ambari_server.serverSetup import reset, setup, setup_jce_policy
 from ambari_server.serverUpgrade import upgrade, upgrade_stack, set_current
 from ambari_server.setupHttps import setup_https, setup_truststore
@@ -63,6 +63,8 @@ logger = logging.getLogger()
 
 formatstr = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d - %(message)s"
 
+SERVER_STOP_TIMEOUT = 30
+
 class UserActionPossibleArgs(object):
   def __init__(self, i_fn, i_possible_args_numbers, *args, **kwargs):
 self.fn = i_fn
@@ -166,6 +168,14 @@ def stop(args):
 except OSError, e:
   print_info_msg("Unable to stop Ambari Server - " + str(e))
   return
+
+print "Waiting for server stop..."
+logger.info("Waiting for server stop...")
+
+if not wait_for_server_to_stop(SERVER_STOP_TIMEOUT):
+  print "Ambari-server failed to stop"
+  logger.info("Ambari-server failed to stop")
+
 pid_file_path = os.path.join(configDefaults.PID_DIR, PID_NAME)
 os.remove(pid_file_path)
 print "Ambari Server stopped"

http://git-wip-us.apache.org/repos/asf/ambari/blob/964c56e7/ambari-server/src/main/python/ambari_server/serverUtils.py
--
diff --git a/ambari-server/src/main/python/ambari_server/serverUtils.py 
b/ambari-server/src/main/python/ambari_server/serverUtils.py
index 3af233c..4621646 100644
--- a/ambari-server/src/main/python/ambari_server/serverUtils.py
+++ b/ambari-server/src/main/python/ambari_server/serverUtils.py
@@ -19,6 +19,7 @@ limitations under the License.
 '''
 
 import os
+import time
 from ambari_commons.exceptions import FatalException, NonFatalException
 from ambari_commons.logging_utils import get_verbose
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
@@ -62,6 +63,16 @@ def is_server_runing():
 return False, None
 
 
+def wait_for_server_to_stop(wait_timeout):
+  start_time = time.time()
+  is_timeout = lambda: time.time() - start_time > wait_timeout
+
+  while is_server_runing()[0] and not is_timeout():
+time.sleep(0.1)
+
+  return not is_timeout()
+
+
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def is_server_runing():
   from ambari_commons.os_windows import SERVICE_STATUS_STARTING, 
SERVICE_STATUS_RUNNING, SERVICE_STATUS_STOPPING, \



ambari git commit: AMBARI-19026. Add Host Wizard: validation failed on Assign Slaves step (alexantonenko)

2016-11-30 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 89780faba -> 28d783486


AMBARI-19026. Add Host Wizard: validation failed on Assign Slaves step 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 28d783486cb5f4f659126c77792fe44f39f43584
Parents: 89780fa
Author: Alex Antonenko 
Authored: Wed Nov 30 15:56:48 2016 +0200
Committer: Alex Antonenko 
Committed: Wed Nov 30 15:56:57 2016 +0200

--
 .../app/controllers/wizard/step6_controller.js  | 58 +++-
 .../test/controllers/wizard/step6_test.js   |  6 +-
 2 files changed, 36 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/28d78348/ambari-web/app/controllers/wizard/step6_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js 
b/ambari-web/app/controllers/wizard/step6_controller.js
index dfd0687..745ecc7 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -351,29 +351,36 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
   },
 
   /**
-   * Get active host names
-   * @return {string[]}
-   * @method getHostNames
-   */
-  getHostNames: function () {
-var hostInfo = this.get('content.hosts');
-var hostNames = [];
-//flag identify whether get all hosts or only uninstalled(newly added) 
hosts
-var getUninstalledHosts = this.get('content.controllerName') !== 
'addServiceController';
-
-for (var index in hostInfo) {
-  if (hostInfo.hasOwnProperty(index)) {
-if (hostInfo[index].bootStatus === 'REGISTERED') {
-  if (!getUninstalledHosts || !hostInfo[index].isInstalled) {
-hostNames.push(hostInfo[index].name);
-  }
-}
-  }
-}
-return hostNames;
+   * Returns list of new hosts
+   *
+   * @param {object[]} [allHosts=null]
+   * @return {object[]}
+   */
+  getNewHosts: function(allHosts) {
+var hosts = allHosts || this.getAllHosts();
+return hosts.filterProperty('isInstalled', false);
   },
 
   /**
+   * Returns list of registered hosts
+   *
+   * @return {object[{hostName, isInstalled}]}
+   */
+  getAllHosts: function() {
+var self = this;
+var hosts = self.get('content.hosts');
+return Em.keys(this.get('content.hosts')).reduce(function(res, hostName) {
+  var host = hosts[hostName];
+  if (Em.get(host, 'bootStatus') !== 'REGISTERED') {
+return res;
+  }
+  return res.concat({
+hostName: hostName,
+isInstalled: Em.getWithDefault(host, 'isInstalled', false)
+  });
+}, []);
+  },
+  /**
* Load all data needed for this module. Then it automatically renders in 
template
* @method render
*/
@@ -382,9 +389,10 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
   masterHosts = [],
   headers = this.get('headers'),
   masterHostNames = 
this.get('content.masterComponentHosts').mapProperty('hostName').uniq(),
-  masterHostNamesMap = masterHostNames.toWickMap();
+  masterHostNamesMap = masterHostNames.toWickMap(),
+  hosts = this.get('isAddHostWizard') ? this.getNewHosts() : 
this.getAllHosts();
 
-this.getHostNames().forEach(function (_hostName) {
+hosts.mapProperty('hostName').forEach(function (_hostName) {
   var hasMaster = masterHostNamesMap[_hostName];
 
   var obj = {
@@ -403,7 +411,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
   };
 
   if (hasMaster) {
-masterHosts.pushObject(obj)
+masterHosts.pushObject(obj);
   } else {
 hostsObj.pushObject(obj);
   }
@@ -640,7 +648,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 var selectedServices = 
App.StackService.find().filterProperty('isSelected').mapProperty('serviceName');
 var installedServices = 
App.StackService.find().filterProperty('isInstalled').mapProperty('serviceName');
 var services = installedServices.concat(selectedServices).uniq();
-var hostNames = this.get('hosts').mapProperty('hostName');
+var hostNames = this.getAllHosts().mapProperty('hostName');
 
 var bluePrintsForValidation = this.getValidationBlueprint();
 this.set('content.recommendationsHostGroups', bluePrintsForValidation);
@@ -660,7 +668,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 var slaveBlueprint = 

ambari git commit: AMBARI-19030 Service Auto Start operations are permitted during Upgrade. (atkach)

2016-11-30 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 adde3db03 -> 1bd562a18


AMBARI-19030 Service Auto Start operations are permitted during Upgrade. 
(atkach)


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

Branch: refs/heads/branch-2.5
Commit: 1bd562a1803efa12a4afcbf312c5a898f63bff41
Parents: adde3db
Author: Andrii Tkach 
Authored: Wed Nov 30 14:19:52 2016 +0200
Committer: Andrii Tkach 
Committed: Wed Nov 30 15:45:04 2016 +0200

--
 .../app/templates/main/admin/service_auto_start.hbs   | 10 ++
 ambari-web/app/views/main/admin.js|  3 ++-
 ambari-web/app/views/main/admin/service_auto_start.js |  4 
 .../main/admin/service_auto_start/component_auto_start.js |  1 +
 .../admin/stack_upgrade/upgrade_version_box_view_test.js  |  2 +-
 5 files changed, 14 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd562a1/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index e2eb192..a14add2 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -63,10 +63,12 @@
 
 
 {{/each}}
-
-{{t common.enableAll}} |
-{{t common.disableAll}}
-
+{{#isAuthorized "SERVICE.START_STOP, 
CLUSTER.MODIFY_CONFIGS"}}
+
+{{t common.enableAll}} |
+{{t common.disableAll}}
+
+{{/isAuthorized}}
 
 {{/each}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd562a1/ambari-web/app/views/main/admin.js
--
diff --git a/ambari-web/app/views/main/admin.js 
b/ambari-web/app/views/main/admin.js
index 704527b..0fa84e8 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -51,7 +51,8 @@ App.MainAdminView = Em.View.extend({
 items.push({
   name: 'serviceAutoStart',
   url: 'adminServiceAutoStart',
-  label: Em.I18n.t('admin.serviceAutoStart.title')
+  label: Em.I18n.t('admin.serviceAutoStart.title'),
+  disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
 });
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd562a1/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index 5b10d1b..51512a2 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -30,8 +30,11 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 
   savedRecoveryEnabled: false,
 
+  isDisabled: false,
+
   didInsertElement: function () {
 var self = this;
+this.set('isDisabled', !App.isAuthorized('SERVICE.START_STOP, 
CLUSTER.MODIFY_CONFIGS'));
 this.get('controller').loadClusterConfig().done(function (data) {
   var tag = [
 {
@@ -77,6 +80,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 offText: Em.I18n.t('common.disabled'),
 offColor: 'default',
 onColor: 'success',
+disabled: this.get('isDisabled'),
 handleWidth: Math.max(Em.I18n.t('common.enabled').length, 
Em.I18n.t('common.disabled').length) * 8,
 onSwitchChange: function (event, state) {
   self.updateClusterConfigs(state);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd562a1/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
--
diff --git 
a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
index ceafd21..9794d6f 100644
--- a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
@@ -56,6 +56,7 @@ 

ambari git commit: AMBARI-19030 Service Auto Start operations are permitted during Upgrade (atkach)

2016-11-30 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk d369809c9 -> 89780faba


AMBARI-19030 Service Auto Start operations are permitted during Upgrade (atkach)


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

Branch: refs/heads/trunk
Commit: 89780fabad715e971accb66c3c634cfe0030a91f
Parents: d369809
Author: Andrii Tkach 
Authored: Wed Nov 30 14:33:08 2016 +0200
Committer: Andrii Tkach 
Committed: Wed Nov 30 14:33:08 2016 +0200

--
 .../templates/main/admin/service_auto_start.hbs | 24 +++-
 ambari-web/app/views/main/admin.js  |  3 ++-
 .../app/views/main/admin/service_auto_start.js  |  5 
 .../service_auto_start/component_auto_start.js  |  1 +
 4 files changed, 21 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89780fab/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index 7334995..c5a92cf 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -80,17 +80,19 @@
 
   {{/each}}
 
-
-  
-
-
-  
-{{t common.enableAll}}
-   |
-  {{t common.disableAll}}
-
-  
-
+{{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}}
+  
+
+  
+  
+
+{{t common.enableAll}}
+ |
+{{t common.disableAll}}
+  
+
+  
+{{/isAuthorized}}
   
 
   {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/89780fab/ambari-web/app/views/main/admin.js
--
diff --git a/ambari-web/app/views/main/admin.js 
b/ambari-web/app/views/main/admin.js
index 704527b..0fa84e8 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -51,7 +51,8 @@ App.MainAdminView = Em.View.extend({
 items.push({
   name: 'serviceAutoStart',
   url: 'adminServiceAutoStart',
-  label: Em.I18n.t('admin.serviceAutoStart.title')
+  label: Em.I18n.t('admin.serviceAutoStart.title'),
+  disabled: App.get('upgradeInProgress') || App.get('upgradeHolding')
 });
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/89780fab/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index 7b4e46c..1af9845 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -27,8 +27,12 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
*/
   isLoaded: false,
 
+  isDisabled: false,
+
   didInsertElement: function () {
 var self = this;
+
+this.set('isDisabled', !App.isAuthorized('SERVICE.START_STOP, 
CLUSTER.MODIFY_CONFIGS'));
 this.get('controller').load().then(function() {
   self.set('isLoaded', true);
   self.initSwitcher();
@@ -55,6 +59,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 offText: Em.I18n.t('common.disabled'),
 offColor: 'default',
 onColor: 'success',
+disabled: this.get('isDisabled'),
 handleWidth: Math.max(Em.I18n.t('common.enabled').length, 
Em.I18n.t('common.disabled').length) * 8,
 onSwitchChange: function (event, state) {
   self.set('controller.servicesAutoStart', state);

http://git-wip-us.apache.org/repos/asf/ambari/blob/89780fab/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
--
diff --git 
a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js
index 8588b04..a1e09f2 100644
--- a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js

ambari git commit: AMBARI-19027. Manage JournalNode tweaks (onechiporenko)

2016-11-30 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 67292971c -> adde3db03


AMBARI-19027. Manage JournalNode tweaks (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: adde3db032bf538ba4c872c931c46e28feef3fc1
Parents: 6729297
Author: Oleg Nechiporenko 
Authored: Wed Nov 30 13:19:43 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Wed Nov 30 14:28:12 2016 +0200

--
 ambari-web/app/messages.js| 12 +---
 .../main/admin/highAvailability/journalNode/step2.hbs | 14 --
 2 files changed, 13 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/adde3db0/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e8517b2..7c3ccd3 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1255,7 +1255,7 @@ Em.I18n.translations = {
   'admin.kerberos.disable.notice.completed': 'Services have been successfully 
tested without kerberos environment.',
   'admin.kerberos.wizard.step1.notice.inProgress': 'Please wait while cluster 
is being unkerberized',
 
-  'admin.manageJournalNode.label': 'Manage JournalNode',
+  'admin.manageJournalNode.label': 'Manage JournalNodes',
   'admin.manageJournalNode.wizard.header': 'Manage JournalNodes Wizard',
   'admin.manageJournalNode.wizard.step1.header': 'Assign JournalNodes',
   'admin.manageJournalNode.wizard.step2.header': 'Review',
@@ -1263,14 +1263,12 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.step4.header': 'Add/Remove JournalNodes',
   'admin.manageJournalNode.wizard.step5.header': 'Format JournalNodes',
   'admin.manageJournalNode.wizard.step6.header': 'Start Active NameNode',
-  'admin.manageJournalNode.wizard.step7.header': 'BootStrap StandBy NameNode',
+  'admin.manageJournalNode.wizard.step7.header': 'BootStrap Standby NameNode',
   'admin.manageJournalNode.wizard.step8.header': 'Start All Services',
 
   'admin.manageJournalNode.wizard.step1.body': 'Add, or Remove JournalNodes',
-  'admin.manageJournalNode.wizard.step3.confirm.config.body':'' +
-  'Review Configuration Changes.' +
-  'The following lists the configuration changes that will be made by the 
Wizard to manage JournalNode. This information is for  review only .' +
-  '',
+  'admin.manageJournalNode.wizard.step3.confirm.config.body': 
'Configuration Change Review.' +
+  'As part of this process, configuration changes are required. Please review 
the changes below, and note that they are for review only.  Future steps 
in this wizard will update this configuration, and restart all services 
automatically.',
 
   'admin.manageJournalNode.wizard.step4.task0.title' : 'Stop Standby NameNode',
   'admin.manageJournalNode.wizard.step4.task1.title': 'Stop Services',
@@ -1294,7 +1292,7 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.progressPage.notice.inProgress': 'Please 
wait while JournalNodes are being deployed',
   'admin.manageJournalNode.wizard.step6.notice.inProgress': 'Please wait for 
related services to be started',
   'admin.manageJournalNode.wizard.step4.notice.inProgress': 'Please wait while 
JournalNodes are being deployed',
-  'admin.manageJournalNode.wizard.step8.notice.completed':'JournalNodes has 
been processed successfully.',
+  'admin.manageJournalNode.wizard.step8.notice.completed':'Completed update to 
JournalNodes.',
 
   'admin.manageJournalNode.wizard.step3.body':
   '' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/adde3db0/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
index de4e248..456e9ed 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
@@ -69,12 +69,14 @@
 
 
 
-{{#if controller.isLoaded}}
-{{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
-{{view App.ServiceConfigView 
isNotEditableBinding="controller.isNotEditable"}}
-{{else}}
-{{view App.SpinnerView}}
-{{/if}}
+  {{#if controller.isLoaded}}
+
+  {{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
+
+{{view App.ServiceConfigView 

ambari git commit: AMBARI-18997 ambari-server.pid might not be created on slow hardware (dsen)

2016-11-30 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 fbff7f7e4 -> 67292971c


AMBARI-18997 ambari-server.pid might not be created on slow hardware (dsen)


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

Branch: refs/heads/branch-2.5
Commit: 67292971c4b87246bb9f1df96939e89073af6dbc
Parents: fbff7f7
Author: Dmytro Sen 
Authored: Wed Nov 30 14:04:51 2016 +0200
Committer: Dmytro Sen 
Committed: Wed Nov 30 14:04:51 2016 +0200

--
 .../src/main/python/ambari_server/utils.py  | 24 ---
 .../src/main/python/ambari_server_main.py   | 44 
 .../src/test/python/TestAmbariServer.py |  4 +-
 ambari-server/src/test/python/TestUtils.py  | 26 +---
 4 files changed, 36 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/67292971/ambari-server/src/main/python/ambari_server/utils.py
--
diff --git a/ambari-server/src/main/python/ambari_server/utils.py 
b/ambari-server/src/main/python/ambari_server/utils.py
index f505444..62c93ae 100644
--- a/ambari-server/src/main/python/ambari_server/utils.py
+++ b/ambari-server/src/main/python/ambari_server/utils.py
@@ -117,19 +117,19 @@ def save_pid(pid, pidfile):
   pass
 
 
-def save_main_pid_ex(pids, pidfile, exclude_list=[], kill_exclude_list=False, 
skip_daemonize=False):
+def save_main_pid_ex(pids, pidfile, exclude_list=[], skip_daemonize=False):
   """
 Save pid which is not included to exclude_list to pidfile.
-If kill_exclude_list is set to true,  all processes in that
-list would be killed. It's might be useful to daemonize child process
 
 exclude_list contains list of full executable paths which should be 
excluded
   """
+  pid_saved = False
   try:
 pfile = open(pidfile, "w")
 for item in pids:
   if pid_exists(item["pid"]) and (item["exe"] not in exclude_list):
 pfile.write("%s\n" % item["pid"])
+pid_saved = True
 logger.info("Ambari server started with PID " + str(item["pid"]))
   if pid_exists(item["pid"]) and (item["exe"] in exclude_list) and not 
skip_daemonize:
 try:
@@ -145,23 +145,13 @@ def save_main_pid_ex(pids, pidfile, exclude_list=[], 
kill_exclude_list=False, sk
 except Exception as e:
   logger.error("Failed to close PID file " + pidfile + " due to " + str(e))
   pass
+  return pid_saved
 
-
-def wait_for_pid(pids, timeout):
+def get_live_pids_count(pids):
   """
-Check pid for existence during timeout
+Check pids for existence
   """
-  tstart = time.time()
-  pid_live = 0
-  while int(time.time()-tstart) <= timeout and len(pids) > 0:
-sys.stdout.write('.')
-sys.stdout.flush()
-pid_live = 0
-for item in pids:
-  if pid_exists(item["pid"]):
-pid_live += 1
-time.sleep(1)
-  return pid_live
+  return len([pid for pid in pids if pid_exists(pid)])
 
 
 def get_symlink_path(path_to_link):

http://git-wip-us.apache.org/repos/asf/ambari/blob/67292971/ambari-server/src/main/python/ambari_server_main.py
--
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index b35cfc9..572de4e 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -38,8 +38,8 @@ from ambari_server.serverUtils import refresh_stack_hash
 from ambari_server.setupHttps import get_fqdn
 from ambari_server.setupSecurity import generate_env, \
   ensure_can_start_under_current_user
-from ambari_server.utils import check_reverse_lookup, save_pid, locate_file, 
locate_all_file_paths, looking_for_pid, wait_for_pid, \
-  save_main_pid_ex, check_exitcode
+from ambari_server.utils import check_reverse_lookup, save_pid, locate_file, 
locate_all_file_paths, looking_for_pid, \
+  save_main_pid_ex, check_exitcode, get_live_pids_count
 from ambari_server.serverClassPath import ServerClassPath
 
 logger = logging.getLogger(__name__)
@@ -101,8 +101,8 @@ SERVER_START_CMD_DEBUG_WINDOWS = "{0} " \
 "-cp {3} " \
 "org.apache.ambari.server.controller.AmbariServer"
 
-SERVER_INIT_TIMEOUT = 5
-SERVER_START_TIMEOUT = 30
+SERVER_START_TIMEOUT = 5
+SERVER_START_RETRIES = 4
 
 SERVER_PING_TIMEOUT_WINDOWS = 5
 SERVER_PING_ATTEMPTS_WINDOWS = 4
@@ -114,6 +114,7 @@ EXITCODE_NAME = "ambari-server.exitcode"
 CHECK_DATABASE_SKIPPED_PROPERTY = "check_database_skipped"
 
 AMBARI_SERVER_DIE_MSG = "Ambari Server java process died with exitcode {0}. 
Check {1} for more 

ambari git commit: AMBARI-19027. Manage JournalNode tweaks (onechiporenko)

2016-11-30 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d8ba7f1ba -> d369809c9


AMBARI-19027. Manage JournalNode tweaks (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d369809c96377fc06d33e1ef7bb1f53819e3f275
Parents: d8ba7f1
Author: Oleg Nechiporenko 
Authored: Wed Nov 30 13:19:43 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Wed Nov 30 13:58:05 2016 +0200

--
 ambari-web/app/messages.js  | 12 +---
 .../main/admin/highAvailability/journalNode/step2.hbs   |  2 ++
 2 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d369809c/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index aa43687..a16d0ea 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1292,7 +1292,7 @@ Em.I18n.translations = {
   'admin.kerberos.disable.notice.completed': 'Services have been successfully 
tested without kerberos environment.',
   'admin.kerberos.wizard.step1.notice.inProgress': 'Please wait while cluster 
is being unkerberized',
 
-  'admin.manageJournalNode.label': 'Manage JournalNode',
+  'admin.manageJournalNode.label': 'Manage JournalNodes',
   'admin.manageJournalNode.wizard.header': 'Manage JournalNodes Wizard',
   'admin.manageJournalNode.wizard.step1.header': 'Assign JournalNodes',
   'admin.manageJournalNode.wizard.step2.header': 'Review',
@@ -1300,14 +1300,12 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.step4.header': 'Add/Remove JournalNodes',
   'admin.manageJournalNode.wizard.step5.header': 'Format JournalNodes',
   'admin.manageJournalNode.wizard.step6.header': 'Start Active NameNode',
-  'admin.manageJournalNode.wizard.step7.header': 'BootStrap StandBy NameNode',
+  'admin.manageJournalNode.wizard.step7.header': 'BootStrap Standby NameNode',
   'admin.manageJournalNode.wizard.step8.header': 'Start All Services',
 
   'admin.manageJournalNode.wizard.step1.body': 'Add, or Remove JournalNodes',
-  'admin.manageJournalNode.wizard.step3.confirm.config.body':'' +
-  'Review Configuration Changes.' +
-  'The following lists the configuration changes that will be made by the 
Wizard to manage JournalNode. This information is for  review only .' +
-  '',
+  'admin.manageJournalNode.wizard.step3.confirm.config.body': 
'Configuration Change Review.' +
+  'As part of this process, configuration changes are required. Please review 
the changes below, and note that they are for review only.  Future steps 
in this wizard will update this configuration, and restart all services 
automatically.',
 
   'admin.manageJournalNode.wizard.step4.task0.title' : 'Stop Standby NameNode',
   'admin.manageJournalNode.wizard.step4.task1.title': 'Stop Services',
@@ -1331,7 +1329,7 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.progressPage.notice.inProgress': 'Please 
wait while JournalNodes are being deployed',
   'admin.manageJournalNode.wizard.step6.notice.inProgress': 'Please wait for 
related services to be started',
   'admin.manageJournalNode.wizard.step4.notice.inProgress': 'Please wait while 
JournalNodes are being deployed',
-  'admin.manageJournalNode.wizard.step8.notice.completed':'JournalNodes has 
been processed successfully.',
+  'admin.manageJournalNode.wizard.step8.notice.completed':'Completed update to 
JournalNodes.',
 
   'admin.manageJournalNode.wizard.step3.body':
   '' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/d369809c/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
index 547d364..0cd177d 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
@@ -69,7 +69,9 @@
 
   
 {{#if controller.isLoaded}}
+  
 {{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
+  
 {{view App.ServiceConfigView 
isNotEditableBinding="controller.isNotEditable"}}
 {{else}}
 {{view App.SpinnerView}}



ambari git commit: AMBARI-18997 ambari-server.pid might not be created on slow hardware (dsen)

2016-11-30 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 1fb8d0799 -> d8ba7f1ba


AMBARI-18997 ambari-server.pid might not be created on slow hardware (dsen)


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

Branch: refs/heads/trunk
Commit: d8ba7f1bad5f9bb96256a5ca64c0568d74b874f8
Parents: 1fb8d07
Author: Dmytro Sen 
Authored: Wed Nov 30 13:50:37 2016 +0200
Committer: Dmytro Sen 
Committed: Wed Nov 30 13:50:37 2016 +0200

--
 .../src/main/python/ambari_server/utils.py  | 60 -
 .../src/main/python/ambari_server_main.py   | 70 ++--
 .../src/test/python/TestAmbariServer.py |  6 +-
 ambari-server/src/test/python/TestUtils.py  | 37 +--
 4 files changed, 66 insertions(+), 107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8ba7f1b/ambari-server/src/main/python/ambari_server/utils.py
--
diff --git a/ambari-server/src/main/python/ambari_server/utils.py 
b/ambari-server/src/main/python/ambari_server/utils.py
index 5188a48..26e59ae 100644
--- a/ambari-server/src/main/python/ambari_server/utils.py
+++ b/ambari-server/src/main/python/ambari_server/utils.py
@@ -119,19 +119,19 @@ def save_pid(pid, pidfile):
   pass
 
 
-def save_main_pid_ex(pids, pidfile, exclude_list=[], kill_exclude_list=False, 
skip_daemonize=False):
+def save_main_pid_ex(pids, pidfile, exclude_list=[], skip_daemonize=False):
   """
 Save pid which is not included to exclude_list to pidfile.
-If kill_exclude_list is set to true,  all processes in that
-list would be killed. It's might be useful to daemonize child process
 
 exclude_list contains list of full executable paths which should be 
excluded
   """
+  pid_saved = False
   try:
 pfile = open(pidfile, "w")
 for item in pids:
   if pid_exists(item["pid"]) and (item["exe"] not in exclude_list):
 pfile.write("%s\n" % item["pid"])
+pid_saved = True
 logger.info("Ambari server started with PID " + str(item["pid"]))
   if pid_exists(item["pid"]) and (item["exe"] in exclude_list) and not 
skip_daemonize:
 try:
@@ -147,67 +147,33 @@ def save_main_pid_ex(pids, pidfile, exclude_list=[], 
kill_exclude_list=False, sk
 except Exception as e:
   logger.error("Failed to close PID file " + pidfile + " due to " + str(e))
   pass
+  return pid_saved
 
-
-def wait_for_pid(pids, server_init_timeout, occupy_port_timeout, 
init_web_ui_timeout,
- server_out_file, db_check_log, properties):
+def get_live_pids_count(pids):
   """
-Check pid for existence during timeout
+Check pids for existence
   """
-  from ambari_server.serverConfiguration import get_ambari_server_ui_port
-  ambari_server_ui_port = int(get_ambari_server_ui_port(properties))
-  server_ui_port_occupied = False
-  tstart = time.time()
-  pid_live = 0
-  while int(time.time()-tstart) <= occupy_port_timeout and len(pids) > 0:
-sys.stdout.write('.')
-sys.stdout.flush()
-pid_live = 0
-for item in pids:
-  if pid_exists(item["pid"]):
-pid_live += 1
-time.sleep(1)
+  return len([pid for pid in pids if pid_exists(pid)])
+
+def wait_for_ui_start(ambari_server_ui_port, timeout=1):
 
+  tstart = time.time()
+  while int(time.time()-tstart) <= timeout:
 try:
   sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   sock.settimeout(1)
   sock.connect(('localhost', ambari_server_ui_port))
   print "\nServer started listening on " + str(ambari_server_ui_port)
-  server_ui_port_occupied = True
-  break
+  return True
 except Exception as e:
   #print str(e)
   pass
 
-  if 'Database consistency check: failed' in open(server_out_file).read():
-print "\nDB configs consistency check failed. Run \"ambari-server start 
--skip-database-check\" to skip. " \
-  "If you use this \"--skip-database-check\" option, do not make any 
changes to your cluster topology " \
-  "or perform a cluster upgrade until you correct the database 
consistency issues. See " + \
-  db_check_log + "for more details on the consistency issues."
-  elif 'Database consistency check: warning' in open(server_out_file).read():
-print "\nDB configs consistency check found warnings. See " + db_check_log 
+ " for more details."
-  else:
-print "\nDB configs consistency check: no errors and warnings were found."
-
-
-  if not server_ui_port_occupied:
-raise FatalException(1, "Server not yet listening on http port " + 
str(ambari_server_ui_port) +
-   

ambari git commit: AMBARI-18979. Optimize loading of views in cloud environments (Laszlo Puskas via magyari_sandor)

2016-11-30 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8036eb247 -> fbff7f7e4


AMBARI-18979. Optimize loading of views in cloud environments (Laszlo Puskas 
via magyari_sandor)


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

Branch: refs/heads/branch-2.5
Commit: fbff7f7e4d1574fcd25bd6c0384a5bbf71d98d35
Parents: 8036eb2
Author: Laszlo Puskas 
Authored: Fri Nov 25 17:35:42 2016 +0100
Committer: Sandor Magyari 
Committed: Wed Nov 30 09:09:49 2016 +0100

--
 .../server/configuration/Configuration.java |  23 +-
 .../ambari/server/events/AmbariEvent.java   |   5 +
 .../events/ClusterConfigFinishedEvent.java  |  53 +++
 .../ambari/server/topology/TopologyManager.java |  16 +-
 .../ambari/server/view/ViewExtractor.java   |   2 +-
 .../apache/ambari/server/view/ViewRegistry.java | 381 +++
 .../ClusterDeployWithStartOnlyTest.java |   2 +-
 ...InstallWithoutStartOnComponentLevelTest.java |   2 +-
 .../ClusterInstallWithoutStartTest.java |   2 +-
 .../ambari/server/view/ViewRegistryTest.java|   2 +
 10 files changed, 314 insertions(+), 174 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fbff7f7e/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 4a322e0..ef35ce8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -1839,6 +1839,22 @@ public class Configuration {
   "server.stages.parallel", Boolean.TRUE);
 
   /**
+   *
+   * Property driving the view extraction.
+   * It only applies to  blueprint deployments.
+   *
+   * If set to TRUE on ambari-server startup only the system views are loaded; 
non-system views are extracted upon a cluster
+   * creation request is received and the cluster configuration is 
successfully performed
+   *
+   * It is advised to use this property only in cases when ambari-server 
startup time is critical (eg. cloud environments)
+   *
+   * By default this is FALSE so all views are extracted and deployed at 
server startup.
+   */
+  @Markdown(description = "Drives view extraction in case of blueprint 
deployments; non-system views are deployed when cluster configuration is 
successful")
+  public static final ConfigurationProperty 
VIEW_EXTRACT_AFTER_CLUSTER_CONFIG =  new 
ConfigurationProperty<>("view.extract-after-cluster-config", Boolean.FALSE);
+
+
+  /**
* In case this is set to DEPENDENCY_ORDERED one stage is created for each 
request and command dependencies are
* handled directly by ActionScheduler. In case of STAGE (which is the 
default) one or more stages are
* created depending on dependencies.
@@ -4286,6 +4302,11 @@ public class Configuration {
 return Integer.parseInt(getProperty(VIEW_REQUEST_THREADPOOL_MAX_SIZE));
   }
 
+  public Boolean extractViewsAfterClusterConfig() {
+return 
Boolean.parseBoolean(getProperty(VIEW_EXTRACT_AFTER_CLUSTER_CONFIG));
+  }
+
+
   /**
* Get the time, in ms, that a request to a view will wait for an available
* thread to handle the request before returning an error.
@@ -5605,7 +5626,7 @@ public class Configuration {
 String acceptors = getProperty(SRVR_API_ACCEPTOR_THREAD_COUNT);
 return StringUtils.isEmpty(acceptors) ? null : Integer.parseInt(acceptors);
   }
- 
+
   public String getPamConfigurationFile() {
 return getProperty(PAM_CONFIGURATION_FILE);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fbff7f7e/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
index 7ec5972..868ce3f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
@@ -128,6 +128,11 @@ public abstract class AmbariEvent {
 CLUSTER_CONFIG_CHANGED,
 
 /**
+ * Cluster configuration finished.
+ */
+CLUSTER_CONFIG_FINISHED,
+
+/**
  * Metrics Collector force refresh needed.
  */