[1/2] ambari git commit: AMBARI-12879. Warn the user about HDFS Upgrade not finalized in Ambari Web UI (onechiporenko)

2015-08-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk cd3a55783 - 6fc314414


AMBARI-12879. Warn the user about HDFS Upgrade not finalized in Ambari Web UI 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: f4286d596a07f29a53585e59344e311f63f3b780
Parents: cd3a557
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Aug 28 13:08:51 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Aug 28 13:08:51 2015 +0300

--
 ambari-web/app/templates/application.hbs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4286d59/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index 28a36cb..e636e97 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -142,7 +142,7 @@
 /a
 /p
 {{#if 
App.router.mainAdminStackAndUpgradeController.isFinalizeItem}}
-  p class=span10 alert alert-warning{{t 
admin.stackVersions.version.upgrade.notFinalized.warning}}/p
+  p class=span10 alert alert-danger{{t 
admin.stackVersions.version.upgrade.notFinalized.warning}}/p
 {{/if}}
   {{/if}}
 /div



ambari git commit: AMBARI-12899 Heatmaps page request metrics when Ambari Metrics service is absent. (atkach)

2015-08-28 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 d1a73 - 773f67eca


AMBARI-12899 Heatmaps page request metrics when Ambari Metrics service is 
absent. (atkach)


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

Branch: refs/heads/branch-2.1
Commit: 773f67eca4a3f627cd977d8c6c74617a7d8255c2
Parents: d1a
Author: Andrii Tkach atk...@hortonworks.com
Authored: Fri Aug 28 12:45:39 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Fri Aug 28 12:45:39 2015 +0300

--
 .../views/common/widget/heatmap_widget_view.js  | 38 +++-
 1 file changed, 37 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/773f67ec/ambari-web/app/views/common/widget/heatmap_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/heatmap_widget_view.js 
b/ambari-web/app/views/common/widget/heatmap_widget_view.js
index bb39a04..972797a 100644
--- a/ambari-web/app/views/common/widget/heatmap_widget_view.js
+++ b/ambari-web/app/views/common/widget/heatmap_widget_view.js
@@ -33,6 +33,12 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
*/
   racks: [],
 
+  /**
+   * @type {$.ajax|null}
+   * @default null
+   */
+  activeRequest: null,
+
   onMetricsLoaded: function () {
 if (!this.get('isLoaded')) {
   this.set('controller.inputMaximum', 
this.get('content.properties.max_limit'));
@@ -40,6 +46,36 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
 this._super();
   },
 
+  willDestroyElement: function () {
+if ($.isPlainObject(this.get('activeRequest'))) {
+  this.get('activeRequest').abort();
+  this.set('activeRequest', null);
+}
+  },
+
+  getHostComponentsMetrics: function (request) {
+var ajax = this._super(request);
+this.set('activeRequest', ajax);
+return ajax;
+  },
+
+  getHostsMetrics: function (request) {
+var ajax = this._super(request);
+this.set('activeRequest', ajax);
+return ajax;
+  },
+
+  /**
+   * skip metrics loading if AMBARI METRICS service is not started
+   */
+  loadMetrics: function () {
+if (App.Service.find('AMBARI_METRICS').get('isStarted')) {
+  this._super();
+} else {
+  this.onMetricsLoaded();
+}
+  },
+
   /**
* draw widget
*/
@@ -65,7 +101,7 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
   App.loadTimer.finish('Heatmaps Page');
   App.loadTimer.finish('Service Heatmaps Page');
 }
-  },
+  }.observes('racks.@each.isLoaded'),
 
   /**
* calculate value for heatmap widgets



[1/2] ambari git commit: AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)

2015-08-28 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 2d9612e9f - bb877b81a
  refs/heads/trunk 49c052e59 - 85c87bffa


AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)


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

Branch: refs/heads/trunk
Commit: 85c87bffae1d24d0aeb0170427b8dd775b23f79b
Parents: 49c052e
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri Aug 28 12:28:21 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri Aug 28 12:28:21 2015 +0300

--
 ambari-common/src/main/unix/ambari-python-wrap | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/85c87bff/ambari-common/src/main/unix/ambari-python-wrap
--
diff --git a/ambari-common/src/main/unix/ambari-python-wrap 
b/ambari-common/src/main/unix/ambari-python-wrap
index b9cf3b6..efc073b 100755
--- a/ambari-common/src/main/unix/ambari-python-wrap
+++ b/ambari-common/src/main/unix/ambari-python-wrap
@@ -22,16 +22,20 @@ export 
PYTHONPATH=/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packa
 # reset settings
 unset PYTHON
 
-# checking for preferable python versions
-if [ -a /usr/bin/python2.7 ]  [ -z $PYTHON ]; then
-  PYTHON=/usr/bin/python2.7
+# checking for default Python 2
+if [ -a /usr/bin/python2 ]  [ -z $PYTHON ]; then
+  PYTHON=/usr/bin/python2
 fi
 
 if [ -a /usr/bin/python2.6 ]  [ -z $PYTHON ]; then
   PYTHON=/usr/bin/python2.6
 fi
 
-# if no preferable python versions found, try to use system one
+if [ -a /usr/bin/python2.7 ]  [ -z $PYTHON ]; then
+  PYTHON=/usr/bin/python2.7
+fi
+
+# if no preferable python versions found, try to use system one. Hoping it's 
Python 2
 if [[ -z $PYTHON ]]; then
   PYTHON=/usr/bin/python
 fi



[2/2] ambari git commit: AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)

2015-08-28 Thread aonishuk
AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: bb877b81ad7eea4921274eb66c6b973d34dd649a
Parents: 2d9612e
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri Aug 28 12:28:24 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri Aug 28 12:28:24 2015 +0300

--
 ambari-common/src/main/unix/ambari-python-wrap | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bb877b81/ambari-common/src/main/unix/ambari-python-wrap
--
diff --git a/ambari-common/src/main/unix/ambari-python-wrap 
b/ambari-common/src/main/unix/ambari-python-wrap
index b9cf3b6..efc073b 100755
--- a/ambari-common/src/main/unix/ambari-python-wrap
+++ b/ambari-common/src/main/unix/ambari-python-wrap
@@ -22,16 +22,20 @@ export 
PYTHONPATH=/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packa
 # reset settings
 unset PYTHON
 
-# checking for preferable python versions
-if [ -a /usr/bin/python2.7 ]  [ -z $PYTHON ]; then
-  PYTHON=/usr/bin/python2.7
+# checking for default Python 2
+if [ -a /usr/bin/python2 ]  [ -z $PYTHON ]; then
+  PYTHON=/usr/bin/python2
 fi
 
 if [ -a /usr/bin/python2.6 ]  [ -z $PYTHON ]; then
   PYTHON=/usr/bin/python2.6
 fi
 
-# if no preferable python versions found, try to use system one
+if [ -a /usr/bin/python2.7 ]  [ -z $PYTHON ]; then
+  PYTHON=/usr/bin/python2.7
+fi
+
+# if no preferable python versions found, try to use system one. Hoping it's 
Python 2
 if [[ -z $PYTHON ]]; then
   PYTHON=/usr/bin/python
 fi



Git Push Summary

2015-08-28 Thread ncole
Repository: ambari
Updated Tags:  refs/tags/release-2.1.1 [created] d8db5a4d7


[1/2] ambari git commit: AMBARI-12879. Warn the user about HDFS Upgrade not finalized in Ambari Web UI (onechiporenko)

2015-08-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 773f67eca - 33c694b18


AMBARI-12879. Warn the user about HDFS Upgrade not finalized in Ambari Web UI 
(onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: e04050e85f2fe65a9a255a79840f82a7927e0c73
Parents: 773f67e
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Aug 28 12:51:30 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Aug 28 12:51:30 2015 +0300

--
 ambari-web/app/templates/application.hbs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e04050e8/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index 3b373d6..a72e3d6 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -142,7 +142,7 @@
 /a
 /p
 {{#if 
App.router.mainAdminStackAndUpgradeController.isFinalizeItem}}
-  p class=span10 alert alert-warning{{t 
admin.stackVersions.version.upgrade.notFinalized.warning}}/p
+  p class=span10 alert alert-danger{{t 
admin.stackVersions.version.upgrade.notFinalized.warning}}/p
 {{/if}}
   {{/if}}
 /div



[2/2] ambari git commit: AMBARI-12868. Improve calls to the localStorage (onechiporenko)

2015-08-28 Thread onechiporenko
AMBARI-12868. Improve calls to the localStorage (onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: 33c694b181c5c1c10293bc4ecf008d54960fc23b
Parents: e04050e
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Aug 28 12:53:36 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Aug 28 12:53:36 2015 +0300

--
 .../app/controllers/main/admin/stack_and_upgrade_controller.js   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/33c694b1/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 fa5b479..ddca7f1 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
@@ -163,7 +163,9 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   initDBProperties: function () {
 var props = this.getDBProperties(this.get('wizardStorageProperties'));
 Em.keys(props).forEach(function (k) {
-  this.set(k, props[k]);
+  if (props[k]) {
+this.set(k, props[k]);
+  }
 }, this);
   },
 



ambari git commit: AMBARI-12911. FE: Stack Meta for JDK support (alexantonenko)

2015-08-28 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 33c694b18 - 0731e999d


AMBARI-12911. FE: Stack Meta for JDK support (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: 0731e999d98a014201b25b1f3a112977ea18e886
Parents: 33c694b
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Aug 28 13:06:10 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Aug 28 13:46:58 2015 +0300

--
 .../controllers/global/cluster_controller.js|  8 ++
 ambari-web/app/controllers/installer.js | 53 ++-
 ambari-web/app/mappers/stack_mapper.js  |  4 +-
 ambari-web/app/messages.js  |  4 +
 ambari-web/app/models/stack.js  |  2 +
 ambari-web/app/routes/installer.js  | 14 +--
 ambari-web/app/utils/string_utils.js|  6 +-
 ambari-web/test/controllers/installer_test.js   | 95 +++-
 8 files changed, 175 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0731e999/ambari-web/app/controllers/global/cluster_controller.js
--
diff --git a/ambari-web/app/controllers/global/cluster_controller.js 
b/ambari-web/app/controllers/global/cluster_controller.js
index e182719..f564daa 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -41,6 +41,12 @@ App.ClusterController = Em.Controller.extend({
 
   isServiceMetricsLoaded: false,
 
+  /**
+   * Ambari uses custom jdk.
+   * @type {Boolean}
+   */
+  isCustomJDK: false,
+
   isHostContentLoaded: function () {
 return this.get('isHostsLoaded')  this.get('isComponentsStateLoaded');
   }.property('isHostsLoaded', 'isComponentsStateLoaded'),
@@ -349,6 +355,8 @@ App.ClusterController = Em.Controller.extend({
   loadAmbariPropertiesSuccess: function (data) {
 console.log('loading ambari properties');
 this.set('ambariProperties', data.RootServiceComponents.properties);
+// Absence of 'jdk.name' and 'jce.name' properties says that ambari 
configured with custom jdk.
+this.set('isCustomJDK', 
App.isEmptyObject(App.permit(data.RootServiceComponents.properties, 
['jdk.name', 'jce.name'])));
   },
 
   loadAmbariPropertiesError: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0731e999/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 3e97c4f..82e13f4 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -18,6 +18,7 @@
 
 
 var App = require('app');
+var stringUtils = require('utils/string_utils');
 
 App.InstallerController = App.WizardController.extend({
 
@@ -606,7 +607,15 @@ App.InstallerController = App.WizardController.extend({
   {
 type: 'async',
 callback: function () {
-  return this.loadStacks();
+  var dfd = $.Deferred();
+
+  this.loadStacks().always(function() {
+
App.router.get('clusterController').loadAmbariProperties().always(function() {
+  dfd.resolve();
+});
+  });
+
+  return dfd.promise();
 }
   },
   {
@@ -719,5 +728,47 @@ App.InstallerController = App.WizardController.extend({
   var step = this.get('isStepDisabled').findProperty('step', i);
   step.set('value', true);
 }
+  },
+
+
+  /**
+   * Compare jdk versions used for ambari and selected stack.
+   * Validation check will fire only for non-custom jdk configuration.
+   *
+   * @param {Function} successCallback
+   * @param {Function} failCallback
+   */
+  validateJDKVersion: function (successCallback, failCallback) {
+var selectedStack = App.Stack.find().findProperty('isSelected', true),
+currentJDKVersion = 
App.router.get('clusterController.ambariProperties')['java.version'],
+minJDKVersion = selectedStack.get('minJdkVersion'),
+maxJDKVersion = selectedStack.get('maxJdkVersion'),
+t = Em.I18n.t,
+fCallback = failCallback || function() {},
+sCallback = successCallback || function() {};
+
+// Skip jdk check if min and max required version not set in stack 
definition.
+if (!minJDKVersion  !maxJDKVersion) {
+  sCallback();
+  return;
+}
+
+if (currentJDKVersion) {
+  if (stringUtils.compareVersions(currentJDKVersion, 
selectedStack.get('minJdkVersion'))  0 ||
+  

ambari git commit: AMBARI-12911. FE: Stack Meta for JDK support (alexantonenko)

2015-08-28 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6fc314414 - 04d0eae4c


AMBARI-12911. FE: Stack Meta for JDK support (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 04d0eae4cd789eb8e983e08a6f7bce7989df2b52
Parents: 6fc3144
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Aug 28 13:14:47 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Aug 28 13:14:47 2015 +0300

--
 .../controllers/global/cluster_controller.js|  8 ++
 ambari-web/app/controllers/installer.js | 53 ++-
 ambari-web/app/mappers/stack_mapper.js  |  4 +-
 ambari-web/app/messages.js  |  4 +
 ambari-web/app/models/stack.js  |  2 +
 ambari-web/app/routes/installer.js  | 14 +--
 ambari-web/app/utils/string_utils.js|  6 +-
 ambari-web/test/controllers/installer_test.js   | 95 +++-
 8 files changed, 175 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/04d0eae4/ambari-web/app/controllers/global/cluster_controller.js
--
diff --git a/ambari-web/app/controllers/global/cluster_controller.js 
b/ambari-web/app/controllers/global/cluster_controller.js
index e182719..f564daa 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -41,6 +41,12 @@ App.ClusterController = Em.Controller.extend({
 
   isServiceMetricsLoaded: false,
 
+  /**
+   * Ambari uses custom jdk.
+   * @type {Boolean}
+   */
+  isCustomJDK: false,
+
   isHostContentLoaded: function () {
 return this.get('isHostsLoaded')  this.get('isComponentsStateLoaded');
   }.property('isHostsLoaded', 'isComponentsStateLoaded'),
@@ -349,6 +355,8 @@ App.ClusterController = Em.Controller.extend({
   loadAmbariPropertiesSuccess: function (data) {
 console.log('loading ambari properties');
 this.set('ambariProperties', data.RootServiceComponents.properties);
+// Absence of 'jdk.name' and 'jce.name' properties says that ambari 
configured with custom jdk.
+this.set('isCustomJDK', 
App.isEmptyObject(App.permit(data.RootServiceComponents.properties, 
['jdk.name', 'jce.name'])));
   },
 
   loadAmbariPropertiesError: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/04d0eae4/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 3e97c4f..82e13f4 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -18,6 +18,7 @@
 
 
 var App = require('app');
+var stringUtils = require('utils/string_utils');
 
 App.InstallerController = App.WizardController.extend({
 
@@ -606,7 +607,15 @@ App.InstallerController = App.WizardController.extend({
   {
 type: 'async',
 callback: function () {
-  return this.loadStacks();
+  var dfd = $.Deferred();
+
+  this.loadStacks().always(function() {
+
App.router.get('clusterController').loadAmbariProperties().always(function() {
+  dfd.resolve();
+});
+  });
+
+  return dfd.promise();
 }
   },
   {
@@ -719,5 +728,47 @@ App.InstallerController = App.WizardController.extend({
   var step = this.get('isStepDisabled').findProperty('step', i);
   step.set('value', true);
 }
+  },
+
+
+  /**
+   * Compare jdk versions used for ambari and selected stack.
+   * Validation check will fire only for non-custom jdk configuration.
+   *
+   * @param {Function} successCallback
+   * @param {Function} failCallback
+   */
+  validateJDKVersion: function (successCallback, failCallback) {
+var selectedStack = App.Stack.find().findProperty('isSelected', true),
+currentJDKVersion = 
App.router.get('clusterController.ambariProperties')['java.version'],
+minJDKVersion = selectedStack.get('minJdkVersion'),
+maxJDKVersion = selectedStack.get('maxJdkVersion'),
+t = Em.I18n.t,
+fCallback = failCallback || function() {},
+sCallback = successCallback || function() {};
+
+// Skip jdk check if min and max required version not set in stack 
definition.
+if (!minJDKVersion  !maxJDKVersion) {
+  sCallback();
+  return;
+}
+
+if (currentJDKVersion) {
+  if (stringUtils.compareVersions(currentJDKVersion, 
selectedStack.get('minJdkVersion'))  0 ||
+  

ambari git commit: AMBARI-12904 AMS keytabs share same principal for HBase daemons (dsen)

2015-08-28 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 bb877b81a - d1a73


AMBARI-12904 AMS keytabs share same principal for HBase daemons (dsen)


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

Branch: refs/heads/branch-2.1
Commit: d1a736a0b8a60bf67117fe5beae18b11bd88
Parents: bb877b8
Author: Dmytro Sen d...@apache.org
Authored: Fri Aug 28 12:28:00 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Fri Aug 28 12:31:09 2015 +0300

--
 .../resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json | 4 ++--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json  | 2 +-
 .../src/main/resources/stacks/HDPWIN/2.1/role_command_order.json | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d1a7/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
index dac60f3..8753b1f 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
@@ -14,7 +14,7 @@
 {
   name: ams_hbase_master_hbase,
   principal: {
-value: amshbase/_HOST@${realm},
+value: amshbasemaster/_HOST@${realm},
 type: service,
 configuration: 
ams-hbase-security-site/hbase.master.kerberos.principal,
 local_username: ${ams-env/ambari_metrics_user}
@@ -35,7 +35,7 @@
 {
   name: ams_hbase_regionserver_hbase,
   principal: {
-value: amshbase/_HOST@${realm},
+value: amshbasers/_HOST@${realm},
 type: service,
 configuration: 
ams-hbase-security-site/hbase.regionserver.kerberos.principal,
 local_username: ${ams-env/ambari_metrics_user}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1a7/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 9140912..f5ecd7b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -32,7 +32,7 @@
   },
   _comment : Dependencies that are used when GLUSTERFS is not present in 
cluster,
   optional_no_glusterfs: {
-METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START],
+METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START, 
SECONDARY_NAMENODE-START],
 AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK: [METRICS_COLLECTOR-START, 
HDFS_SERVICE_CHECK-SERVICE_CHECK],
 SECONDARY_NAMENODE-START: [NAMENODE-START],
 RESOURCEMANAGER-START: [NAMENODE-START, DATANODE-START],

http://git-wip-us.apache.org/repos/asf/ambari/blob/d1a7/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
index daa7f80..0c7dd60 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
@@ -53,7 +53,7 @@
   },
   _comment : Dependencies that are used when GLUSTERFS is not present in 
cluster,
   optional_no_glusterfs: {
-METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START],
+METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START, 
SECONDARY_NAMENODE-START],
 AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK: [METRICS_COLLECTOR-START, 
HDFS_SERVICE_CHECK-SERVICE_CHECK],
 SECONDARY_NAMENODE-START: [NAMENODE-START],
 RESOURCEMANAGER-START: [NAMENODE-START, DATANODE-START],



ambari git commit: AMBARI-12899 Heatmaps page request metrics when Ambari Metrics service is absent. (atkach)

2015-08-28 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk 85c87bffa - cd3a55783


AMBARI-12899 Heatmaps page request metrics when Ambari Metrics service is 
absent. (atkach)


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

Branch: refs/heads/trunk
Commit: cd3a55783dc76803b644902da142f0509c5e808f
Parents: 85c87bf
Author: Andrii Tkach atk...@hortonworks.com
Authored: Thu Aug 27 15:43:14 2015 +0300
Committer: Andrii Tkach atk...@hortonworks.com
Committed: Fri Aug 28 12:35:54 2015 +0300

--
 .../views/common/widget/heatmap_widget_view.js  | 38 +++-
 1 file changed, 37 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3a5578/ambari-web/app/views/common/widget/heatmap_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/heatmap_widget_view.js 
b/ambari-web/app/views/common/widget/heatmap_widget_view.js
index 62c6cd2..e4aa6c1 100644
--- a/ambari-web/app/views/common/widget/heatmap_widget_view.js
+++ b/ambari-web/app/views/common/widget/heatmap_widget_view.js
@@ -33,6 +33,12 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
*/
   racks: [],
 
+  /**
+   * @type {$.ajax|null}
+   * @default null
+   */
+  activeRequest: null,
+
   onMetricsLoaded: function () {
 if (!this.get('isLoaded')) {
   this.set('controller.inputMaximum', 
this.get('content.properties.max_limit'));
@@ -40,6 +46,36 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
 this._super();
   },
 
+  willDestroyElement: function () {
+if ($.isPlainObject(this.get('activeRequest'))) {
+  this.get('activeRequest').abort();
+  this.set('activeRequest', null);
+}
+  },
+
+  getHostComponentsMetrics: function (request) {
+var ajax = this._super(request);
+this.set('activeRequest', ajax);
+return ajax;
+  },
+
+  getHostsMetrics: function (request) {
+var ajax = this._super(request);
+this.set('activeRequest', ajax);
+return ajax;
+  },
+
+  /**
+   * skip metrics loading if AMBARI METRICS service is not started
+   */
+  loadMetrics: function () {
+if (App.Service.find('AMBARI_METRICS').get('isStarted')) {
+  this._super();
+} else {
+  this.onMetricsLoaded();
+}
+  },
+
   /**
* draw widget
*/
@@ -65,7 +101,7 @@ App.HeatmapWidgetView = Em.View.extend(App.WidgetMixin, {
   App.loadTimer.finish('Heatmaps Page');
   App.loadTimer.finish('Service Heatmaps Page');
 }
-  },
+  }.observes('racks.@each.isLoaded'),
 
   /**
* calculate value for heatmap widgets



[2/2] ambari git commit: AMBARI-12868. Improve calls to the localStorage (onechiporenko)

2015-08-28 Thread onechiporenko
AMBARI-12868. Improve calls to the localStorage (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 6fc31441476879fb668bc47f6d0c00d18cba4fd7
Parents: f4286d5
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Aug 28 12:53:36 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Aug 28 13:10:41 2015 +0300

--
 .../app/controllers/main/admin/stack_and_upgrade_controller.js   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6fc31441/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 fa5b479..ddca7f1 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
@@ -163,7 +163,9 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   initDBProperties: function () {
 var props = this.getDBProperties(this.get('wizardStorageProperties'));
 Em.keys(props).forEach(function (k) {
-  this.set(k, props[k]);
+  if (props[k]) {
+this.set(k, props[k]);
+  }
 }, this);
   },
 



svn commit: r10325 - in /release/ambari/ambari-2.1.1: ./ apache-ambari-2.1.1-src.tar.gz apache-ambari-2.1.1-src.tar.gz.asc apache-ambari-2.1.1-src.tar.gz.md5 apache-ambari-2.1.1-src.tar.gz.sha1

2015-08-28 Thread ncole
Author: ncole
Date: Fri Aug 28 11:32:25 2015
New Revision: 10325

Log:
Committing Release 2.1.1

Added:
release/ambari/ambari-2.1.1/
release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz   (with props)
release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.asc   (with 
props)
release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.md5
release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.sha1

Added: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz
==
Binary file - no diff available.

Propchange: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz
--
svn:mime-type = application/x-gzip

Added: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.asc
==
Binary file - no diff available.

Propchange: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.asc
--
svn:mime-type = application/pgp-signature

Added: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.md5
==
--- release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.md5 (added)
+++ release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.md5 Fri Aug 28 
11:32:25 2015
@@ -0,0 +1 @@
+MD5(apache-ambari-2.1.1-src.tar.gz)= b9f6054836cd14b22ee486231f6ae09a

Added: release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.sha1
==
--- release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.sha1 (added)
+++ release/ambari/ambari-2.1.1/apache-ambari-2.1.1-src.tar.gz.sha1 Fri Aug 28 
11:32:25 2015
@@ -0,0 +1 @@
+SHA1(apache-ambari-2.1.1-src.tar.gz)= 39a7a4e69310ba82d60ef7313aa76ac39986f815




ambari git commit: AMBARI-12904 AMS keytabs share same principal for HBase daemons (dsen)

2015-08-28 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk b39288aab - 49c052e59


AMBARI-12904 AMS keytabs share same principal for HBase daemons (dsen)


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

Branch: refs/heads/trunk
Commit: 49c052e59343283828858d723573d7ba4c59a8d9
Parents: b39288a
Author: Dmytro Sen d...@apache.org
Authored: Fri Aug 28 12:28:00 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Fri Aug 28 12:28:00 2015 +0300

--
 .../resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json | 4 ++--
 .../src/main/resources/stacks/HDP/2.0.6/role_command_order.json  | 2 +-
 .../src/main/resources/stacks/HDPWIN/2.1/role_command_order.json | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/49c052e5/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
index dac60f3..8753b1f 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
@@ -14,7 +14,7 @@
 {
   name: ams_hbase_master_hbase,
   principal: {
-value: amshbase/_HOST@${realm},
+value: amshbasemaster/_HOST@${realm},
 type: service,
 configuration: 
ams-hbase-security-site/hbase.master.kerberos.principal,
 local_username: ${ams-env/ambari_metrics_user}
@@ -35,7 +35,7 @@
 {
   name: ams_hbase_regionserver_hbase,
   principal: {
-value: amshbase/_HOST@${realm},
+value: amshbasers/_HOST@${realm},
 type: service,
 configuration: 
ams-hbase-security-site/hbase.regionserver.kerberos.principal,
 local_username: ${ams-env/ambari_metrics_user}

http://git-wip-us.apache.org/repos/asf/ambari/blob/49c052e5/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
index 9140912..f5ecd7b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
@@ -32,7 +32,7 @@
   },
   _comment : Dependencies that are used when GLUSTERFS is not present in 
cluster,
   optional_no_glusterfs: {
-METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START],
+METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START, 
SECONDARY_NAMENODE-START],
 AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK: [METRICS_COLLECTOR-START, 
HDFS_SERVICE_CHECK-SERVICE_CHECK],
 SECONDARY_NAMENODE-START: [NAMENODE-START],
 RESOURCEMANAGER-START: [NAMENODE-START, DATANODE-START],

http://git-wip-us.apache.org/repos/asf/ambari/blob/49c052e5/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
index daa7f80..0c7dd60 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
@@ -53,7 +53,7 @@
   },
   _comment : Dependencies that are used when GLUSTERFS is not present in 
cluster,
   optional_no_glusterfs: {
-METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START],
+METRICS_COLLECTOR-START: [NAMENODE-START, DATANODE-START, 
SECONDARY_NAMENODE-START],
 AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK: [METRICS_COLLECTOR-START, 
HDFS_SERVICE_CHECK-SERVICE_CHECK],
 SECONDARY_NAMENODE-START: [NAMENODE-START],
 RESOURCEMANAGER-START: [NAMENODE-START, DATANODE-START],



ambari git commit: AMBARI-12917 Changing python path in ams-env does not affect psutil build (dsen)

2015-08-28 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 0731e999d - ea10b0f51


AMBARI-12917 Changing python path in ams-env does not affect psutil build (dsen)


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

Branch: refs/heads/branch-2.1
Commit: ea10b0f51447a36a0c4aabc2ff467a057475d7fe
Parents: 0731e99
Author: Dmytro Sen d...@apache.org
Authored: Fri Aug 28 16:48:33 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Fri Aug 28 16:50:02 2015 +0300

--
 .../conf/unix/ambari-metrics-monitor| 24 ++--
 1 file changed, 12 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ea10b0f5/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
--
diff --git 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
index f927359..815b3e4 100644
--- 
a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
+++ 
b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor
@@ -67,18 +67,6 @@ function write_pidfile
 fi
 }
 
-#TODO decide if rebuild on each start (pretty quickly) to tolerate major node 
changes (like kernel update)
-#build psutil
-if [ ! $(ls -A ${RESOURCE_MONITORING_DIR}/psutil/build) ]; then
-  echo Building psutil...
-  dir=$(pwd)
-  cd ${RESOURCE_MONITORING_DIR}/psutil
-  ${PYTHON} setup.py build
-  cd ${dir}
-else
-  echo psutil build directory is not empty, continuing...
-fi
-
 #locate config dir
 while [[ -z ${_ams_configs_done} ]]; do
   case $1 in
@@ -110,6 +98,18 @@ else
   exit 1
 fi
 
+#TODO decide if rebuild on each start (pretty quickly) to tolerate major node 
changes (like kernel update)
+#build psutil
+if [ ! $(ls -A ${RESOURCE_MONITORING_DIR}/psutil/build) ]; then
+  echo Building psutil...
+  dir=$(pwd)
+  cd ${RESOURCE_MONITORING_DIR}/psutil
+  ${PYTHON} setup.py build
+  cd ${dir}
+else
+  echo psutil build directory is not empty, continuing...
+fi
+
 # Set log directory path
 if [[ -n ${AMS_MONITOR_LOG_DIR} ]]; then
   OUTFILE=${AMS_MONITOR_LOG_DIR}/ambari-metrics-monitor.out



ambari git commit: AMBARI-12918 Ambari Metrics check fails intermittently when Starting all services (dsen)

2015-08-28 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk a8786789f - 92d345591


AMBARI-12918 Ambari Metrics check fails intermittently when Starting all 
services (dsen)


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

Branch: refs/heads/trunk
Commit: 92d345591b3fcd28d54a1f28104939b09cdeb376
Parents: a878678
Author: Dmytro Sen d...@apache.org
Authored: Fri Aug 28 17:14:24 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Fri Aug 28 17:14:24 2015 +0300

--
 .../AMBARI_METRICS/0.1.0/package/scripts/service_check.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/92d34559/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
index d58626a..7c68d98 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
@@ -38,7 +38,7 @@ import socket
 class AMSServiceCheck(Script):
   AMS_METRICS_POST_URL = /ws/v1/timeline/metrics/
   AMS_METRICS_GET_URL = /ws/v1/timeline/metrics?%s
-  AMS_CONNECT_TRIES = 5
+  AMS_CONNECT_TRIES = 10
   AMS_CONNECT_TIMEOUT = 10
 
   @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)



ambari git commit: AMBARI-12918 Ambari Metrics check fails intermittently when Starting all services (dsen)

2015-08-28 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ea10b0f51 - 38766da3e


AMBARI-12918 Ambari Metrics check fails intermittently when Starting all 
services (dsen)


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

Branch: refs/heads/branch-2.1
Commit: 38766da3e3f28ac17e40c4e4a11b20469de6da27
Parents: ea10b0f
Author: Dmytro Sen d...@apache.org
Authored: Fri Aug 28 17:14:24 2015 +0300
Committer: Dmytro Sen d...@apache.org
Committed: Fri Aug 28 17:15:59 2015 +0300

--
 .../AMBARI_METRICS/0.1.0/package/scripts/service_check.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/38766da3/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
index d58626a..7c68d98 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
@@ -38,7 +38,7 @@ import socket
 class AMSServiceCheck(Script):
   AMS_METRICS_POST_URL = /ws/v1/timeline/metrics/
   AMS_METRICS_GET_URL = /ws/v1/timeline/metrics?%s
-  AMS_CONNECT_TRIES = 5
+  AMS_CONNECT_TRIES = 10
   AMS_CONNECT_TIMEOUT = 10
 
   @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)



ambari git commit: AMBARI-12919. UI lag causing Edit button to be missed from Admin Kerberos Tab (alexantonenko)

2015-08-28 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 92d345591 - 48ba8e15d


AMBARI-12919. UI lag causing Edit button to be missed from Admin Kerberos Tab 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 48ba8e15d628f55f991d57e6093237bb83a2f3e4
Parents: 92d3455
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Aug 28 17:50:51 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Aug 28 17:55:45 2015 +0300

--
 ambari-web/app/controllers/main/admin/kerberos.js | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/48ba8e15/ambari-web/app/controllers/main/admin/kerberos.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos.js 
b/ambari-web/app/controllers/main/admin/kerberos.js
index 85f9afd..f4d2428 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -466,13 +466,15 @@ App.MainAdminKerberosController = 
App.KerberosWizardStep4Controller.extend({
 
 
   makeConfigsEditable: function () {
-this.set('isEditMode', true);
-this.get('stepConfigs').forEach(function (_stepConfig) {
-  _stepConfig.get('configs').setEach('isEditable', true);
+if (!this.get('stepConfigs') || !this.get('stepConfigs.length')) {
+  this.set('isEditMode', true);
+  this.get('stepConfigs').forEach(function (_stepConfig) {
+_stepConfig.get('configs').setEach('isEditable', true);
 _stepConfig.get('configs').forEach(function (_config) {
   _config.set('isEditable', _config.get('name') != 'realm');
 });
-}, this);
+  }, this);
+}
   },
 
   _updateConfigs: function () {



ambari git commit: AMBARI-12920. “Oozie Quick links in Ambari points to incorrect URL after enabling SSL (alexantonenko)

2015-08-28 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 48ba8e15d - 3bccd97a7


AMBARI-12920. “Oozie Quick links in Ambari points to incorrect URL after 
enabling SSL (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 3bccd97a78e7c10c6e93d2e157bed267fe2ecae4
Parents: 48ba8e1
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Aug 28 19:01:10 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Aug 28 19:01:10 2015 +0300

--
 .../app/views/common/quick_view_link_view.js | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3bccd97a/ambari-web/app/views/common/quick_view_link_view.js
--
diff --git a/ambari-web/app/views/common/quick_view_link_view.js 
b/ambari-web/app/views/common/quick_view_link_view.js
index 8eb8d7c..9fa2044 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -142,7 +142,7 @@ App.QuickViewLinks = Em.View.extend({
 } else if (hosts.length == 1) {
 
   quickLinks = this.get('content.quickLinks').map(function (item) {
-var protocol = self.setProtocol(item.get('service_id'), 
self.get('configProperties'), self.ambariProperties());
+var protocol = self.setProtocol(item.get('service_id'), 
self.get('configProperties'), self.ambariProperties(), item);
 if (item.get('template')) {
   var port = item.get('http_config')  self.setPort(item, protocol);
   if (['FALCON', 'OOZIE', 'ATLAS'].contains(item.get('service_id'))) {
@@ -326,7 +326,7 @@ App.QuickViewLinks = Em.View.extend({
* @returns {string} https or http only!
* @method setProtocol
*/
-  setProtocol: function (service_id, configProperties, ambariProperties) {
+  setProtocol: function (service_id, configProperties, ambariProperties, item) 
{
 var hadoopSslEnabled = false;
 if (configProperties  configProperties.length  0) {
   var hdfsSite = configProperties.findProperty('type', 'hdfs-site');
@@ -380,6 +380,20 @@ App.QuickViewLinks = Em.View.extend({
 }
 return http;
 break;
+  case OOZIE:
+var site = configProperties.findProperty('type', 'oozie-site');
+var url = site  site.properties  site.properties['oozie.base.url'];
+var re = new RegExp(item.get('regex'));
+var portValue = url  url.match(re);
+var port = portValue  portValue.length  portValue[1];
+var protocol = 'http';
+
+if (port === '11443') {
+  protocol = 'https';
+}
+
+return protocol;
+break;
   case RANGER:
 var rangerProperties = configProperties  
configProperties.findProperty('type', 'ranger-admin-site');
 var rangerSiteProperties = configProperties  
configProperties.findProperty('type', 'ranger-site');
@@ -442,6 +456,7 @@ App.QuickViewLinks = Em.View.extend({
 
 var re = new RegExp(item.get('regex'));
 var portValue = propertyValue.match(re);
+
 return  portValue[1];
   },
 



ambari git commit: AMBARI-12920. “Oozie Quick links in Ambari points to incorrect URL after enabling SSL (alexantonenko)

2015-08-28 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 d5d630fd7 - a2ed53375


AMBARI-12920. “Oozie Quick links in Ambari points to incorrect URL after 
enabling SSL (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: a2ed53375dcff1d1b74721f683aa3248611e8b59
Parents: d5d630f
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Aug 28 19:01:10 2015 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Aug 28 19:04:05 2015 +0300

--
 .../app/views/common/quick_view_link_view.js | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2ed5337/ambari-web/app/views/common/quick_view_link_view.js
--
diff --git a/ambari-web/app/views/common/quick_view_link_view.js 
b/ambari-web/app/views/common/quick_view_link_view.js
index 8eb8d7c..9fa2044 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -142,7 +142,7 @@ App.QuickViewLinks = Em.View.extend({
 } else if (hosts.length == 1) {
 
   quickLinks = this.get('content.quickLinks').map(function (item) {
-var protocol = self.setProtocol(item.get('service_id'), 
self.get('configProperties'), self.ambariProperties());
+var protocol = self.setProtocol(item.get('service_id'), 
self.get('configProperties'), self.ambariProperties(), item);
 if (item.get('template')) {
   var port = item.get('http_config')  self.setPort(item, protocol);
   if (['FALCON', 'OOZIE', 'ATLAS'].contains(item.get('service_id'))) {
@@ -326,7 +326,7 @@ App.QuickViewLinks = Em.View.extend({
* @returns {string} https or http only!
* @method setProtocol
*/
-  setProtocol: function (service_id, configProperties, ambariProperties) {
+  setProtocol: function (service_id, configProperties, ambariProperties, item) 
{
 var hadoopSslEnabled = false;
 if (configProperties  configProperties.length  0) {
   var hdfsSite = configProperties.findProperty('type', 'hdfs-site');
@@ -380,6 +380,20 @@ App.QuickViewLinks = Em.View.extend({
 }
 return http;
 break;
+  case OOZIE:
+var site = configProperties.findProperty('type', 'oozie-site');
+var url = site  site.properties  site.properties['oozie.base.url'];
+var re = new RegExp(item.get('regex'));
+var portValue = url  url.match(re);
+var port = portValue  portValue.length  portValue[1];
+var protocol = 'http';
+
+if (port === '11443') {
+  protocol = 'https';
+}
+
+return protocol;
+break;
   case RANGER:
 var rangerProperties = configProperties  
configProperties.findProperty('type', 'ranger-admin-site');
 var rangerSiteProperties = configProperties  
configProperties.findProperty('type', 'ranger-site');
@@ -442,6 +456,7 @@ App.QuickViewLinks = Em.View.extend({
 
 var re = new RegExp(item.get('regex'));
 var portValue = propertyValue.match(re);
+
 return  portValue[1];
   },
 



ambari git commit: AMBARI-12921. SQLA: DB host field for Hive service is blank after cluster installation. (jaimin)

2015-08-28 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk 6bae723eb - ab72beede


AMBARI-12921. SQLA: DB host field for Hive service is blank after cluster 
installation. (jaimin)


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

Branch: refs/heads/trunk
Commit: ab72beede0ebb7563c59e97a1fa62876d5f3d354
Parents: 6bae723
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Fri Aug 28 14:58:02 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Fri Aug 28 15:01:40 2015 -0700

--
 ambari-web/app/utils/configs/database.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab72beed/ambari-web/app/utils/configs/database.js
--
diff --git a/ambari-web/app/utils/configs/database.js 
b/ambari-web/app/utils/configs/database.js
index 74ff642..4ad1bd1 100644
--- a/ambari-web/app/utils/configs/database.js
+++ b/ambari-web/app/utils/configs/database.js
@@ -61,7 +61,7 @@ module.exports = {
 postgres: 'jdbc:postgresql://{0}:5432/{1}',
 derby: 'jdbc:derby:{0}/{1}',
 oracle: 'jdbc:oracle:thin:@(?:\/?\/?){0}:1521(\:|\/){1}',
-sqla: 'jdbc:sqlanywhere:host={0};database={1};uid={2};pwd={3}'
+sqla: 'jdbc:sqlanywhere:host={0};database={1}'
   },
 
   /**
@@ -151,7 +151,7 @@ module.exports = {
   getDBLocationFromJDBC: function(jdbcUrl) {
 var self = this;
 var matches = Em.keys(this.DB_JDBC_PATTERNS).map(function(key) {
-  var reg = new RegExp(self.DB_JDBC_PATTERNS[key].format('(.*)', '(.*)', 
'(.*)', '(.*)'));
+  var reg = new RegExp(self.DB_JDBC_PATTERNS[key].format('(.*)', '(.*)'));
   return jdbcUrl.match(reg);
 }).compact();
 if (matches.length) {



ambari git commit: AMBARI-12926. SQLA jdbc connection string gets reset to Mysql connection string even if DB is selected as SQLA. (jaimin)

2015-08-28 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk ab72beede - 7493d18dd


AMBARI-12926. SQLA jdbc connection string gets reset to Mysql connection string 
even if DB is selected as SQLA. (jaimin)


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

Branch: refs/heads/trunk
Commit: 7493d18ddad526f9c04aafd0acf8aa70bc52ee32
Parents: ab72bee
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Fri Aug 28 15:03:42 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Fri Aug 28 15:03:42 2015 -0700

--
 ambari-web/app/views/common/controls_view.js | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7493d18d/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 4ff6222..10f182b 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -441,6 +441,14 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   },
 
   /**
+   * Radio buttons that are not DB options and should not trigger any observer 
or change any other property's value
+   * Ranger service - Authentication method property is an example for non 
DB related radio button
+   */
+  nonDBRadioButtons: function() {
+return this.get('dontUseHandleDbConnection').without('DB_FLAVOR');
+  }.property('dontUseHandleDbConnection'),
+
+  /**
* properties with these names don'use handleDBConnectionProperty method
*/
   dontUseHandleDbConnection: function () {
@@ -497,8 +505,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   }.property('serviceConfig.serviceName', 'serviceConfig.value'),
 
   onOptionsChange: function () {
-// The following if condition will be satisfied only for installer wizard 
flow
-if (this.get('hostNameProperty')) {
+if (this.get('hostNameProperty')  
!this.get('nonDBRadioButtons').contains(this.get('serviceConfig.name'))) {
   /** if new db is selected host name must be same as master of selected 
service (and can't be changed)**/
   if (this.get('isNewDb')) {
 var initProperty = this.get('hostNameProperty.recommendedValue') || 
this.get('hostNameProperty.savedValue');



[1/2] ambari git commit: AMBARI-12889 - Distribute Repository For Upgrade With Unhealthy Hosts (jonathanhurley)

2015-08-28 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 e606c9f95 - 504b00b83


AMBARI-12889 - Distribute Repository For Upgrade With Unhealthy Hosts 
(jonathanhurley)


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

Branch: refs/heads/branch-2.1
Commit: c7c873b5a9ca16570ee95616fa67d0684eebb8e1
Parents: e606c9f
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Wed Aug 26 17:10:45 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Fri Aug 28 18:16:02 2015 -0400

--
 .../ClusterStackVersionResourceProvider.java| 67 --
 .../org/apache/ambari/server/state/Cluster.java | 24 +--
 .../server/state/cluster/ClusterImpl.java   | 42 ++--
 ...ClusterStackVersionResourceProviderTest.java | 11 ++-
 .../server/state/cluster/ClusterTest.java   | 71 ++--
 5 files changed, 162 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7c873b5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
index 6590d00..be0af16 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
@@ -20,6 +20,7 @@ package org.apache.ambari.server.controller.internal;
 import static 
org.apache.ambari.server.agent.ExecutionCommand.KeyNames.JDK_LOCATION;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -70,7 +71,9 @@ import 
org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
 import org.apache.ambari.server.orm.entities.StackEntity;
 import org.apache.ambari.server.serveraction.upgrades.FinalizeUpgradeAction;
 import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Host;
+import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.RepositoryVersionState;
 import org.apache.ambari.server.state.ServiceComponentHost;
 import org.apache.ambari.server.state.ServiceInfo;
@@ -300,17 +303,19 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
 desiredRepoVersion = (String) 
propertyMap.get(CLUSTER_STACK_VERSION_REPOSITORY_VERSION_PROPERTY_ID);
 
 Cluster cluster;
-MapString, Host hostsForCluster;
-
 AmbariManagementController managementController = 
getManagementController();
 AmbariMetaInfo ami = managementController.getAmbariMetaInfo();
+
 try {
-  cluster = managementController.getClusters().getCluster(clName);
-  hostsForCluster = 
managementController.getClusters().getHostsForCluster(clName);
+  Clusters clusters = managementController.getClusters();
+  cluster = clusters.getCluster(clName);
 } catch (AmbariException e) {
   throw new NoSuchParentResourceException(e.getMessage(), e);
 }
 
+// get all of the host eligible for stack distribution
+ListHost hosts = getHostsForStackDistribution(cluster);
+
 final StackId stackId;
 if (propertyMap.containsKey(CLUSTER_STACK_VERSION_STACK_PROPERTY_ID) 
 
propertyMap.containsKey(CLUSTER_STACK_VERSION_VERSION_PROPERTY_ID)) {
@@ -352,13 +357,13 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
 
 RequestStageContainer req = createRequest();
 
-IteratorHost hostsForClusterIter = hostsForCluster.values().iterator();
+IteratorHost hostIterator = hosts.iterator();
 MapString, String hostLevelParams = new HashMapString, String();
 hostLevelParams.put(JDK_LOCATION, 
getManagementController().getJdkResourceUrl());
 String hostParamsJson = StageUtils.getGson().toJson(hostLevelParams);
 
 int maxTasks = configuration.getAgentPackageParallelCommandsLimit();
-int hostCount = hostsForCluster.size();
+int hostCount = hosts.size();
 int batchCount = (int) (Math.ceil((double)hostCount / maxTasks));
 
 long stageId = req.getLastStageId() + 1;
@@ -394,25 +399,27 @@ public class ClusterStackVersionResourceProvider extends 
AbstractControllerResou
   stages.add(stage);
 
   // Populate with 

[2/2] ambari git commit: AMBARI-12903 - Pre-Req Checks Should Only Warn On Unhealthy Slave Hosts Not In MM (jonathanhurley)

2015-08-28 Thread jonathanhurley
AMBARI-12903 - Pre-Req Checks Should Only Warn On Unhealthy Slave Hosts Not In 
MM (jonathanhurley)


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

Branch: refs/heads/branch-2.1
Commit: 504b00b831d469f654b664f9933a6f37f9a3c02c
Parents: c7c873b
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu Aug 27 12:04:24 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Fri Aug 28 18:16:03 2015 -0400

--
 .../ambari/server/checks/CheckDescription.java  |  4 +-
 .../server/checks/HostsHeartbeatCheck.java  | 58 +---
 .../checks/HostsRepositoryVersionCheck.java | 73 +++-
 .../server/checks/HostsHeartbeatCheckTest.java  | 27 ++--
 4 files changed, 111 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/504b00b8/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 5cfbb47..7151b0e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -41,7 +41,9 @@ public enum CheckDescription {
   All hosts must be heartbeating with the Ambari Server unless they are 
in Maintenance Mode,
   new HashMapString, String() {{
 put(AbstractCheckDescriptor.DEFAULT,
-The following hosts must be heartbeating to the Ambari Server: 
{{fails}}.);
+The following hosts must be heartbeating to the Ambari Server or 
be put into maintenance mode.);
+put(HostsHeartbeatCheck.KEY_HOSTS_IN_MM_WARNING,
+The following hosts are in maintenance mode and will not be a 
part of the upgrade.);
   }}),
 
   HOSTS_MASTER_MAINTENANCE(PrereqCheckType.HOST,

http://git-wip-us.apache.org/repos/asf/ambari/blob/504b00b8/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsHeartbeatCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsHeartbeatCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsHeartbeatCheck.java
index 6076a32..a8600c4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsHeartbeatCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/HostsHeartbeatCheck.java
@@ -17,13 +17,13 @@
  */
 package org.apache.ambari.server.checks;
 
-import java.util.Map;
+import java.util.Collection;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.PrereqCheckRequest;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Host;
-import org.apache.ambari.server.state.HostHealthStatus;
+import org.apache.ambari.server.state.HostHealthStatus.HealthStatus;
 import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.stack.PrereqCheckStatus;
 import org.apache.ambari.server.state.stack.PrerequisiteCheck;
@@ -31,12 +31,23 @@ import 
org.apache.ambari.server.state.stack.PrerequisiteCheck;
 import com.google.inject.Singleton;
 
 /**
- * Checks that all hosts are either in maintenance mode or heartbeating with 
the server.
+ * Checks that all hosts are heartbeating with the Ambari Server. If there is a
+ * host which is not heartbeating, then it must be in maintenance mode to
+ * prevent a failure of this check.
+ * p/
+ * Hosts that are in maintenance mode will be added to a warning that they will
+ * not be included in the upgrade.
+ * p/
+ * This check will return {@link PrereqCheckStatus#FAIL} if there are hosts not
+ * heartbeating and not in maintenance mode. Otherwise, it will return
+ * {@link PrereqCheckStatus#WARNING} for any hosts in maintenance mode.
  */
 @Singleton
 @UpgradeCheck(group = UpgradeCheckGroup.LIVELINESS, order = 1.0f)
 public class HostsHeartbeatCheck extends AbstractCheckDescriptor {
 
+  static final String KEY_HOSTS_IN_MM_WARNING = key.hosts.in.mm.warning;
+
   /**
* Constructor.
*/
@@ -45,19 +56,48 @@ public class HostsHeartbeatCheck extends 
AbstractCheckDescriptor {
   }
 
   @Override
-  public void perform(PrerequisiteCheck prerequisiteCheck, PrereqCheckRequest 
request) throws AmbariException {
+  public void perform(PrerequisiteCheck prerequisiteCheck, PrereqCheckRequest 
request)
+  throws AmbariException 

ambari git commit: AMBARI-12925: [PluggableStackDefinition] Update SAPHD versioning (jluniya)

2015-08-28 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a2ed53375 - b396d71f2


AMBARI-12925: [PluggableStackDefinition] Update SAPHD versioning (jluniya)


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

Branch: refs/heads/branch-2.1
Commit: b396d71f2e9192de802130f71072ebfad31b1fd5
Parents: a2ed533
Author: Jayush Luniya jlun...@hortonworks.com
Authored: Fri Aug 28 14:52:54 2015 -0700
Committer: Jayush Luniya jlun...@hortonworks.com
Committed: Fri Aug 28 14:54:00 2015 -0700

--
 .../pluggable_stack_definition/configs/SAPHD.json | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b396d71f/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
--
diff --git 
a/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json 
b/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
index 2ffa54d..176f4c5 100644
--- 
a/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
+++ 
b/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
@@ -8,7 +8,7 @@
   preservedText: [ext-2.2, HDP-oozie, hdp.version, HDP_VERSION],
   uiMapping: [
 {
-  stackVersionNumber: 2.3,
+  stackVersionNumber: 1.0,
   sign: ,
   baseStackFolder: HDP2
 }
@@ -20,7 +20,7 @@
 jdk1.8.url : http://DOWNLOAD_NOT_SUPPORTED;,
 jdk1.7.jcpol-url : http://DOWNLOAD_NOT_SUPPORTED;,
 jdk1.8.jcpol-url : http://DOWNLOAD_NOT_SUPPORTED;,
-rolling.upgrade.min.stack : SAPHD-2.2
+rolling.upgrade.min.stack : SAPHD-0.9
   },
   common-services: [
 {
@@ -101,7 +101,7 @@
   ],
   versions: [
 {
-  version: 2.0.6,
+  version: 0.7,
   baseVersion: 2.0.6,
   family: redhat6,suse11,
   active: false,
@@ -152,7 +152,7 @@
   ]
 },
 {
-  version: 2.1,
+  version: 0.8,
   baseVersion: 2.1,
   active: false,
   family: redhat6,suse11,
@@ -217,7 +217,7 @@
   ]
 },
 {
-  version: 2.2,
+  version: 0.9,
   baseVersion: 2.2,
   active: false,
   family: redhat6,suse11,
@@ -294,7 +294,7 @@
   ]
 },
 {
-  version: 2.3,
+  version: 1.0,
   baseVersion: 2.3,
   active: true,
   family: redhat6,redhat7,suse11,
@@ -383,4 +383,4 @@
   ]
 }
   ]
-}
\ No newline at end of file
+}



ambari git commit: AMBARI-12921. SQLA: DB host field for Hive service is blank after cluster installation. (jaimin)

2015-08-28 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 0ed0eeb49 - e606c9f95


AMBARI-12921. SQLA: DB host field for Hive service is blank after cluster 
installation. (jaimin)


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

Branch: refs/heads/branch-2.1
Commit: e606c9f9578b6abccc7f303127ab0d546b3c5a71
Parents: 0ed0eeb
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Fri Aug 28 15:00:42 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Fri Aug 28 15:00:42 2015 -0700

--
 ambari-web/app/views/common/controls_view.js | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e606c9f9/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index d61c367..92d49c8 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -440,6 +440,14 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   },
 
   /**
+   * Radio buttons that are not DB options and should not trigger any observer 
or change any other property's value
+   * Ranger service - Authentication method property is an example for non 
DB related radio button
+   */
+  nonDBRadioButtons: function() {
+return this.get('dontUseHandleDbConnection').without('DB_FLAVOR');
+  }.property('dontUseHandleDbConnection'),
+
+  /**
* properties with these names don'use handleDBConnectionProperty method
*/
   dontUseHandleDbConnection: function () {
@@ -496,8 +504,7 @@ App.ServiceConfigRadioButtons = 
Ember.View.extend(App.ServiceConfigCalculateId,
   }.property('serviceConfig.serviceName', 'serviceConfig.value'),
 
   onOptionsChange: function () {
-// The following if condition will be satisfied only for installer wizard 
flow
-if (this.get('hostNameProperty')) {
+if (this.get('hostNameProperty')  
!this.get('nonDBRadioButtons').contains(this.get('serviceConfig.name'))) {
   /** if new db is selected host name must be same as master of selected 
service (and can't be changed)**/
   if (this.get('isNewDb')) {
 var initProperty = this.get('hostNameProperty.recommendedValue') || 
this.get('hostNameProperty.savedValue');