ambari git commit: AMBARI-18502: Logging of ambari agent scheduling activities in debug mode (Ranjan Banerjee via Nahappan Somasundaram)

2016-10-10 Thread smnaha
Repository: ambari
Updated Branches:
  refs/heads/trunk 6587fda47 -> 3e4b368f9


AMBARI-18502: Logging of ambari agent scheduling activities in debug mode 
(Ranjan Banerjee via Nahappan Somasundaram)


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

Branch: refs/heads/trunk
Commit: 3e4b368f9bde259b29d3a2e97fd84e773af434c3
Parents: 6587fda
Author: Nahappan Somasundaram 
Authored: Mon Oct 10 20:47:32 2016 -0700
Committer: Nahappan Somasundaram 
Committed: Mon Oct 10 20:47:32 2016 -0700

--
 ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py  | 1 +
 ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py | 1 +
 2 files changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py 
b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
index 35460b2..f787a2d 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
@@ -544,6 +544,7 @@ class Scheduler(object):
 for job in tuple(jobstore.jobs):
 run_times = job.get_run_times(now)
 if run_times:
+logger.debug('Scheduler submitting job %s to run', 
job.name)
 self._threadpool.submit(self._run_job, job, run_times)
 
 # Increase the job's run count

http://git-wip-us.apache.org/repos/asf/ambari/blob/3e4b368f/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
--
diff --git 
a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py 
b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
index 6cd7ce2..cb19888 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
@@ -83,6 +83,7 @@ class ThreadPool(object):
 break
 
 try:
+logger.debug('Worker thread starting job %s', args[0])
 func(*args, **kwargs)
 except:
 logger.exception('Error in worker thread')



[07/11] ambari git commit: AMBARI-18562 Cannot update repository on the UI. (atkach)

2016-10-10 Thread jonathanhurley
AMBARI-18562 Cannot update repository on the UI. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: da7b2ae1f72dc3e264e2ad0919fe6204de9d9b97
Parents: 24161ed
Author: Andrii Tkach 
Authored: Mon Oct 10 16:44:35 2016 +0300
Committer: Andrii Tkach 
Committed: Mon Oct 10 18:42:54 2016 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  | 56 
 .../admin/stack_and_upgrade_controller_test.js  | 45 +++-
 2 files changed, 66 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 56a7a61..d00a652 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1484,38 +1484,48 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 if (os.get('isSelected')) {
   os.get('repositories').forEach(function (repo) {
 totalCalls++;
-App.ajax.send({
-  name: 'admin.stack_versions.validate.repo',
-  sender: this,
-  data: {
-repo: repo,
-repoId: repo.get('repoId'),
-baseUrl: repo.get('baseUrl'),
-osType: os.get('osType'),
-stackName: App.get('currentStackName'),
-stackVersion: stackVersionNumber
-  }
+this.validationCall(repo, os, stackVersionNumber)
+.success(function () {
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
 })
-  .success(function () {
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  })
-  .error(function () {
-repo.set('hasError', true);
-invalidUrls.push(repo);
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  });
-  });
+.error(function () {
+  repo.set('hasError', true);
+  invalidUrls.push(repo);
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
+});
+  }, this);
 } else {
   return deferred.resolve(invalidUrls);
 }
-  });
+  }, this);
 }
 return deferred.promise();
   },
 
   /**
+   *
+   * @param {Em.Object} repo
+   * @param {Em.Object} os
+   * @param {string} stackVersionNumber
+   */
+  validationCall: function(repo, os, stackVersionNumber) {
+return App.ajax.send({
+  name: 'admin.stack_versions.validate.repo',
+  sender: this,
+  data: {
+repo: repo,
+repoId: repo.get('repoId'),
+baseUrl: repo.get('baseUrl'),
+osType: os.get('osType'),
+stackName: App.get('currentStackName'),
+stackVersion: stackVersionNumber
+  }
+})
+  },
+
+  /**
* success callback for installRepoVersion()
* saves request id to the db
* @param data

http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 12d0da3..be4a3b0 100644
--- 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -1404,24 +1404,45 @@ describe('App.MainAdminStackAndUpgradeController', 
function() {
 
   describe("#validateRepoVersions()", function () {
 
-it("skip validation", function () {
+beforeEach(function() {
+  sinon.stub(controller, 'validationCall').returns({
+success: function() {
+  return {error: Em.K}
+}
+  });
+  sinon.stub(controller, 'getStackVersionNumber').returns('v1')
+});
+
+afterEach(function() {
+  controller.validationCall.restore();
+  controller.getStackVersionNumber.restore();
+});
+
+
+it("validationCall 

[02/11] ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)

2016-10-10 Thread jonathanhurley
AMBARI-18560. Add more logging to track what condition resulted in skipping 
agent commands. (stoader)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 2d1d5f9b00e39a137c5aea8341436f408975cf82
Parents: 58afcf9
Author: Toader, Sebastian 
Authored: Mon Oct 10 16:06:55 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 16:06:55 2016 +0200

--
 .../AmbariManagementControllerImpl.java |  2 +-
 .../controller/ServiceComponentHostRequest.java |  4 +-
 .../internal/HostComponentResourceProvider.java | 44 ++--
 3 files changed, 27 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/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 1fc9dbf..ef4fc33 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
@@ -2474,7 +2474,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 if ((changedServices == null || changedServices.isEmpty())
 && (changedComps == null || changedComps.isEmpty())
 && (changedScHosts == null || changedScHosts.isEmpty())) {
-  LOG.debug("Created 0 stages");
+  LOG.info("Created 0 stages");
   return requestStages;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 73cedb4..4a07804 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -182,7 +182,9 @@ public class ServiceComponentHostRequest {
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
   .append(", staleConfig=").append(staleConfig)
-  .append(", adminState=").append(adminState).append("}");
+  .append(", adminState=").append(adminState)
+  .append(", maintenanceState=").append(maintenanceState)
+  .append("}");
 return sb.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index 85a4949..4f279c8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   }
 
   if (newState == null) {
-logComponentInfo("Nothing to do for new updateServiceComponentHost", 
request, oldState, null);
+LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for 
new updateServiceComponentHost", request, oldState, null));
 continue;
   }
 
@@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   if (sc.isClientComponent() && newState == State.STARTED &&
 
!requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) {
 ignoredScHosts.add(sch);
-logComponentInfo("Ignoring ServiceComponentHost", request, 
sch.getState(), newState);
+LOG.info(getServiceComponentRequestInfoLogMessage("Ignoring 
ServiceComponentHost as STARTED new desired state for client components is not 
valid", request, 

[06/11] ambari git commit: AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread jonathanhurley
AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 
(Balázs Bence Sári 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/24161edf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24161edf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24161edf

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 24161edf9f8a81592b120640bfa75a6ef3b1e0a1
Parents: 0a61db5
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:37:09 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:37:09 2016 +0200

--
 .../custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/24161edf/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
index deb58de..fac533d 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
@@ -23,6 +23,13 @@
 MSFT_R
 
 
+
+
+http://PLEASE_ENTER_REPO_URL
+MSFT_R-8.0
+MSFT_R
+
+
 
 
 http://PLEASE_ENTER_REPO_URL



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

2016-10-10 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/ed2018bf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed2018bf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed2018bf

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: ed2018bf06ec5ee18eb3c0c618f664db0d058025
Parents: 5cf5c83 6587fda
Author: Jonathan Hurley 
Authored: Mon Oct 10 20:37:39 2016 -0400
Committer: Jonathan Hurley 
Committed: Mon Oct 10 20:37:39 2016 -0400

--
 ambari-server/conf/unix/ambari.properties   |   6 +
 ambari-server/conf/unix/install-helper.sh   |   1 +
 ambari-server/conf/windows/ambari.properties|   6 +
 ambari-server/sbin/ambari-server|   4 +-
 .../server/configuration/Configuration.java | 135 +++
 .../AmbariManagementControllerImpl.java |   2 +-
 .../server/controller/KerberosHelperImpl.java   |   6 +-
 .../controller/ServiceComponentHostRequest.java |   4 +-
 .../BlueprintConfigurationProcessor.java| 113 
 .../internal/HostComponentResourceProvider.java |  44 +++---
 .../security/AbstractSecurityHeaderFilter.java  |  43 ++
 .../AmbariServerSecurityHeaderFilter.java   |   3 +
 .../AmbariViewsSecurityHeaderFilter.java|   3 +
 .../server/serveraction/ServerAction.java   |   6 +
 .../BlueprintConfigurationProcessorTest.java|  82 +++
 .../AbstractSecurityHeaderFilterTest.java   |  38 +-
 .../AmbariServerSecurityHeaderFilterTest.java   |   7 +
 .../AmbariViewsSecurityHeaderFilterTest.java|   6 +
 .../main/admin/stack_and_upgrade_controller.js  |  56 
 ambari-web/app/messages.js  |   1 +
 ambari-web/app/routes/add_service_routes.js |  24 
 .../configs/service_configs_by_category_view.js |  12 +-
 .../admin/stack_and_upgrade_controller_test.js  |  45 +--
 .../8.0.5/package/scripts/microsoft_r.py|  11 +-
 .../MICROSOFT_R/8.0.5/metainfo.xml  |  19 +++
 .../MICROSOFT_R/8.0.5/repos/repoinfo.xml|   7 +
 26 files changed, 583 insertions(+), 101 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ed2018bf/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--



[04/11] ambari git commit: AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta Ravindran via rlevas)

2016-10-10 Thread jonathanhurley
AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta 
Ravindran via rlevas)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 34c5686c3a0f80a5c7b78ddf05bb41cb13202438
Parents: a80c5a2
Author: Sangeeta Ravindran 
Authored: Mon Oct 10 11:05:40 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:09:58 2016 -0400

--
 ambari-server/conf/unix/ambari.properties   |   6 +
 ambari-server/conf/windows/ambari.properties|   6 +
 .../server/configuration/Configuration.java | 135 +++
 .../security/AbstractSecurityHeaderFilter.java  |  43 ++
 .../AmbariServerSecurityHeaderFilter.java   |   3 +
 .../AmbariViewsSecurityHeaderFilter.java|   3 +
 .../AbstractSecurityHeaderFilterTest.java   |  38 +-
 .../AmbariServerSecurityHeaderFilterTest.java   |   7 +
 .../AmbariViewsSecurityHeaderFilterTest.java|   6 +
 9 files changed, 246 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/unix/ambari.properties
--
diff --git a/ambari-server/conf/unix/ambari.properties 
b/ambari-server/conf/unix/ambari.properties
index 4dcbe99..371653f 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -113,11 +113,17 @@ rolling.upgrade.skip.packages.prefixes=
 http.strict-transport-security=max-age=31536000
 http.x-xss-protection=1; mode=block
 http.x-frame-options=DENY
+http.x-content-type-options=nosniff
+http.cache-control=no-store
+http.pragma=no-cache
 
 # HTTP Header settings for Ambari Views
 views.http.strict-transport-security=max-age=31536000
 views.http.x-xss-protection=1; mode=block
 views.http.x-frame-options=SAMEORIGIN
+views.http.x-content-type-options=nosniff
+views.http.cache-control=no-store
+views.http.pragma=no-cache
 
 mpacks.staging.path=$ROOT/var/lib/ambari-server/resources/mpacks
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/windows/ambari.properties
--
diff --git a/ambari-server/conf/windows/ambari.properties 
b/ambari-server/conf/windows/ambari.properties
index 64cce3b..c1c0a99 100644
--- a/ambari-server/conf/windows/ambari.properties
+++ b/ambari-server/conf/windows/ambari.properties
@@ -93,10 +93,16 @@ ulimit.open.files=1
 http.strict-transport-security=max-age=31536000
 http.x-xss-protection=1; mode=block
 http.x-frame-options=DENY
+http.x-content-type-options=nosniff
+http.cache-control=no-store
+http.pragma=no-cache
 
 # HTTP Header settings for Ambari Views
 views.http.strict-transport-security=max-age=31536000
 views.http.x-xss-protection=1; mode=block
 views.http.x-frame-options=SAMEORIGIN
+views.http.x-content-type-options=nosniff
+views.http.cache-control=no-store
+views.http.pragma=no-cache
 
 mpacks.staging.path=resources\\mpacks

http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/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 2e850ef..e976f45 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
@@ -2182,6 +2182,27 @@ public class Configuration {
   "http.x-xss-protection", "1; mode=block");
 
   /**
+   * The value that will be used to set the {@code X-Content-Type} HTTP 
response header.
+   */
+  @Markdown(description = "The value that will be used to set the 
`X-CONTENT-TYPE` HTTP response header.")
+  public static final ConfigurationProperty 
HTTP_X_CONTENT_TYPE_HEADER_VALUE = new ConfigurationProperty<>(
+  "http.x-content-type-options", "nosniff");
+
+  /**
+   * The value that will be used to set the {@code Cache-Control} HTTP 
response header.
+   */
+  @Markdown(description = "The value that will be used to set the 
`Cache-Control` HTTP response header.")
+  public static final ConfigurationProperty 
HTTP_CACHE_CONTROL_HEADER_VALUE = new ConfigurationProperty<>(
+  "http.cache-control", "no-store");
+
+  /**
+   * The value that will be used to set the {@code PRAGMA} HTTP response 
header.
+   */
+  

[08/11] ambari git commit: AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread jonathanhurley
AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs 
Bence Sári 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/0d7689d8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d7689d8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d7689d8

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 0d7689d844c1099facc6f6c6c10ba19f786de28a
Parents: da7b2ae
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:49:51 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:49:51 2016 +0200

--
 .../8.0.5/package/scripts/microsoft_r.py | 11 +--
 .../MICROSOFT_R/8.0.5/metainfo.xml   | 19 +++
 2 files changed, 20 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
index 382bd0f..f6eb33e 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
@@ -22,22 +22,13 @@ from resource_management.core.logger import Logger
 from resource_management.core.resources import Package
 
 
-rpms = ['microsoft-r-server-mro-8.0',
-'microsoft-r-server-intel-mkl-8.0',
-'microsoft-r-server-packages-8.0',
-'microsoft-r-server-hadoop-8.0']
-
 class MicrosoftR(Script):
 
   def install(self, env):
 Logger.info('Installing R Server Client...')
 tmp_dir = Script.tmp_dir
 Logger.debug('Using temp dir: {0}'.format(tmp_dir))
-
-for rpm in rpms:
-  Logger.info('Installing {0}'.format(rpm))
-  Package(rpm)
-
+self.install_packages(env)
 Logger.info('Installed R Server')
 
   def configure(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
index 31d5225..9470d22 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
@@ -23,6 +23,25 @@
   MICROSOFT_R
   common-services/MICROSOFT_R/8.0.5
   8.0.5.0
+  
+
+  redhat6,redhat7,suse11
+
+  
+microsoft-r-server-mro-8.0
+  
+  
+microsoft-r-server-intel-mkl-8.0
+  
+  
+microsoft-r-server-packages-8.0
+  
+  
+microsoft-r-server-hadoop-8.0
+  
+
+
+  
 
   
 



[10/11] ambari git commit: AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I click the close (X) on the wizard, the service will only get INSTALLED not STARTED. (Vivek Ratn

2016-10-10 Thread jonathanhurley
AMBARI-18559 At "Add Service Wizard", when the installation is going on, if I 
click the close (X) on the wizard, the service will only get INSTALLED not 
STARTED. (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 6587fda470bcf063027e55b315292018dc1e64b4
Parents: 8f51c93
Author: Zhe (Joe) Wang 
Authored: Mon Oct 10 16:17:56 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 10 16:17:56 2016 -0700

--
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/routes/add_service_routes.js | 24 
 2 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 5eafad2..7150081 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2101,6 +2101,7 @@ Em.I18n.translations = {
   'services.service.widgets.list-widget.nothingSelected': 'Nothing selected',
 
   'services.add.header':'Add Service Wizard',
+  'services.add.warning': 'Closing this dialog will continue to install the 
selected service(s) in the background, but the installed services need to be 
started manually. Are you sure you want to quit?',
   'services.reassign.header':'Move Master Wizard',
   'services.service.add':'Add Service',
   'services.service.startAll':'Start All',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6587fda4/ambari-web/app/routes/add_service_routes.js
--
diff --git a/ambari-web/app/routes/add_service_routes.js 
b/ambari-web/app/routes/add_service_routes.js
index 30c8e07..692d186 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -46,6 +46,16 @@ module.exports = App.WizardRoute.extend({
 App.router.transitionTo('main.services.index');
   },
   onClose: function () {
+var controller = router.get('addServiceController');
+var currentStep = controller.get('currentStep');
+if(currentStep == '7') {
+  // Show a warning popup
+  this.showWarningPopup();
+} else {
+  this.afterWarning();
+}
+  },
+  afterWarning: function () {
 this.set('showCloseButton', false); // prevent user to click 
"Close" many times
 App.router.get('updateController').set('isWorking', true);
 App.router.get('updateController').updateServices(function () {
@@ -54,6 +64,20 @@ module.exports = App.WizardRoute.extend({
 var exitPath = 
addServiceController.getDBProperty('onClosePath') || 'main.services.index';
 addServiceController.resetOnClose(addServiceController, 
exitPath);
   },
+  showWarningPopup: function() {
+var mainPopupContext = this;
+App.ModalPopup.show({
+  encodeBody: false,
+  header: Em.I18n.t('common.warning'),
+  primaryClass: 'btn-warning',
+  secondary: Em.I18n.t('form.cancel'),
+  body: Em.I18n.t('services.add.warning'),
+  onPrimary: function () {
+this.hide();
+mainPopupContext.afterWarning();
+  }
+});
+  },
   didInsertElement: function () {
 this._super();
 this.fitHeight();



[05/11] ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)

2016-10-10 Thread jonathanhurley
AMBARI-18545. Kerberos server actions should not timeout in minutes as 
specified in configuration (rlevas)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 0a61db5666f3ee8b82cdab0d50a1c8450b177ae7
Parents: 34c5686
Author: Robert Levas 
Authored: Mon Oct 10 11:16:01 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:16:01 2016 -0400

--
 .../apache/ambari/server/controller/KerberosHelperImpl.java| 6 +++---
 .../org/apache/ambari/server/serveraction/ServerAction.java| 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index cd4a0b5..e15965b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -2890,7 +2890,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2913,7 +2913,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Destroy Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2959,7 +2959,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Keytabs",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
index b9bf5ce..7c69f52 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
@@ -33,6 +33,12 @@ public interface ServerAction {
   public static final String ACTION_NAME  = "ACTION_NAME";
   public static final String ACTION_USER_NAME = "ACTION_USER_NAME";
 
+  /**
+   * The default timeout (in seconds) to use for potentially long running 
tasks such as creating
+   * Kerberos principals and generating Kerberos keytab files
+   */
+  int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000;
+
 
   /**
* Gets the ExecutionCommand property of this ServerAction.



[01/11] ambari git commit: AMBARI-18546. BP format does not generate property oozie.service.JPAService.jdbc.url.(vbrodetskyi)

2016-10-10 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 5cf5c8349 -> ed2018bf0


AMBARI-18546. BP format does not generate property 
oozie.service.JPAService.jdbc.url.(vbrodetskyi)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 58afcf93d8445c3b1ffacdd33c1cb12a8e8414cb
Parents: 72f1f6f
Author: Vitaly Brodetskyi 
Authored: Mon Oct 10 00:22:49 2016 +0300
Committer: Vitaly Brodetskyi 
Committed: Mon Oct 10 00:22:49 2016 +0300

--
 .../BlueprintConfigurationProcessor.java| 113 ++-
 .../BlueprintConfigurationProcessorTest.java|  82 ++
 2 files changed, 169 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/58afcf93/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index ba09368..8ff568a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -84,7 +84,7 @@ public class BlueprintConfigurationProcessor {
   /**
* Single host topology updaters
*/
-  private static Map> 
singleHostTopologyUpdaters =
+  protected static Map> 
singleHostTopologyUpdaters =
   new HashMap>();
 
   /**
@@ -117,7 +117,7 @@ public class BlueprintConfigurationProcessor {
* removed from export, but do not require an update during
* cluster creation
*/
-  private static Map> 
removePropertyUpdaters =
+  private Map> removePropertyUpdaters =
 new HashMap>();
 
   /**
@@ -196,6 +196,81 @@ public class BlueprintConfigurationProcessor {
 
   public BlueprintConfigurationProcessor(ClusterTopology clusterTopology) {
 this.clusterTopology = clusterTopology;
+initRemovePropertyUpdaters();
+  }
+
+  public Map> getRemovePropertyUpdaters() 
{
+return removePropertyUpdaters;
+  }
+
+  public void initRemovePropertyUpdaters() {
+
+if (containsHostFromHostGroups("oozie-site", 
"oozie.service.JPAService.jdbc.url")) {
+  Map oozieSiteUpdaters = 
singleHostTopologyUpdaters.get("oozie-site");
+  Map oozieEnvUpdaters = 
singleHostTopologyUpdaters.get("oozie-env");
+  if (oozieSiteUpdaters == null) {
+oozieSiteUpdaters = new HashMap<>();
+  }
+  if (oozieEnvUpdaters == null) {
+oozieEnvUpdaters = new HashMap<>();
+  }
+  oozieEnvUpdaters.put("oozie_existing_mysql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieSiteUpdaters.put("oozie.service.JPAService.jdbc.url",  new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+
+  singleHostTopologyUpdaters.put("oozie-env", oozieEnvUpdaters);
+  singleHostTopologyUpdaters.put("oozie-site", oozieSiteUpdaters);
+} else {
+  Map oozieEnvOriginalValueMap = new 
HashMap();
+  Map oozieSiteOriginalValueMap = new 
HashMap();
+  // register updaters for Oozie properties that may point to an external 
DB
+  oozieEnvOriginalValueMap.put("oozie_existing_mysql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_postgresql_host", new 
OriginalValuePropertyUpdater());
+  

[03/11] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)

2016-10-10 Thread jonathanhurley
AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other 
OS's. (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: a80c5a2dbaa0c48f7df87dae6a23a027c2ab6022
Parents: 2d1d5f9
Author: Andrew Onishuk 
Authored: Mon Oct 10 17:52:36 2016 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 10 17:52:36 2016 +0300

--
 ambari-server/conf/unix/install-helper.sh | 1 +
 ambari-server/sbin/ambari-server  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/conf/unix/install-helper.sh
--
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 229e146..34ec0e9 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -102,6 +102,7 @@ do_install(){
 
   sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J"
   sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG"
+  sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE"
 
   AUTOSTART_SERVER_CMD="" 
   which chkconfig > /dev/null 2>&1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/sbin/ambari-server
--
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 762ae19..bdbdd0f 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -44,8 +44,10 @@ case "${1:-}" in
 esac
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export ROOT=`dirname $(dirname $SCRIPT_DIR)`
+# the below line (ROOT="/") is replaced by install-helper.sh. Don't 
edit/remove it.
+ROOT="/"
 ROOT=`echo $ROOT | sed 's/\/$//'`
+export ROOT
 
 export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
 export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf



[09/11] ambari git commit: AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by default upon filtering (Vivek Ratnavel Subramanian via zhewang)

2016-10-10 Thread jonathanhurley
AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by 
default upon filtering (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 8f51c9324a407fa8ce8e92e2e77ee0a250c5cbc9
Parents: 0d7689d
Author: Zhe (Joe) Wang 
Authored: Mon Oct 10 16:13:09 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 10 16:13:09 2016 -0700

--
 .../common/configs/service_configs_by_category_view.js  | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f51c932/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 3eebfea..d9a4c5c 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -305,7 +305,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   filteredCategoryConfigs: function () {
 Em.run.once(this, 'collapseCategory');
-  }.observes('categoryConfigs.@each.isHiddenByFilter'),
+  }.observes('serviceConfigs.@each.isHiddenByFilter'),
 
   collapseCategory: function () {
 if (this.get('state') === 'destroyed') return;
@@ -330,7 +330,15 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
 } else if (isInitialRendering && !filteredResult.length) {
   this.set('category.isCollapsed', true);
 }
-var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') 
+ '>.accordion-body');
+var classNames = this.get('category.name').split(' ');
+// Escape the dots in category names
+classNames = classNames.map(function(className) {
+  if(className.indexOf(".")) {
+className = className.split(".").join("\\.");
+  }
+  return className;
+});
+var categoryBlock = $('.' + classNames.join('.') + '>.accordion-body');
 this.get('category.isCollapsed') ? categoryBlock.hide() : 
categoryBlock.show();
   },
 



ambari git commit: AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by default upon filtering (Vivek Ratnavel Subramanian via zhewang)

2016-10-10 Thread zhewang
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 99668f913 -> a50861338


AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by 
default upon filtering (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-2.5
Commit: a50861338b39c61d5e7a611b150ef42d1afc1398
Parents: 99668f9
Author: Zhe (Joe) Wang 
Authored: Mon Oct 10 16:13:09 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 10 16:14:45 2016 -0700

--
 .../common/configs/service_configs_by_category_view.js  | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a5086133/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 0874872..a668634 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -305,7 +305,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   filteredCategoryConfigs: function () {
 Em.run.once(this, 'collapseCategory');
-  }.observes('categoryConfigs.@each.isHiddenByFilter'),
+  }.observes('serviceConfigs.@each.isHiddenByFilter'),
 
   collapseCategory: function () {
 if (this.get('state') === 'destroyed') return;
@@ -330,7 +330,15 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
 } else if (isInitialRendering && !filteredResult.length) {
   this.set('category.isCollapsed', true);
 }
-var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') 
+ '>.accordion-body');
+var classNames = this.get('category.name').split(' ');
+// Escape the dots in category names
+classNames = classNames.map(function(className) {
+  if(className.indexOf(".")) {
+className = className.split(".").join("\\.");
+  }
+  return className;
+});
+var categoryBlock = $('.' + classNames.join('.') + '>.accordion-body');
 this.get('category.isCollapsed') ? categoryBlock.hide() : 
categoryBlock.show();
   },
 



ambari git commit: AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by default upon filtering (Vivek Ratnavel Subramanian via zhewang)

2016-10-10 Thread zhewang
Repository: ambari
Updated Branches:
  refs/heads/trunk 0d7689d84 -> 8f51c9324


AMBARI-18534 Advanced storm-atlas-application.properties panel is not opened by 
default upon filtering (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/trunk
Commit: 8f51c9324a407fa8ce8e92e2e77ee0a250c5cbc9
Parents: 0d7689d
Author: Zhe (Joe) Wang 
Authored: Mon Oct 10 16:13:09 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 10 16:13:09 2016 -0700

--
 .../common/configs/service_configs_by_category_view.js  | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f51c932/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 3eebfea..d9a4c5c 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -305,7 +305,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   filteredCategoryConfigs: function () {
 Em.run.once(this, 'collapseCategory');
-  }.observes('categoryConfigs.@each.isHiddenByFilter'),
+  }.observes('serviceConfigs.@each.isHiddenByFilter'),
 
   collapseCategory: function () {
 if (this.get('state') === 'destroyed') return;
@@ -330,7 +330,15 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
 } else if (isInitialRendering && !filteredResult.length) {
   this.set('category.isCollapsed', true);
 }
-var categoryBlock = $('.' + this.get('category.name').split(' ').join('.') 
+ '>.accordion-body');
+var classNames = this.get('category.name').split(' ');
+// Escape the dots in category names
+classNames = classNames.map(function(className) {
+  if(className.indexOf(".")) {
+className = className.split(".").join("\\.");
+  }
+  return className;
+});
+var categoryBlock = $('.' + classNames.join('.') + '>.accordion-body');
 this.get('category.isCollapsed') ? categoryBlock.hide() : 
categoryBlock.show();
   },
 



ambari git commit: AMBARI-18557. Create Component to Repo Version db associations (ncole)

2016-10-10 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade 784c7e456 -> b31c6c285


AMBARI-18557. Create Component to Repo Version db associations (ncole)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b31c6c28563096419ae53e1584c4aa103262e6de
Parents: 784c7e4
Author: Nate Cole 
Authored: Fri Oct 7 15:13:00 2016 -0400
Committer: Nate Cole 
Committed: Mon Oct 10 14:26:41 2016 -0400

--
 .../dao/ServiceComponentDesiredStateDAO.java|  23 ++-
 .../ServiceComponentDesiredStateEntity.java |  24 +++
 .../entities/ServiceComponentVersionEntity.java | 159 +++
 .../server/upgrade/UpgradeCatalog300.java   |  41 +
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |  15 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  14 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  12 ++
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  14 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |  12 ++
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  14 +-
 .../src/main/resources/META-INF/persistence.xml |   1 +
 .../server/state/ServiceComponentTest.java  | 140 ++--
 .../server/upgrade/UpgradeCatalog300Test.java   |  99 
 13 files changed, 553 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b31c6c28/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
index cdaa6f0..987e44f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
@@ -28,6 +28,7 @@ import javax.persistence.TypedQuery;
 import org.apache.ambari.server.orm.RequiresSession;
 import 
org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.ServiceComponentHistoryEntity;
+import org.apache.ambari.server.orm.entities.ServiceComponentVersionEntity;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
@@ -175,7 +176,27 @@ public class ServiceComponentDesiredStateDAO {
 query.setParameter("serviceName", serviceName);
 query.setParameter("componentName", componentName);
 
-ServiceComponentDesiredStateEntity entity = null;
 return daoUtils.selectList(query);
   }
+
+  /**
+   * @param clusterId the cluster id
+   * @param serviceName   the service name
+   * @param componentName the component name
+   * @return the list of repository versions for a component
+   */
+  @RequiresSession
+  public List findVersions(long clusterId, 
String serviceName,
+  String componentName) {
+EntityManager entityManager = entityManagerProvider.get();
+TypedQuery query = 
entityManager.createNamedQuery(
+"ServiceComponentVersionEntity.findByComponent", 
ServiceComponentVersionEntity.class);
+
+query.setParameter("clusterId", clusterId);
+query.setParameter("serviceName", serviceName);
+query.setParameter("componentName", componentName);
+
+return daoUtils.selectList(query);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b31c6c28/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
index 61c053d..9b93517 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
@@ -117,6 +117,9 @@ public class ServiceComponentDesiredStateEntity {
   cascade = { CascadeType.ALL })
   private Collection serviceComponentHistory;
 
+  @OneToMany(mappedBy = "m_serviceComponentDesiredStateEntity", cascade = { 
CascadeType.ALL })
+  private Collection serviceComponentVersion;
+
   public Long getId() {
 return id;
   }
@@ -195,6 +198,27 @@ public class ServiceComponentDesiredStateEntity {

ambari git commit: AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 367c2c95b -> 4b45e3c86


AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 
(Balázs Bence Sári 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/4b45e3c8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b45e3c8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b45e3c8

Branch: refs/heads/branch-2.5
Commit: 4b45e3c86a593dad2a2351df4b95c0fa333198b5
Parents: 367c2c9
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:37:09 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:41:35 2016 +0200

--
 .../custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b45e3c8/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
index deb58de..fac533d 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
@@ -23,6 +23,13 @@
 MSFT_R
 
 
+
+
+http://PLEASE_ENTER_REPO_URL
+MSFT_R-8.0
+MSFT_R
+
+
 
 
 http://PLEASE_ENTER_REPO_URL



ambari git commit: AMBARI-18562 Cannot update repository on the UI. (atkach)

2016-10-10 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 24161edf9 -> da7b2ae1f


AMBARI-18562 Cannot update repository on the UI. (atkach)


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

Branch: refs/heads/trunk
Commit: da7b2ae1f72dc3e264e2ad0919fe6204de9d9b97
Parents: 24161ed
Author: Andrii Tkach 
Authored: Mon Oct 10 16:44:35 2016 +0300
Committer: Andrii Tkach 
Committed: Mon Oct 10 18:42:54 2016 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  | 56 
 .../admin/stack_and_upgrade_controller_test.js  | 45 +++-
 2 files changed, 66 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 56a7a61..d00a652 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1484,38 +1484,48 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 if (os.get('isSelected')) {
   os.get('repositories').forEach(function (repo) {
 totalCalls++;
-App.ajax.send({
-  name: 'admin.stack_versions.validate.repo',
-  sender: this,
-  data: {
-repo: repo,
-repoId: repo.get('repoId'),
-baseUrl: repo.get('baseUrl'),
-osType: os.get('osType'),
-stackName: App.get('currentStackName'),
-stackVersion: stackVersionNumber
-  }
+this.validationCall(repo, os, stackVersionNumber)
+.success(function () {
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
 })
-  .success(function () {
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  })
-  .error(function () {
-repo.set('hasError', true);
-invalidUrls.push(repo);
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  });
-  });
+.error(function () {
+  repo.set('hasError', true);
+  invalidUrls.push(repo);
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
+});
+  }, this);
 } else {
   return deferred.resolve(invalidUrls);
 }
-  });
+  }, this);
 }
 return deferred.promise();
   },
 
   /**
+   *
+   * @param {Em.Object} repo
+   * @param {Em.Object} os
+   * @param {string} stackVersionNumber
+   */
+  validationCall: function(repo, os, stackVersionNumber) {
+return App.ajax.send({
+  name: 'admin.stack_versions.validate.repo',
+  sender: this,
+  data: {
+repo: repo,
+repoId: repo.get('repoId'),
+baseUrl: repo.get('baseUrl'),
+osType: os.get('osType'),
+stackName: App.get('currentStackName'),
+stackVersion: stackVersionNumber
+  }
+})
+  },
+
+  /**
* success callback for installRepoVersion()
* saves request id to the db
* @param data

http://git-wip-us.apache.org/repos/asf/ambari/blob/da7b2ae1/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 12d0da3..be4a3b0 100644
--- 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -1404,24 +1404,45 @@ describe('App.MainAdminStackAndUpgradeController', 
function() {
 
   describe("#validateRepoVersions()", function () {
 
-it("skip validation", function () {
+beforeEach(function() {
+  sinon.stub(controller, 'validationCall').returns({
+success: function() {
+  return {error: Em.K}
+}
+  });
+  sinon.stub(controller, 'getStackVersionNumber').returns('v1')
+});
+
+afterEach(function() {
+  controller.validationCall.restore();
+  

ambari git commit: AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/trunk da7b2ae1f -> 0d7689d84


AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs 
Bence Sári 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/0d7689d8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d7689d8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d7689d8

Branch: refs/heads/trunk
Commit: 0d7689d844c1099facc6f6c6c10ba19f786de28a
Parents: da7b2ae
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:49:51 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:49:51 2016 +0200

--
 .../8.0.5/package/scripts/microsoft_r.py | 11 +--
 .../MICROSOFT_R/8.0.5/metainfo.xml   | 19 +++
 2 files changed, 20 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
index 382bd0f..f6eb33e 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
@@ -22,22 +22,13 @@ from resource_management.core.logger import Logger
 from resource_management.core.resources import Package
 
 
-rpms = ['microsoft-r-server-mro-8.0',
-'microsoft-r-server-intel-mkl-8.0',
-'microsoft-r-server-packages-8.0',
-'microsoft-r-server-hadoop-8.0']
-
 class MicrosoftR(Script):
 
   def install(self, env):
 Logger.info('Installing R Server Client...')
 tmp_dir = Script.tmp_dir
 Logger.debug('Using temp dir: {0}'.format(tmp_dir))
-
-for rpm in rpms:
-  Logger.info('Installing {0}'.format(rpm))
-  Package(rpm)
-
+self.install_packages(env)
 Logger.info('Installed R Server')
 
   def configure(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d7689d8/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
index 31d5225..9470d22 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
@@ -23,6 +23,25 @@
   MICROSOFT_R
   common-services/MICROSOFT_R/8.0.5
   8.0.5.0
+  
+
+  redhat6,redhat7,suse11
+
+  
+microsoft-r-server-mro-8.0
+  
+  
+microsoft-r-server-intel-mkl-8.0
+  
+  
+microsoft-r-server-packages-8.0
+  
+  
+microsoft-r-server-hadoop-8.0
+  
+
+
+  
 
   
 



ambari git commit: AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 eeccd3a77 -> 99668f913


AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs 
Bence Sári 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/99668f91
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99668f91
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99668f91

Branch: refs/heads/branch-2.5
Commit: 99668f91320edbf5cc24fdfdceeaa2b3988586f4
Parents: eeccd3a
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:49:51 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:52:43 2016 +0200

--
 .../8.0.5/package/scripts/microsoft_r.py | 11 +--
 .../MICROSOFT_R/8.0.5/metainfo.xml   | 19 +++
 2 files changed, 20 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/99668f91/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
index 382bd0f..f6eb33e 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
@@ -22,22 +22,13 @@ from resource_management.core.logger import Logger
 from resource_management.core.resources import Package
 
 
-rpms = ['microsoft-r-server-mro-8.0',
-'microsoft-r-server-intel-mkl-8.0',
-'microsoft-r-server-packages-8.0',
-'microsoft-r-server-hadoop-8.0']
-
 class MicrosoftR(Script):
 
   def install(self, env):
 Logger.info('Installing R Server Client...')
 tmp_dir = Script.tmp_dir
 Logger.debug('Using temp dir: {0}'.format(tmp_dir))
-
-for rpm in rpms:
-  Logger.info('Installing {0}'.format(rpm))
-  Package(rpm)
-
+self.install_packages(env)
 Logger.info('Installed R Server')
 
   def configure(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/99668f91/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
index 31d5225..9470d22 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
@@ -23,6 +23,25 @@
   MICROSOFT_R
   common-services/MICROSOFT_R/8.0.5
   8.0.5.0
+  
+
+  redhat6,redhat7,suse11
+
+  
+microsoft-r-server-mro-8.0
+  
+  
+microsoft-r-server-intel-mkl-8.0
+  
+  
+microsoft-r-server-packages-8.0
+  
+  
+microsoft-r-server-hadoop-8.0
+  
+
+
+  
 
   
 



ambari git commit: AMBARI-18562 Cannot update repository on the UI. (atkach)

2016-10-10 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 4b45e3c86 -> eeccd3a77


AMBARI-18562 Cannot update repository on the UI. (atkach)


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

Branch: refs/heads/branch-2.5
Commit: eeccd3a777245de7be690d8f8e0e510582bcc680
Parents: 4b45e3c
Author: Andrii Tkach 
Authored: Mon Oct 10 16:44:35 2016 +0300
Committer: Andrii Tkach 
Committed: Mon Oct 10 18:43:45 2016 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  | 56 
 .../admin/stack_and_upgrade_controller_test.js  | 45 +++-
 2 files changed, 66 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/eeccd3a7/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 56a7a61..d00a652 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1484,38 +1484,48 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 if (os.get('isSelected')) {
   os.get('repositories').forEach(function (repo) {
 totalCalls++;
-App.ajax.send({
-  name: 'admin.stack_versions.validate.repo',
-  sender: this,
-  data: {
-repo: repo,
-repoId: repo.get('repoId'),
-baseUrl: repo.get('baseUrl'),
-osType: os.get('osType'),
-stackName: App.get('currentStackName'),
-stackVersion: stackVersionNumber
-  }
+this.validationCall(repo, os, stackVersionNumber)
+.success(function () {
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
 })
-  .success(function () {
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  })
-  .error(function () {
-repo.set('hasError', true);
-invalidUrls.push(repo);
-totalCalls--;
-if (totalCalls === 0) deferred.resolve(invalidUrls);
-  });
-  });
+.error(function () {
+  repo.set('hasError', true);
+  invalidUrls.push(repo);
+  totalCalls--;
+  if (totalCalls === 0) deferred.resolve(invalidUrls);
+});
+  }, this);
 } else {
   return deferred.resolve(invalidUrls);
 }
-  });
+  }, this);
 }
 return deferred.promise();
   },
 
   /**
+   *
+   * @param {Em.Object} repo
+   * @param {Em.Object} os
+   * @param {string} stackVersionNumber
+   */
+  validationCall: function(repo, os, stackVersionNumber) {
+return App.ajax.send({
+  name: 'admin.stack_versions.validate.repo',
+  sender: this,
+  data: {
+repo: repo,
+repoId: repo.get('repoId'),
+baseUrl: repo.get('baseUrl'),
+osType: os.get('osType'),
+stackName: App.get('currentStackName'),
+stackVersion: stackVersionNumber
+  }
+})
+  },
+
+  /**
* success callback for installRepoVersion()
* saves request id to the db
* @param data

http://git-wip-us.apache.org/repos/asf/ambari/blob/eeccd3a7/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 12d0da3..be4a3b0 100644
--- 
a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ 
b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -1404,24 +1404,45 @@ describe('App.MainAdminStackAndUpgradeController', 
function() {
 
   describe("#validateRepoVersions()", function () {
 
-it("skip validation", function () {
+beforeEach(function() {
+  sinon.stub(controller, 'validationCall').returns({
+success: function() {
+  return {error: Em.K}
+}
+  });
+  sinon.stub(controller, 'getStackVersionNumber').returns('v1')
+});
+
+afterEach(function() {
+  controller.validationCall.restore();
+  

ambari git commit: AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 2130e7f3a -> 9196e42ec


AMBARI-18554. Improve package handling in Microsoft R Server Mpack (Balázs 
Bence Sári 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/9196e42e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9196e42e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9196e42e

Branch: refs/heads/branch-2.4
Commit: 9196e42ec9e5ce784c0a92e148ba89120c175afb
Parents: 2130e7f
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:49:51 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:51:06 2016 +0200

--
 .../8.0.5/package/scripts/microsoft_r.py | 11 +--
 .../MICROSOFT_R/8.0.5/metainfo.xml   | 19 +++
 2 files changed, 20 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9196e42e/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
index 382bd0f..f6eb33e 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.5/package/scripts/microsoft_r.py
@@ -22,22 +22,13 @@ from resource_management.core.logger import Logger
 from resource_management.core.resources import Package
 
 
-rpms = ['microsoft-r-server-mro-8.0',
-'microsoft-r-server-intel-mkl-8.0',
-'microsoft-r-server-packages-8.0',
-'microsoft-r-server-hadoop-8.0']
-
 class MicrosoftR(Script):
 
   def install(self, env):
 Logger.info('Installing R Server Client...')
 tmp_dir = Script.tmp_dir
 Logger.debug('Using temp dir: {0}'.format(tmp_dir))
-
-for rpm in rpms:
-  Logger.info('Installing {0}'.format(rpm))
-  Package(rpm)
-
+self.install_packages(env)
 Logger.info('Installed R Server')
 
   def configure(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/9196e42e/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
index 31d5225..9470d22 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/metainfo.xml
@@ -23,6 +23,25 @@
   MICROSOFT_R
   common-services/MICROSOFT_R/8.0.5
   8.0.5.0
+  
+
+  redhat6,redhat7,suse11
+
+  
+microsoft-r-server-mro-8.0
+  
+  
+microsoft-r-server-intel-mkl-8.0
+  
+  
+microsoft-r-server-packages-8.0
+  
+  
+microsoft-r-server-hadoop-8.0
+  
+
+
+  
 
   
 



ambari git commit: AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 eb9c6b431 -> 2130e7f3a


AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 
(Balázs Bence Sári 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/2130e7f3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2130e7f3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2130e7f3

Branch: refs/heads/branch-2.4
Commit: 2130e7f3af356e10d980f6178718a1c768f18b40
Parents: eb9c6b4
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:37:09 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:39:52 2016 +0200

--
 .../custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2130e7f3/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
index deb58de..fac533d 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
@@ -23,6 +23,13 @@
 MSFT_R
 
 
+
+
+http://PLEASE_ENTER_REPO_URL
+MSFT_R-8.0
+MSFT_R
+
+
 
 
 http://PLEASE_ENTER_REPO_URL



ambari git commit: AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 (Balázs Bence Sári via magyari_sandor)

2016-10-10 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/trunk 0a61db566 -> 24161edf9


AMBARI-18538. Microsoft R Server management pack should support for Redhat 7 
(Balázs Bence Sári 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/24161edf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24161edf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24161edf

Branch: refs/heads/trunk
Commit: 24161edf9f8a81592b120640bfa75a6ef3b1e0a1
Parents: 0a61db5
Author: Balázs Bence Sári 
Authored: Mon Oct 10 17:37:09 2016 +0200
Committer: Sandor Magyari 
Committed: Mon Oct 10 17:37:09 2016 +0200

--
 .../custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/24161edf/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
--
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
index deb58de..fac533d 100644
--- 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.5/repos/repoinfo.xml
@@ -23,6 +23,13 @@
 MSFT_R
 
 
+
+
+http://PLEASE_ENTER_REPO_URL
+MSFT_R-8.0
+MSFT_R
+
+
 
 
 http://PLEASE_ENTER_REPO_URL



ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)

2016-10-10 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c4e522983 -> eb9c6b431


AMBARI-18545. Kerberos server actions should not timeout in minutes as 
specified in configuration (rlevas)


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

Branch: refs/heads/branch-2.4
Commit: eb9c6b4313dfabe19e433ebd9f8d3c330bfb3f47
Parents: c4e5229
Author: Robert Levas 
Authored: Mon Oct 10 11:33:34 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:33:34 2016 -0400

--
 .../apache/ambari/server/controller/KerberosHelperImpl.java| 6 +++---
 .../org/apache/ambari/server/serveraction/ServerAction.java| 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/eb9c6b43/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 70b991a..c5fbf66 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -2758,7 +2758,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2781,7 +2781,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Destroy Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2827,7 +2827,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Keytabs",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/eb9c6b43/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
index b9bf5ce..7c69f52 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
@@ -33,6 +33,12 @@ public interface ServerAction {
   public static final String ACTION_NAME  = "ACTION_NAME";
   public static final String ACTION_USER_NAME = "ACTION_USER_NAME";
 
+  /**
+   * The default timeout (in seconds) to use for potentially long running 
tasks such as creating
+   * Kerberos principals and generating Kerberos keytab files
+   */
+  int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000;
+
 
   /**
* Gets the ExecutionCommand property of this ServerAction.



ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)

2016-10-10 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 551958219 -> 367c2c95b


AMBARI-18545. Kerberos server actions should not timeout in minutes as 
specified in configuration (rlevas)


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

Branch: refs/heads/branch-2.5
Commit: 367c2c95b260fc41fc6708549efe9cbcb0b3bd95
Parents: 5519582
Author: Robert Levas 
Authored: Mon Oct 10 11:17:07 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:17:07 2016 -0400

--
 .../apache/ambari/server/controller/KerberosHelperImpl.java| 6 +++---
 .../org/apache/ambari/server/serveraction/ServerAction.java| 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/367c2c95/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 638af8c..7556a77 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -2889,7 +2889,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2912,7 +2912,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Destroy Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2958,7 +2958,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Keytabs",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/367c2c95/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
index b9bf5ce..7c69f52 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
@@ -33,6 +33,12 @@ public interface ServerAction {
   public static final String ACTION_NAME  = "ACTION_NAME";
   public static final String ACTION_USER_NAME = "ACTION_USER_NAME";
 
+  /**
+   * The default timeout (in seconds) to use for potentially long running 
tasks such as creating
+   * Kerberos principals and generating Kerberos keytab files
+   */
+  int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000;
+
 
   /**
* Gets the ExecutionCommand property of this ServerAction.



ambari git commit: AMBARI-18545. Kerberos server actions should not timeout in minutes as specified in configuration (rlevas)

2016-10-10 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 34c5686c3 -> 0a61db566


AMBARI-18545. Kerberos server actions should not timeout in minutes as 
specified in configuration (rlevas)


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

Branch: refs/heads/trunk
Commit: 0a61db5666f3ee8b82cdab0d50a1c8450b177ae7
Parents: 34c5686
Author: Robert Levas 
Authored: Mon Oct 10 11:16:01 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:16:01 2016 -0400

--
 .../apache/ambari/server/controller/KerberosHelperImpl.java| 6 +++---
 .../org/apache/ambari/server/serveraction/ServerAction.java| 6 ++
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index cd4a0b5..e15965b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -2890,7 +2890,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2913,7 +2913,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Destroy Principals",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);
@@ -2959,7 +2959,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   event,
   commandParameters,
   "Create Keytabs",
-  configuration.getDefaultServerTaskTimeout());
+  Math.max(ServerAction.DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, 
configuration.getDefaultServerTaskTimeout()));
 
   RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
   roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a61db56/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
index b9bf5ce..7c69f52 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/ServerAction.java
@@ -33,6 +33,12 @@ public interface ServerAction {
   public static final String ACTION_NAME  = "ACTION_NAME";
   public static final String ACTION_USER_NAME = "ACTION_USER_NAME";
 
+  /**
+   * The default timeout (in seconds) to use for potentially long running 
tasks such as creating
+   * Kerberos principals and generating Kerberos keytab files
+   */
+  int DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS = 36000;
+
 
   /**
* Gets the ExecutionCommand property of this ServerAction.



ambari git commit: AMBARI-18302.Desired state of client component should not be changed in case configuration changes are applied through a "Restart.(Laszlo Puskas via stoader)"

2016-10-10 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a0693e001 -> 551958219


AMBARI-18302.Desired state of client component should not be changed in case 
configuration changes are applied through a "Restart.(Laszlo Puskas via 
stoader)"


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

Branch: refs/heads/branch-2.5
Commit: 551958219f170e31f951aaf8fffbeecf37ed0b18
Parents: a0693e0
Author: Toader, Sebastian 
Authored: Wed Sep 7 15:18:25 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 17:13:33 2016 +0200

--
 .../AmbariCustomCommandExecutionHelper.java  | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/55195821/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 8c8ae10..a671f0c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -465,15 +465,20 @@ public class AmbariCustomCommandExecutionHelper {
   private void applyCustomCommandBackendLogic(Cluster cluster, String 
serviceName, String componentName, String commandName, String hostname) throws 
AmbariException {
 switch (commandName) {
   case "RESTART":
-ServiceComponentHost serviceComponentHost = cluster.getService(
-
serviceName).getServiceComponent(componentName).getServiceComponentHost(hostname);
-
+ServiceComponent serviceComponent = 
cluster.getService(serviceName).getServiceComponent(componentName);
+ServiceComponentHost serviceComponentHost = 
serviceComponent.getServiceComponentHost(hostname);
 State currentDesiredState = serviceComponentHost.getDesiredState();
-if (currentDesiredState != State.STARTED) {
-  LOG.info("Updating desired state to {} on RESTART for {}/{} because 
it was {}",
-  State.STARTED, serviceName, componentName, currentDesiredState);
 
-  serviceComponentHost.setDesiredState(State.STARTED);
+if( !serviceComponent.isClientComponent()) {
+  if (currentDesiredState != State.STARTED) {
+LOG.info("Updating desired state to {} on RESTART for {}/{} 
because it was {}",
+State.STARTED, serviceName, componentName, 
currentDesiredState);
+
+serviceComponentHost.setDesiredState(State.STARTED);
+  }
+} else {
+  LOG.debug("Desired state for client components should not be updated 
on RESTART. Service/Component {}/{}",
+  serviceName, componentName);
 }
 
 break;



ambari git commit: AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta Ravindran via rlevas)

2016-10-10 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk a80c5a2db -> 34c5686c3


AMBARI-17311. Modify HTTP headers to follow best security practices (Sangeeta 
Ravindran via rlevas)


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

Branch: refs/heads/trunk
Commit: 34c5686c3a0f80a5c7b78ddf05bb41cb13202438
Parents: a80c5a2
Author: Sangeeta Ravindran 
Authored: Mon Oct 10 11:05:40 2016 -0400
Committer: Robert Levas 
Committed: Mon Oct 10 11:09:58 2016 -0400

--
 ambari-server/conf/unix/ambari.properties   |   6 +
 ambari-server/conf/windows/ambari.properties|   6 +
 .../server/configuration/Configuration.java | 135 +++
 .../security/AbstractSecurityHeaderFilter.java  |  43 ++
 .../AmbariServerSecurityHeaderFilter.java   |   3 +
 .../AmbariViewsSecurityHeaderFilter.java|   3 +
 .../AbstractSecurityHeaderFilterTest.java   |  38 +-
 .../AmbariServerSecurityHeaderFilterTest.java   |   7 +
 .../AmbariViewsSecurityHeaderFilterTest.java|   6 +
 9 files changed, 246 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/unix/ambari.properties
--
diff --git a/ambari-server/conf/unix/ambari.properties 
b/ambari-server/conf/unix/ambari.properties
index 4dcbe99..371653f 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -113,11 +113,17 @@ rolling.upgrade.skip.packages.prefixes=
 http.strict-transport-security=max-age=31536000
 http.x-xss-protection=1; mode=block
 http.x-frame-options=DENY
+http.x-content-type-options=nosniff
+http.cache-control=no-store
+http.pragma=no-cache
 
 # HTTP Header settings for Ambari Views
 views.http.strict-transport-security=max-age=31536000
 views.http.x-xss-protection=1; mode=block
 views.http.x-frame-options=SAMEORIGIN
+views.http.x-content-type-options=nosniff
+views.http.cache-control=no-store
+views.http.pragma=no-cache
 
 mpacks.staging.path=$ROOT/var/lib/ambari-server/resources/mpacks
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/ambari-server/conf/windows/ambari.properties
--
diff --git a/ambari-server/conf/windows/ambari.properties 
b/ambari-server/conf/windows/ambari.properties
index 64cce3b..c1c0a99 100644
--- a/ambari-server/conf/windows/ambari.properties
+++ b/ambari-server/conf/windows/ambari.properties
@@ -93,10 +93,16 @@ ulimit.open.files=1
 http.strict-transport-security=max-age=31536000
 http.x-xss-protection=1; mode=block
 http.x-frame-options=DENY
+http.x-content-type-options=nosniff
+http.cache-control=no-store
+http.pragma=no-cache
 
 # HTTP Header settings for Ambari Views
 views.http.strict-transport-security=max-age=31536000
 views.http.x-xss-protection=1; mode=block
 views.http.x-frame-options=SAMEORIGIN
+views.http.x-content-type-options=nosniff
+views.http.cache-control=no-store
+views.http.pragma=no-cache
 
 mpacks.staging.path=resources\\mpacks

http://git-wip-us.apache.org/repos/asf/ambari/blob/34c5686c/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 2e850ef..e976f45 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
@@ -2182,6 +2182,27 @@ public class Configuration {
   "http.x-xss-protection", "1; mode=block");
 
   /**
+   * The value that will be used to set the {@code X-Content-Type} HTTP 
response header.
+   */
+  @Markdown(description = "The value that will be used to set the 
`X-CONTENT-TYPE` HTTP response header.")
+  public static final ConfigurationProperty 
HTTP_X_CONTENT_TYPE_HEADER_VALUE = new ConfigurationProperty<>(
+  "http.x-content-type-options", "nosniff");
+
+  /**
+   * The value that will be used to set the {@code Cache-Control} HTTP 
response header.
+   */
+  @Markdown(description = "The value that will be used to set the 
`Cache-Control` HTTP response header.")
+  public static final ConfigurationProperty 
HTTP_CACHE_CONTROL_HEADER_VALUE = new ConfigurationProperty<>(
+  "http.cache-control", "no-store");
+
+  /**
+   * The value that will be used to set the 

[2/3] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)

2016-10-10 Thread aonishuk
AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other 
OS's. (aonishuk)


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

Branch: refs/heads/branch-2.4
Commit: c4e522983325f34b6fc11e95c764c340012289d2
Parents: 0e01a35
Author: Andrew Onishuk 
Authored: Mon Oct 10 17:52:39 2016 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 10 17:52:39 2016 +0300

--
 ambari-server/conf/unix/install-helper.sh | 1 +
 ambari-server/sbin/ambari-server  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c4e52298/ambari-server/conf/unix/install-helper.sh
--
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 369a56a..3163713 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -102,6 +102,7 @@ do_install(){
 
   sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J"
   sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG"
+  sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE"
 
   AUTOSTART_SERVER_CMD="" 
   which chkconfig > /dev/null 2>&1

http://git-wip-us.apache.org/repos/asf/ambari/blob/c4e52298/ambari-server/sbin/ambari-server
--
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 88eb3db..da86c7a 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -44,8 +44,10 @@ case "${1:-}" in
 esac
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export ROOT=`dirname $(dirname $SCRIPT_DIR)`
+# the below line (ROOT="/") is replaced by install-helper.sh. Don't 
edit/remove it.
+ROOT="/"
 ROOT=`echo $ROOT | sed 's/\/$//'`
+export ROOT
 
 export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
 export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf



[3/3] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)

2016-10-10 Thread aonishuk
AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other 
OS's. (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: a0693e001020aa85c87c3a6803e775bace7f39d7
Parents: 9d6d678
Author: Andrew Onishuk 
Authored: Mon Oct 10 17:52:43 2016 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 10 17:52:43 2016 +0300

--
 ambari-server/conf/unix/install-helper.sh | 1 +
 ambari-server/sbin/ambari-server  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0693e00/ambari-server/conf/unix/install-helper.sh
--
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 229e146..34ec0e9 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -102,6 +102,7 @@ do_install(){
 
   sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J"
   sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG"
+  sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE"
 
   AUTOSTART_SERVER_CMD="" 
   which chkconfig > /dev/null 2>&1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0693e00/ambari-server/sbin/ambari-server
--
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 64f1c8c..f1d6b8e 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -44,8 +44,10 @@ case "${1:-}" in
 esac
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export ROOT=`dirname $(dirname $SCRIPT_DIR)`
+# the below line (ROOT="/") is replaced by install-helper.sh. Don't 
edit/remove it.
+ROOT="/"
 ROOT=`echo $ROOT | sed 's/\/$//'`
+export ROOT
 
 export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
 export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf



[1/3] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)

2016-10-10 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 0e01a3554 -> c4e522983
  refs/heads/branch-2.5 9d6d67852 -> a0693e001
  refs/heads/trunk 2d1d5f9b0 -> a80c5a2db


AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other 
OS's. (aonishuk)


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

Branch: refs/heads/trunk
Commit: a80c5a2dbaa0c48f7df87dae6a23a027c2ab6022
Parents: 2d1d5f9
Author: Andrew Onishuk 
Authored: Mon Oct 10 17:52:36 2016 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 10 17:52:36 2016 +0300

--
 ambari-server/conf/unix/install-helper.sh | 1 +
 ambari-server/sbin/ambari-server  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/conf/unix/install-helper.sh
--
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 229e146..34ec0e9 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -102,6 +102,7 @@ do_install(){
 
   sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J"
   sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG"
+  sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE"
 
   AUTOSTART_SERVER_CMD="" 
   which chkconfig > /dev/null 2>&1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/sbin/ambari-server
--
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 762ae19..bdbdd0f 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -44,8 +44,10 @@ case "${1:-}" in
 esac
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export ROOT=`dirname $(dirname $SCRIPT_DIR)`
+# the below line (ROOT="/") is replaced by install-helper.sh. Don't 
edit/remove it.
+ROOT="/"
 ROOT=`echo $ROOT | sed 's/\/$//'`
+export ROOT
 
 export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
 export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf



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

2016-10-10 Thread ncole
Merge branch 'trunk' into branch-dev-patch-upgrade


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 784c7e4565b5b36b03f88ee9a6a8484ad976b7bc
Parents: 9648082 2d1d5f9
Author: Nate Cole 
Authored: Mon Oct 10 10:40:38 2016 -0400
Committer: Nate Cole 
Committed: Mon Oct 10 10:40:38 2016 -0400

--
 .../AmbariManagementControllerImpl.java |   2 +-
 .../controller/ServiceComponentHostRequest.java |   4 +-
 .../BlueprintConfigurationProcessor.java| 113 ++--
 .../internal/HostComponentResourceProvider.java |  44 +--
 .../server/state/DependencyConditionInfo.java   | 102 ---
 .../ambari/server/state/DependencyInfo.java |  36 +--
 .../server/topology/BlueprintValidatorImpl.java |  13 -
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py  |  11 +
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |  44 ---
 .../4.0.0.2.0/package/scripts/oozie_service.py  |   2 +-
 .../BlueprintConfigurationProcessorTest.java|  82 ++
 .../internal/UserResourceProviderDBTest.java| 280 +++
 .../topology/BlueprintValidatorImplTest.java|  75 +
 .../stacks/2.1/FALCON/test_falcon_server.py |  14 +
 .../ambari/view/hive2/ConnectionFactory.java|  37 ++-
 .../ambari/view/hive2/PropertyValidator.java|   8 +
 .../savedQueries/SavedQueryService.java |  47 +++-
 .../ui/hive-web/app/controllers/queries.js  |  24 +-
 .../ui/hive-web/app/initializers/i18n.js|   5 +
 .../views/hive-next/src/main/resources/view.xml |   9 +
 .../savedQueries/SavedQueryService.java |  48 +++-
 .../ui/hive-web/app/controllers/queries.js  |  22 +-
 .../ui/hive-web/app/initializers/i18n.js|   5 +-
 .../savedQueries/SavedQueryServiceTest.java |  16 +-
 24 files changed, 695 insertions(+), 348 deletions(-)
--




[2/8] ambari git commit: AMBARI-18437. Hive view not working on LLAP enabled cluster. (dipayanb)

2016-10-10 Thread ncole
AMBARI-18437. Hive view not working on LLAP enabled cluster. (dipayanb)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e7074ecab2960ea3b8ab9396156413529cff3085
Parents: e0d4a87
Author: Dipayan Bhowmick 
Authored: Sat Oct 8 01:05:04 2016 +0530
Committer: Dipayan Bhowmick 
Committed: Sat Oct 8 01:07:32 2016 +0530

--
 .../ambari/view/hive2/ConnectionFactory.java| 37 +---
 .../ambari/view/hive2/PropertyValidator.java|  8 +
 .../views/hive-next/src/main/resources/view.xml |  9 +
 3 files changed, 42 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e7074eca/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionFactory.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionFactory.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionFactory.java
index 7295f3a..8fefe15 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionFactory.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/ConnectionFactory.java
@@ -33,7 +33,7 @@ public class ConnectionFactory {
   private static final String ZK_HIVE_NAMESPACE_KEY = 
"hive.server2.zookeeper.namespace";
   private static final String ZK_HIVE_QUORUM = "hive.zookeeper.quorum";
 
-  private static final  String AMBARI_HIVE_SERVICE_NAME = "HIVE";
+  private static final String AMBARI_HIVE_SERVICE_NAME = "HIVE";
   private static final String AMBARI_HIVESERVER_COMPONENT_NAME = "HIVE_SERVER";
 
   private static final String HIVE_SITE = "hive-site";
@@ -47,6 +47,7 @@ public class ConnectionFactory {
   private static final String HIVE_TRANSPORT_MODE_KEY = 
"hive.server2.transport.mode";
   private static final String HTTP_PATH_KEY = "hive.server2.thrift.http.path";
   private static final String HS2_PROXY_USER = "hive.server2.proxy.user";
+  private static final String USE_HIVE_INTERACTIVE_MODE = 
"use.hive.interactive.mode";
 
 
   public static ConnectionConfig create(ViewContext context) {
@@ -66,9 +67,16 @@ public class ConnectionFactory {
   }
 
   private static String getFromHiveConfiguration(ViewContext context) {
+boolean useLLAP = 
Boolean.valueOf(context.getProperties().get(USE_HIVE_INTERACTIVE_MODE));
 String transportMode = 
context.getCluster().getConfigurationValue(HIVE_SITE, HIVE_TRANSPORT_MODE_KEY);
 String binaryPort = context.getCluster().getConfigurationValue(HIVE_SITE, 
BINARY_PORT_KEY);
 String httpPort = context.getCluster().getConfigurationValue(HIVE_SITE, 
HTTP_PORT_KEY);
+if (useLLAP) {
+  binaryPort = 
context.getCluster().getConfigurationValue(HIVE_INTERACTIVE_SITE, 
BINARY_PORT_KEY);
+  httpPort = 
context.getCluster().getConfigurationValue(HIVE_INTERACTIVE_SITE, 
HTTP_PORT_KEY);
+}
+
+
 String pathKey = context.getCluster().getConfigurationValue(HIVE_SITE, 
HTTP_PATH_KEY);
 List hiveHosts = 
context.getCluster().getHostsForServiceComponent(AMBARI_HIVE_SERVICE_NAME, 
AMBARI_HIVESERVER_COMPONENT_NAME);
 String sessionParams = context.getProperties().get(HIVE_SESSION_PARAMS);
@@ -87,9 +95,10 @@ public class ConnectionFactory {
 
 StringBuilder builder = new StringBuilder();
 builder.append("jdbc:hive2://")
-  .append(concatHostPorts)
-  .append(";")
-  .append(sessionParams);
+.append(concatHostPorts);
+if(!Strings.isNullOrEmpty(sessionParams)) {
+  builder.append(";").append(sessionParams);
+}
 
 if (!isBinary) {
   
builder.append(";").append("transportMode=http;httpPath=").append(pathKey);
@@ -99,27 +108,31 @@ public class ConnectionFactory {
   }
 
   private static String getFromClusterZookeeperConfig(ViewContext context) {
+boolean useLLAP = 
Boolean.valueOf(context.getProperties().get(USE_HIVE_INTERACTIVE_MODE));
 String quorum = context.getCluster().getConfigurationValue(HIVE_SITE, 
ZK_HIVE_QUORUM);
-if (quorum == null) {
-  quorum = 
context.getCluster().getConfigurationValue(HIVE_INTERACTIVE_SITE, 
ZK_HIVE_QUORUM);
-}
 
 String namespace = context.getCluster().getConfigurationValue(HIVE_SITE, 
ZK_HIVE_NAMESPACE_KEY);
-if (namespace == null) {
+if (useLLAP) {
   namespace = 
context.getCluster().getConfigurationValue(HIVE_INTERACTIVE_SITE, 
ZK_HIVE_NAMESPACE_KEY);
 }
 
 String sessionParams = context.getProperties().get(HIVE_SESSION_PARAMS);
 
 String 

[6/8] ambari git commit: AMBARI-18546. BP format does not generate property oozie.service.JPAService.jdbc.url.(vbrodetskyi)

2016-10-10 Thread ncole
AMBARI-18546. BP format does not generate property 
oozie.service.JPAService.jdbc.url.(vbrodetskyi)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 58afcf93d8445c3b1ffacdd33c1cb12a8e8414cb
Parents: 72f1f6f
Author: Vitaly Brodetskyi 
Authored: Mon Oct 10 00:22:49 2016 +0300
Committer: Vitaly Brodetskyi 
Committed: Mon Oct 10 00:22:49 2016 +0300

--
 .../BlueprintConfigurationProcessor.java| 113 ++-
 .../BlueprintConfigurationProcessorTest.java|  82 ++
 2 files changed, 169 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/58afcf93/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index ba09368..8ff568a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -84,7 +84,7 @@ public class BlueprintConfigurationProcessor {
   /**
* Single host topology updaters
*/
-  private static Map> 
singleHostTopologyUpdaters =
+  protected static Map> 
singleHostTopologyUpdaters =
   new HashMap>();
 
   /**
@@ -117,7 +117,7 @@ public class BlueprintConfigurationProcessor {
* removed from export, but do not require an update during
* cluster creation
*/
-  private static Map> 
removePropertyUpdaters =
+  private Map> removePropertyUpdaters =
 new HashMap>();
 
   /**
@@ -196,6 +196,81 @@ public class BlueprintConfigurationProcessor {
 
   public BlueprintConfigurationProcessor(ClusterTopology clusterTopology) {
 this.clusterTopology = clusterTopology;
+initRemovePropertyUpdaters();
+  }
+
+  public Map> getRemovePropertyUpdaters() 
{
+return removePropertyUpdaters;
+  }
+
+  public void initRemovePropertyUpdaters() {
+
+if (containsHostFromHostGroups("oozie-site", 
"oozie.service.JPAService.jdbc.url")) {
+  Map oozieSiteUpdaters = 
singleHostTopologyUpdaters.get("oozie-site");
+  Map oozieEnvUpdaters = 
singleHostTopologyUpdaters.get("oozie-env");
+  if (oozieSiteUpdaters == null) {
+oozieSiteUpdaters = new HashMap<>();
+  }
+  if (oozieEnvUpdaters == null) {
+oozieEnvUpdaters = new HashMap<>();
+  }
+  oozieEnvUpdaters.put("oozie_existing_mysql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieSiteUpdaters.put("oozie.service.JPAService.jdbc.url",  new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+
+  singleHostTopologyUpdaters.put("oozie-env", oozieEnvUpdaters);
+  singleHostTopologyUpdaters.put("oozie-site", oozieSiteUpdaters);
+} else {
+  Map oozieEnvOriginalValueMap = new 
HashMap();
+  Map oozieSiteOriginalValueMap = new 
HashMap();
+  // register updaters for Oozie properties that may point to an external 
DB
+  oozieEnvOriginalValueMap.put("oozie_existing_mysql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_postgresql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  

[5/8] ambari git commit: AMBARI-18551. Enhance falcon integration to call falcon-config to make sure WEB-INF/lib is present in all cases (Venkat Ranganathan via alejandro)

2016-10-10 Thread ncole
AMBARI-18551. Enhance falcon integration to call falcon-config to make sure 
WEB-INF/lib is present in all cases (Venkat Ranganathan via alejandro)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 72f1f6f635b74e4fe3f5e21fed2d3a60aa6de0ad
Parents: 569020c
Author: Alejandro Fernandez 
Authored: Fri Oct 7 16:29:43 2016 -0700
Committer: Alejandro Fernandez 
Committed: Fri Oct 7 16:29:43 2016 -0700

--
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py| 11 +++
 .../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py  |  2 +-
 .../python/stacks/2.1/FALCON/test_falcon_server.py| 14 ++
 3 files changed, 26 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/72f1f6f6/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
index 2ac79cb..3ecb65b 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
@@ -216,6 +216,17 @@ def falcon(type, action = None, upgrade_type=None):
 process_exists = format("ls {server_pid_file} && ps -p {pid}")
 
 if action == 'start':
+  try:
+Execute(format('{falcon_home}/bin/falcon-config.sh server falcon'),
+  user = params.falcon_user,
+  path = params.hadoop_bin_dir,
+  environment=environment_dictionary,
+  not_if = process_exists,
+)
+  except:
+show_logs(params.falcon_log_dir, params.falcon_user)
+raise
+
   if not os.path.exists(params.target_jar_file):
 try :
   File(params.target_jar_file,

http://git-wip-us.apache.org/repos/asf/ambari/blob/72f1f6f6/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
index 3257653..a5bd59d 100644
--- 
a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
+++ 
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
@@ -28,7 +28,7 @@ from resource_management.core import sudo
 from resource_management.core.shell import as_user
 from resource_management.core.logger import Logger
 from resource_management.core.resources.service import Service
-from resource_management.core.resources.system import Execute, File
+from resource_management.core.resources.system import Execute, File, Directory
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.show_logs import show_logs
 from resource_management.libraries.providers.hdfs_resource import WebHDFSUtil

http://git-wip-us.apache.org/repos/asf/ambari/blob/72f1f6f6/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py 
b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index ab053b7..4ad5c0f 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -43,6 +43,13 @@ class TestFalconServer(RMFTestCase):
 
 self.assert_configure_default()
 
+self.assertResourceCalled('Execute', '/usr/lib/falcon/bin/falcon-config.sh 
server falcon',
+  path = ['/usr/bin'],
+  user = 'falcon',
+  environment = {'HADOOP_HOME': '/usr/lib/hadoop'},
+  not_if = 'ls /var/run/falcon/falcon.pid && ps -p ',
+)
+
 self.assertResourceCalled('File', 
'/usr/lib/falcon/server/webapp/falcon/WEB-INF/lib/je-5.0.73.jar',
   
content=DownloadSource('http://c6401.ambari.apache.org:8080/resources//je-5.0.73.jar'),
   mode=0755
@@ -374,6 +381,13 @@ class TestFalconServer(RMFTestCase):
 create_parents = True,
 )

+self.assertResourceCalled('Execute', 

[7/8] ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)

2016-10-10 Thread ncole
AMBARI-18560. Add more logging to track what condition resulted in skipping 
agent commands. (stoader)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2d1d5f9b00e39a137c5aea8341436f408975cf82
Parents: 58afcf9
Author: Toader, Sebastian 
Authored: Mon Oct 10 16:06:55 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 16:06:55 2016 +0200

--
 .../AmbariManagementControllerImpl.java |  2 +-
 .../controller/ServiceComponentHostRequest.java |  4 +-
 .../internal/HostComponentResourceProvider.java | 44 ++--
 3 files changed, 27 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/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 1fc9dbf..ef4fc33 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
@@ -2474,7 +2474,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 if ((changedServices == null || changedServices.isEmpty())
 && (changedComps == null || changedComps.isEmpty())
 && (changedScHosts == null || changedScHosts.isEmpty())) {
-  LOG.debug("Created 0 stages");
+  LOG.info("Created 0 stages");
   return requestStages;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 73cedb4..4a07804 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -182,7 +182,9 @@ public class ServiceComponentHostRequest {
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
   .append(", staleConfig=").append(staleConfig)
-  .append(", adminState=").append(adminState).append("}");
+  .append(", adminState=").append(adminState)
+  .append(", maintenanceState=").append(maintenanceState)
+  .append("}");
 return sb.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index 85a4949..4f279c8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   }
 
   if (newState == null) {
-logComponentInfo("Nothing to do for new updateServiceComponentHost", 
request, oldState, null);
+LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for 
new updateServiceComponentHost", request, oldState, null));
 continue;
   }
 
@@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   if (sc.isClientComponent() && newState == State.STARTED &&
 
!requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) {
 ignoredScHosts.add(sch);
-logComponentInfo("Ignoring ServiceComponentHost", request, 
sch.getState(), newState);
+LOG.info(getServiceComponentRequestInfoLogMessage("Ignoring 
ServiceComponentHost as STARTED new desired state for client components is not 
valid", request, 

[1/8] ambari git commit: Revert "AMBARI-18355: Introduce conditional dependencies in stack defition to handle blueprint validation gracefully (Amruta Borkar via dili)"

2016-10-10 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade 964808275 -> 784c7e456


Revert "AMBARI-18355: Introduce conditional dependencies in stack defition to 
handle blueprint validation gracefully (Amruta Borkar via dili)"

This reverts commit f6124a056d2a8ed16bec917775b9d3554ab5d74d.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e0d4a8713ed0ffe86acd18bd798c317d5e51a61c
Parents: f6124a0
Author: Jonathan Hurley 
Authored: Fri Oct 7 15:36:00 2016 -0400
Committer: Jonathan Hurley 
Committed: Fri Oct 7 15:36:00 2016 -0400

--
 .../server/state/DependencyConditionInfo.java   | 102 ---
 .../ambari/server/state/DependencyInfo.java |  36 +--
 .../server/topology/BlueprintValidatorImpl.java |  13 ---
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |  44 
 .../topology/BlueprintValidatorImplTest.java|  75 +-
 5 files changed, 2 insertions(+), 268 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0d4a871/ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java
deleted file mode 100644
index 84e186f..000
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/DependencyConditionInfo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.state;
-
-import java.util.Map;
-import java.util.Objects;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.apache.commons.lang.NotImplementedException;
-
-/**
- * Represents stack component dependency condition information.
- */
-@XmlJavaTypeAdapter(DependencyConditionAdapter.class)
-public abstract class DependencyConditionInfo {
-public abstract boolean isResolved(Map> 
properties);
-}
-
-class PropertyExistsDependencyCondition extends DependencyConditionInfo{
-
-protected final String configType;
-protected final String property;
-public PropertyExistsDependencyCondition( String configType, String 
property) {
-this.configType = Objects.requireNonNull(configType, "Config Type must 
not be null.");
-this.property = Objects.requireNonNull(property, "Property Name must 
not be null.");
-}
-
-@Override
-public boolean isResolved(Map> properties) {
-return (properties.get(configType).containsKey(property));
-}
-}
-
-class PropertyValueEqualsDependencyCondition extends 
PropertyExistsDependencyCondition {
-
-protected final String propertyValue;
-public PropertyValueEqualsDependencyCondition(String configType, String 
property, String propertyValue) {
-super(configType, property);
-this.propertyValue = Objects.requireNonNull(propertyValue, "Property 
value must not be null.");
-}
-
-@Override
-public boolean isResolved(Map> properties) {
-return (super.isResolved(properties) && 
propertyValue.equals(properties.get(configType).get(property)));
-}
-}
-
-class DependencyConditionAdapter extends 
XmlAdapter {
-
-static class AdaptedDependencyCondition{
-@XmlElement
-private String configType;
-@XmlElement
-private String property;
-@XmlElement
-private 

[3/8] ambari git commit: AMBARI-18496. Include an option to download the saved query in hive view. (Anita Gnanamalar Jebaraj via dipayanb)

2016-10-10 Thread ncole
AMBARI-18496. Include an option to download the saved query in hive view. 
(Anita Gnanamalar Jebaraj via dipayanb)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8813b1f9295f052a0f28ac622fdd214964cec7c6
Parents: e7074ec
Author: Dipayan Bhowmick 
Authored: Sat Oct 8 01:16:16 2016 +0530
Committer: Dipayan Bhowmick 
Committed: Sat Oct 8 01:17:39 2016 +0530

--
 .../savedQueries/SavedQueryService.java | 47 +--
 .../ui/hive-web/app/controllers/queries.js  | 24 +-
 .../ui/hive-web/app/initializers/i18n.js|  5 ++
 .../savedQueries/SavedQueryService.java | 48 +---
 .../ui/hive-web/app/controllers/queries.js  | 22 -
 .../ui/hive-web/app/initializers/i18n.js|  5 +-
 .../savedQueries/SavedQueryServiceTest.java | 16 +--
 7 files changed, 149 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8813b1f9/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java
--
diff --git 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java
 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java
index ccc4512..9b844d6 100644
--- 
a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java
+++ 
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java
@@ -37,7 +37,16 @@ import javax.ws.rs.*;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import javax.ws.rs.core.StreamingOutput;
 import javax.ws.rs.core.UriInfo;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
 import java.util.List;
 
 /**
@@ -73,12 +82,40 @@ public class SavedQueryService extends BaseService {
   @GET
   @Path("{queryId}")
   @Produces(MediaType.APPLICATION_JSON)
-  public Response getOne(@PathParam("queryId") String queryId) {
+  public Response getOne(@PathParam("queryId") String queryId,
+@QueryParam("op") String operation) {
 try {
-  SavedQuery savedQuery = getResourceManager().read(queryId);
-  JSONObject object = new JSONObject();
-  object.put("savedQuery", savedQuery);
-  return Response.ok(object).build();
+  final SavedQuery savedQuery = getResourceManager().read(queryId);
+  if(operation.equals("download")) {
+   StreamingOutput stream = new StreamingOutput() {
+   @Override
+   public void write(OutputStream os) throws IOException, 
WebApplicationException {
+ Writer writer = new BufferedWriter(new OutputStreamWriter(os));
+ try { 
+BufferedReader br=new BufferedReader(new 
InputStreamReader(getSharedObjectsFactory().getHdfsApi().open(savedQuery.getQueryFile(;
+   String line;
+   line=br.readLine();
+   while (line != null){
+ writer.write(line+"\n");  
+ line = br.readLine();
+}
+writer.flush();
+ } catch (InterruptedException e) {
+   e.printStackTrace();
+ } finally {
+   writer.close();
+ }
+   }
+   };
+   return Response.ok(stream).
+   type(MediaType.TEXT_PLAIN).
+  build();
+  }
+  else {
+JSONObject object = new JSONObject();
+ object.put("savedQuery", savedQuery);
+ return Response.ok(object).build();
+  }
 } catch (WebApplicationException ex) {
   throw ex;
 } catch (ItemNotFound itemNotFound) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8813b1f9/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js
--
diff --git 
a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js
 
b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js
index cbf6b42..4438c5a 100644
--- 
a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js
+++ 
b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js
@@ 

[4/8] ambari git commit: AMBARI-18540: Unit test cases required for verifying Ambari username case sensitivity

2016-10-10 Thread ncole
AMBARI-18540: Unit test cases required for verifying Ambari username case 
sensitivity


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 569020caf1c6f39765d7da9efb8c57b66293844e
Parents: 8813b1f
Author: Nahappan Somasundaram 
Authored: Wed Oct 5 17:25:20 2016 -0700
Committer: Nahappan Somasundaram 
Committed: Fri Oct 7 14:22:27 2016 -0700

--
 .../internal/UserResourceProviderDBTest.java| 280 +++
 1 file changed, 280 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/569020ca/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderDBTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderDBTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderDBTest.java
new file mode 100644
index 000..1629b49
--- /dev/null
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderDBTest.java
@@ -0,0 +1,280 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.controller.internal;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
+import org.apache.ambari.server.configuration.Configuration;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.RequestStatus;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.utilities.PredicateBuilder;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
+import org.apache.ambari.server.security.TestAuthenticationFactory;
+import org.apache.ambari.server.security.authorization.AuthorizationHelper;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Tests creation, retrieval and deletion of users using an in-memory database.
+ * Also tests user creation and retrieval using usernames that differ only by 
case.
+ * Verifies that usernames are stored as provided.
+ */
+@PrepareForTest({AuthorizationHelper.class})
+public class UserResourceProviderDBTest {
+private static Injector injector;
+private static AmbariManagementController amc;
+private static Resource.Type userType = Resource.Type.User;
+private static UserResourceProvider userResourceProvider;
+private static String JDBC_IN_MEMORY_URL_CREATE =
+String.format("jdbc:derby:memory:myDB/%s;create=true", 
Configuration.DEFAULT_DERBY_SCHEMA);
+private static String JDBC_IN_MEMORY_URL_DROP =
+String.format("jdbc:derby:memory:myDB/%s;drop=true", 
Configuration.DEFAULT_DERBY_SCHEMA);
+
+/**
+ * Sets up the in-memory database for the test suite.
+ */
+@BeforeClass
+public static void setupInMemoryDB() {
+InMemoryDefaultTestModule 

ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)

2016-10-10 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 243cafa89 -> 0e01a3554


AMBARI-18560. Add more logging to track what condition resulted in skipping 
agent commands. (stoader)


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

Branch: refs/heads/branch-2.4
Commit: 0e01a3554edea119acf3b68008631a334195b685
Parents: 243cafa
Author: Toader, Sebastian 
Authored: Mon Oct 10 16:06:55 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 16:14:26 2016 +0200

--
 .../AmbariManagementControllerImpl.java |  2 +-
 .../controller/ServiceComponentHostRequest.java |  4 +-
 .../internal/HostComponentResourceProvider.java | 44 ++--
 3 files changed, 27 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/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 3e4de3d..28914db 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
@@ -2447,7 +2447,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 if ((changedServices == null || changedServices.isEmpty())
 && (changedComps == null || changedComps.isEmpty())
 && (changedScHosts == null || changedScHosts.isEmpty())) {
-  LOG.debug("Created 0 stages");
+  LOG.info("Created 0 stages");
   return requestStages;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 73cedb4..4a07804 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -182,7 +182,9 @@ public class ServiceComponentHostRequest {
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
   .append(", staleConfig=").append(staleConfig)
-  .append(", adminState=").append(adminState).append("}");
+  .append(", adminState=").append(adminState)
+  .append(", maintenanceState=").append(maintenanceState)
+  .append("}");
 return sb.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e01a355/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index df2b476..bc3f632 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -575,7 +575,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   }
 
   if (newState == null) {
-logComponentInfo("Nothing to do for new updateServiceComponentHost", 
request, oldState, null);
+LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for 
new updateServiceComponentHost", request, oldState, null));
 continue;
   }
 
@@ -589,7 +589,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   if (sc.isClientComponent() && newState == State.STARTED &&
 
!requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) {
 ignoredScHosts.add(sch);
-logComponentInfo("Ignoring ServiceComponentHost", request, 
sch.getState(), newState);
+LOG.info(getServiceComponentRequestInfoLogMessage("Ignoring 
ServiceComponentHost as 

ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)

2016-10-10 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 46a528ffb -> 9d6d67852


AMBARI-18560. Add more logging to track what condition resulted in skipping 
agent commands. (stoader)


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

Branch: refs/heads/branch-2.5
Commit: 9d6d6785227dfc8baf758e842413a12ef626a3e8
Parents: 46a528f
Author: Toader, Sebastian 
Authored: Mon Oct 10 16:06:55 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 16:09:40 2016 +0200

--
 .../AmbariManagementControllerImpl.java |  2 +-
 .../controller/ServiceComponentHostRequest.java |  4 +-
 .../internal/HostComponentResourceProvider.java | 44 ++--
 3 files changed, 27 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/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 c285c3d..cd02223 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
@@ -2452,7 +2452,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 if ((changedServices == null || changedServices.isEmpty())
 && (changedComps == null || changedComps.isEmpty())
 && (changedScHosts == null || changedScHosts.isEmpty())) {
-  LOG.debug("Created 0 stages");
+  LOG.info("Created 0 stages");
   return requestStages;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 73cedb4..4a07804 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -182,7 +182,9 @@ public class ServiceComponentHostRequest {
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
   .append(", staleConfig=").append(staleConfig)
-  .append(", adminState=").append(adminState).append("}");
+  .append(", adminState=").append(adminState)
+  .append(", maintenanceState=").append(maintenanceState)
+  .append("}");
 return sb.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6d6785/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index 85a4949..4f279c8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   }
 
   if (newState == null) {
-logComponentInfo("Nothing to do for new updateServiceComponentHost", 
request, oldState, null);
+LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for 
new updateServiceComponentHost", request, oldState, null));
 continue;
   }
 
@@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   if (sc.isClientComponent() && newState == State.STARTED &&
 
!requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) {
 ignoredScHosts.add(sch);
-logComponentInfo("Ignoring ServiceComponentHost", request, 
sch.getState(), newState);
+LOG.info(getServiceComponentRequestInfoLogMessage("Ignoring 
ServiceComponentHost as 

ambari git commit: AMBARI-18560. Add more logging to track what condition resulted in skipping agent commands. (stoader)

2016-10-10 Thread stoader
Repository: ambari
Updated Branches:
  refs/heads/trunk 58afcf93d -> 2d1d5f9b0


AMBARI-18560. Add more logging to track what condition resulted in skipping 
agent commands. (stoader)


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

Branch: refs/heads/trunk
Commit: 2d1d5f9b00e39a137c5aea8341436f408975cf82
Parents: 58afcf9
Author: Toader, Sebastian 
Authored: Mon Oct 10 16:06:55 2016 +0200
Committer: Toader, Sebastian 
Committed: Mon Oct 10 16:06:55 2016 +0200

--
 .../AmbariManagementControllerImpl.java |  2 +-
 .../controller/ServiceComponentHostRequest.java |  4 +-
 .../internal/HostComponentResourceProvider.java | 44 ++--
 3 files changed, 27 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/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 1fc9dbf..ef4fc33 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
@@ -2474,7 +2474,7 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 if ((changedServices == null || changedServices.isEmpty())
 && (changedComps == null || changedComps.isEmpty())
 && (changedScHosts == null || changedScHosts.isEmpty())) {
-  LOG.debug("Created 0 stages");
+  LOG.info("Created 0 stages");
   return requestStages;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 73cedb4..4a07804 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -182,7 +182,9 @@ public class ServiceComponentHostRequest {
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
   .append(", staleConfig=").append(staleConfig)
-  .append(", adminState=").append(adminState).append("}");
+  .append(", adminState=").append(adminState)
+  .append(", maintenanceState=").append(maintenanceState)
+  .append("}");
 return sb.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d1d5f9b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index 85a4949..4f279c8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -580,7 +580,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   }
 
   if (newState == null) {
-logComponentInfo("Nothing to do for new updateServiceComponentHost", 
request, oldState, null);
+LOG.info(getServiceComponentRequestInfoLogMessage("Nothing to do for 
new updateServiceComponentHost", request, oldState, null));
 continue;
   }
 
@@ -594,7 +594,7 @@ public class HostComponentResourceProvider extends 
AbstractControllerResourcePro
   if (sc.isClientComponent() && newState == State.STARTED &&
 
!requestProperties.containsKey(sch.getServiceComponentName().toLowerCase())) {
 ignoredScHosts.add(sch);
-logComponentInfo("Ignoring ServiceComponentHost", request, 
sch.getState(), newState);
+LOG.info(getServiceComponentRequestInfoLogMessage("Ignoring 
ServiceComponentHost as STARTED new 

ambari git commit: AMBARI-18546. BP format does not generate property oozie.service.JPAService.jdbc.url.(vbrodetskyi)

2016-10-10 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 72f1f6f63 -> 58afcf93d


AMBARI-18546. BP format does not generate property 
oozie.service.JPAService.jdbc.url.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 58afcf93d8445c3b1ffacdd33c1cb12a8e8414cb
Parents: 72f1f6f
Author: Vitaly Brodetskyi 
Authored: Mon Oct 10 00:22:49 2016 +0300
Committer: Vitaly Brodetskyi 
Committed: Mon Oct 10 00:22:49 2016 +0300

--
 .../BlueprintConfigurationProcessor.java| 113 ++-
 .../BlueprintConfigurationProcessorTest.java|  82 ++
 2 files changed, 169 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/58afcf93/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index ba09368..8ff568a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -84,7 +84,7 @@ public class BlueprintConfigurationProcessor {
   /**
* Single host topology updaters
*/
-  private static Map> 
singleHostTopologyUpdaters =
+  protected static Map> 
singleHostTopologyUpdaters =
   new HashMap>();
 
   /**
@@ -117,7 +117,7 @@ public class BlueprintConfigurationProcessor {
* removed from export, but do not require an update during
* cluster creation
*/
-  private static Map> 
removePropertyUpdaters =
+  private Map> removePropertyUpdaters =
 new HashMap>();
 
   /**
@@ -196,6 +196,81 @@ public class BlueprintConfigurationProcessor {
 
   public BlueprintConfigurationProcessor(ClusterTopology clusterTopology) {
 this.clusterTopology = clusterTopology;
+initRemovePropertyUpdaters();
+  }
+
+  public Map> getRemovePropertyUpdaters() 
{
+return removePropertyUpdaters;
+  }
+
+  public void initRemovePropertyUpdaters() {
+
+if (containsHostFromHostGroups("oozie-site", 
"oozie.service.JPAService.jdbc.url")) {
+  Map oozieSiteUpdaters = 
singleHostTopologyUpdaters.get("oozie-site");
+  Map oozieEnvUpdaters = 
singleHostTopologyUpdaters.get("oozie-env");
+  if (oozieSiteUpdaters == null) {
+oozieSiteUpdaters = new HashMap<>();
+  }
+  if (oozieEnvUpdaters == null) {
+oozieEnvUpdaters = new HashMap<>();
+  }
+  oozieEnvUpdaters.put("oozie_existing_mysql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieSiteUpdaters.put("oozie.service.JPAService.jdbc.url",  new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+
+  singleHostTopologyUpdaters.put("oozie-env", oozieEnvUpdaters);
+  singleHostTopologyUpdaters.put("oozie-site", oozieSiteUpdaters);
+} else {
+  Map oozieEnvOriginalValueMap = new 
HashMap();
+  Map oozieSiteOriginalValueMap = new 
HashMap();
+  // register updaters for Oozie properties that may point to an external 
DB
+  oozieEnvOriginalValueMap.put("oozie_existing_mysql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_postgresql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  

ambari git commit: AMBARI-18546. BP format does not generate property oozie.service.JPAService.jdbc.url.(vbrodetskyi)

2016-10-10 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 9ef6a6316 -> 46a528ffb


AMBARI-18546. BP format does not generate property 
oozie.service.JPAService.jdbc.url.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: 46a528ffbb5e806c10815b7e1555b9a811326c86
Parents: 9ef6a63
Author: Vitaly Brodetskyi 
Authored: Sun Oct 9 23:52:35 2016 +0300
Committer: Vitaly Brodetskyi 
Committed: Sun Oct 9 23:52:35 2016 +0300

--
 .../BlueprintConfigurationProcessor.java| 101 ++---
 .../BlueprintConfigurationProcessorTest.java| 111 +--
 2 files changed, 186 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/46a528ff/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 4776dc6..31d8daf 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -83,7 +83,7 @@ public class BlueprintConfigurationProcessor {
   /**
* Single host topology updaters
*/
-  private static Map> 
singleHostTopologyUpdaters =
+  protected static Map> 
singleHostTopologyUpdaters =
   new HashMap>();
 
   /**
@@ -116,7 +116,7 @@ public class BlueprintConfigurationProcessor {
* removed from export, but do not require an update during
* cluster creation
*/
-  private static Map> 
removePropertyUpdaters =
+  private Map> removePropertyUpdaters =
 new HashMap>();
 
   /**
@@ -200,6 +200,81 @@ public class BlueprintConfigurationProcessor {
 
   public BlueprintConfigurationProcessor(ClusterTopology clusterTopology) {
 this.clusterTopology = clusterTopology;
+initRemovePropertyUpdaters();
+  }
+
+  public Map> getRemovePropertyUpdaters() 
{
+return removePropertyUpdaters;
+  }
+
+  public void initRemovePropertyUpdaters() {
+
+if (containsHostFromHostGroups("oozie-site", 
"oozie.service.JPAService.jdbc.url")) {
+  Map oozieSiteUpdaters = 
singleHostTopologyUpdaters.get("oozie-site");
+  Map oozieEnvUpdaters = 
singleHostTopologyUpdaters.get("oozie-env");
+  if (oozieSiteUpdaters == null) {
+oozieSiteUpdaters = new HashMap<>();
+  }
+  if (oozieEnvUpdaters == null) {
+oozieEnvUpdaters = new HashMap<>();
+  }
+  oozieEnvUpdaters.put("oozie_existing_mysql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_oracle_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieEnvUpdaters.put("oozie_existing_postgresql_host", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+  oozieSiteUpdaters.put("oozie.service.JPAService.jdbc.url",  new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
+
+  singleHostTopologyUpdaters.put("oozie-env", oozieEnvUpdaters);
+  singleHostTopologyUpdaters.put("oozie-site", oozieSiteUpdaters);
+} else {
+  Map oozieEnvOriginalValueMap = new 
HashMap();
+  Map oozieSiteOriginalValueMap = new 
HashMap();
+  // register updaters for Oozie properties that may point to an external 
DB
+  oozieEnvOriginalValueMap.put("oozie_existing_mysql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_postgresql_host", new 
OriginalValuePropertyUpdater());
+  oozieEnvOriginalValueMap.put("oozie_existing_oracle_host", new