ambari git commit: AMBARI-13468. Strange behavior on Customize Services -> Review transition (onechiporenko)

2015-10-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 823c3b988 -> 0ccc873e8


AMBARI-13468. Strange behavior on Customize Services -> Review transition 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 0ccc873e884f713025e1f56f21a3d8e5aab4c5af
Parents: 823c3b9
Author: Oleg Nechiporenko 
Authored: Mon Oct 19 13:49:53 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Mon Oct 19 14:07:29 2015 +0300

--
 ambari-web/app/controllers/wizard.js|  7 ++
 .../app/controllers/wizard/step7_controller.js  | 79 +++-
 .../test/controllers/wizard/step7_test.js   | 96 +++-
 .../test/mappers/configs/themes_mapper_test.js  |  6 +-
 4 files changed, 159 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ccc873e/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index 2049099..fdee580 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -238,6 +238,13 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
 return this.get('currentStep') == 10;
   }.property('currentStep'),
 
+  /**
+   * Move user to the selected step
+   *
+   * @param {number} step number of the step, where user is moved
+   * @param {boolean} disableNaviWarning true - don't show warning about 
moving more than 1 step back
+   * @returns {boolean}
+   */
   gotoStep: function (step, disableNaviWarning) {
 if (this.get('isStepDisabled').findProperty('step', step).get('value') !== 
false) {
   return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ccc873e/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 635b26a..8bb37f7 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1242,9 +1242,9 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   getAmbariDatabaseSuccess: function (data) {
 var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_hostname').value;
 var ambariServiceHostComponents = data.hostComponents;
-if (!!ambariServiceHostComponents.length) {
+if (ambariServiceHostComponents.length) {
   var ambariDBInfo = 
JSON.stringify(ambariServiceHostComponents[0].RootServiceHostComponents.properties);
-  this.set('mySQLServerConflict', ambariDBInfo.indexOf('mysql') > 0 && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
+  this.set('mySQLServerConflict', ambariDBInfo.contains('mysql') && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
 } else {
   this.set('mySQLServerConflict', false);
 }
@@ -1266,34 +1266,63 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_database').value;
 if (hiveDBType == 'New MySQL Database') {
   var self = this;
-  this.checkMySQLHost().done(function () {
-if (self.get('mySQLServerConflict')) {
-  // error popup before you can proceed
+  return this.checkMySQLHost().done(function () {
+self.mySQLWarningHandler();
+  });
+}
+else {
+  this.moveNext();
+}
+  },
+
+  /**
+   * Show warning popup about MySQL-DB issues (on post-submit)
+   *
+   * @returns {*}
+   * @method mySQLWarningHandler
+   */
+  mySQLWarningHandler: function () {
+var self = this;
+if (this.get('mySQLServerConflict')) {
+  // error popup before you can proceed
+  return App.ModalPopup.show({
+header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
+body:Em.I18n.t('installer.step7.popup.mySQLWarning.body'),
+secondary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
+primary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
+encodeBody: false,
+onPrimary: function () {
+  this._super();
+  self.set('submitButtonClicked', false);
+},
+onSecondary: function () {
+  var parent = this;
   return App.ModalPopup.show({
-header: 

[2/2] ambari git commit: AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)

2015-10-19 Thread aonishuk
AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: c308ea513a4a592d7335e9a9a3c23469989b9e6e
Parents: 66de959
Author: Andrew Onishuk 
Authored: Mon Oct 19 14:25:33 2015 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 19 14:25:33 2015 +0300

--
 .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c308ea51/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
index 6b3aae1..a4e9c54 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
@@ -37,7 +37,7 @@ def accumulo_service( name,
   ignore_failures=True)
   if name != 'tserver':
 Execute(format("{daemon_script} 
org.apache.accumulo.master.state.SetGoalState NORMAL"),
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
 )
   address = params.hostname
@@ -45,7 +45,7 @@ def accumulo_service( name,
 address = '0.0.0.0'
   daemon_cmd = format("{daemon_script} {role} --address {address} > 
{log_dir}/accumulo-{role}.out 2>{log_dir}/accumulo-{role}.err & echo $! > 
{pid_file}")
   Execute ( daemon_cmd,
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
 
@@ -54,11 +54,11 @@ def accumulo_service( name,
 
   pid = format("`cat {pid_file}` >/dev/null 2>&1")
   Execute(format("kill {pid}"),
-not_if=no_pid_exists,
+not_if=as_user(no_pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
   Execute(format("kill -9 {pid}"),
-not_if=format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"),
+not_if=as_user(format("sleep 2; {no_pid_exists} || sleep 20; 
{no_pid_exists}"), params.accumulo_user),
 ignore_failures=True,
 user=params.accumulo_user
   )



ambari git commit: AMBARI-13402 Increase zk timeout for embedded mode (dsen)

2015-10-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 c308ea513 -> 202254bb8


AMBARI-13402 Increase zk timeout for embedded mode (dsen)


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

Branch: refs/heads/branch-2.1
Commit: 202254bb8a2289c96f49a2dd453f30c67b25dafe
Parents: c308ea5
Author: Dmytro Sen 
Authored: Mon Oct 19 15:31:11 2015 +0300
Committer: Dmytro Sen 
Committed: Mon Oct 19 15:32:33 2015 +0300

--
 .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/202254bb/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
index 165b87e..17f9b81 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
@@ -265,7 +265,7 @@
   
   
 zookeeper.session.timeout.localHBaseCluster
-2
+12
 
   ZooKeeper session timeout in milliseconds for
   pseudo distributed mode.



ambari git commit: AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 202254bb8 -> 94b630733


AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.


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

Branch: refs/heads/branch-2.1
Commit: 94b630733c3feb42a8609b05d8f2cf9076552fc1
Parents: 202254b
Author: Alex Antonenko 
Authored: Mon Oct 19 15:39:30 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 15:47:36 2015 +0300

--
 .../controllers/global/cluster_controller.js|  1 +
 .../main/admin/kerberos/step2_controller.js |  4 ---
 .../main/admin/kerberos/wizard_controller.js|  9 +--
 ambari-web/app/mappers/cluster_mapper.js|  4 +--
 .../common/kdc_credentials_controller_mixin.js  |  5 ++--
 ambari-web/app/models/cluster.js| 10 +--
 .../app/views/common/chart/linear_time.js   |  8 +++---
 .../common/form/manage_credentials_form_view.js |  9 +++
 .../common/modal_popups/invalid_KDC_popup.js| 15 +++
 .../test/mappers/configs/themes_mapper_test.js  |  6 +++--
 .../kdc_credentials_controller_mixin_test.js| 28 
 .../form/manage_kdc_credentials_form_test.js|  6 ++---
 12 files changed, 31 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/94b63073/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 f411d37..b80d6c2 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -187,6 +187,7 @@ App.ClusterController = Em.Controller.extend({
 
 App.HttpClient.get(clusterUrl, App.clusterMapper, {
   complete: function (jqXHR, textStatus) {
+App.set('isCredentialStorePersistent', 
Em.getWithDefault(App.Cluster.find().findProperty('clusterName', 
App.get('clusterName')), 'isCredentialStorePersistent', false));
   }
 }, function (jqXHR, textStatus) {
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/94b63073/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index af135c6..9b291b9 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -36,10 +36,6 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend(App.KDCCred
 
   addMiscTabToPage: false,
 
-  isStorePersisted: function() {
-return this.get('wizardController.content.secureStoragePersisted');
-  }.property('wizardController.content.secureStoragePersisted'),
-
   /**
* @type {boolean} true if test connection to hosts is in progress
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/94b63073/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index 71095da..72591ea 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -59,8 +59,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
 services: [],
 advancedServiceConfig: null,
 serviceConfigProperties: [],
-failedTask: null,
-secureStoragePersisted: null
+failedTask: null
   }),
 
   /**
@@ -236,13 +235,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
   {
 type: 'sync',
 callback: function () {
-  var self = this;
   this.loadKerberosOption();
-  if (App.get('supports.storeKDCCredentials')) {
-
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
-  self.set('content.secureStoragePersisted', isPersisted);
-});
-  }
 }
   }
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/94b63073/ambari-web/app/mappers/cluster_mapper.js
--
diff --git a/ambari-web/app/mappers/cluster_mapper.js 

ambari git commit: AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 27acc3af4 -> 16b2f928c


AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.


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

Branch: refs/heads/trunk
Commit: 16b2f928c74204fda45dedca4605568cd3ef0aa7
Parents: 27acc3a
Author: Alex Antonenko 
Authored: Mon Oct 19 15:39:30 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 15:49:02 2015 +0300

--
 .../controllers/global/cluster_controller.js|  1 +
 .../main/admin/kerberos/step2_controller.js |  4 ---
 .../main/admin/kerberos/wizard_controller.js|  9 +--
 ambari-web/app/mappers/cluster_mapper.js|  4 +--
 .../common/kdc_credentials_controller_mixin.js  |  5 ++--
 ambari-web/app/models/cluster.js| 10 +--
 .../app/views/common/chart/linear_time.js   |  8 +++---
 .../common/form/manage_credentials_form_view.js |  9 +++
 .../common/modal_popups/invalid_KDC_popup.js| 15 +++
 .../kdc_credentials_controller_mixin_test.js| 28 
 .../form/manage_kdc_credentials_form_test.js|  6 ++---
 11 files changed, 27 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/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 8c7b19c..6fdfc18 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -197,6 +197,7 @@ App.ClusterController = 
Em.Controller.extend(App.ReloadPopupMixin, {
 
 App.HttpClient.get(clusterUrl, App.clusterMapper, {
   complete: function (jqXHR, textStatus) {
+App.set('isCredentialStorePersistent', 
Em.getWithDefault(App.Cluster.find().findProperty('clusterName', 
App.get('clusterName')), 'isCredentialStorePersistent', false));
   }
 }, function (jqXHR, textStatus) {
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index 77a27e5..59cb813 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -36,10 +36,6 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend(App.KDCCred
 
   addMiscTabToPage: false,
 
-  isStorePersisted: function() {
-return this.get('wizardController.content.secureStoragePersisted');
-  }.property('wizardController.content.secureStoragePersisted'),
-
   /**
* @type {boolean} true if test connection to hosts is in progress
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index 4541914..69329a0 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -64,8 +64,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
 services: [],
 advancedServiceConfig: null,
 serviceConfigProperties: [],
-failedTask: null,
-secureStoragePersisted: null
+failedTask: null
   }),
 
   /**
@@ -241,13 +240,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
   {
 type: 'sync',
 callback: function () {
-  var self = this;
   this.loadKerberosOption();
-  if (App.get('supports.storeKDCCredentials')) {
-
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
-  self.set('content.secureStoragePersisted', isPersisted);
-});
-  }
 }
   }
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/mappers/cluster_mapper.js
--
diff --git a/ambari-web/app/mappers/cluster_mapper.js 
b/ambari-web/app/mappers/cluster_mapper.js
index 

ambari git commit: AMBARI-13402 Increase zk timeout for embedded mode (dsen)

2015-10-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 87999547f -> 27acc3af4


AMBARI-13402 Increase zk timeout for embedded mode (dsen)


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

Branch: refs/heads/trunk
Commit: 27acc3af4c0ff4327f65e175939adf7acc5b88e7
Parents: 8799954
Author: Dmytro Sen 
Authored: Mon Oct 19 15:31:11 2015 +0300
Committer: Dmytro Sen 
Committed: Mon Oct 19 15:31:11 2015 +0300

--
 .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/27acc3af/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
index 165b87e..17f9b81 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
@@ -265,7 +265,7 @@
   
   
 zookeeper.session.timeout.localHBaseCluster
-2
+12
 
   ZooKeeper session timeout in milliseconds for
   pseudo distributed mode.



[1/2] ambari git commit: AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)

2015-10-19 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 66de959d8 -> c308ea513
  refs/heads/trunk 0ccc873e8 -> 87999547f


AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)


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

Branch: refs/heads/trunk
Commit: 87999547f18c560744a2296853e9106ca377ad5a
Parents: 0ccc873
Author: Andrew Onishuk 
Authored: Mon Oct 19 14:25:30 2015 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 19 14:25:30 2015 +0300

--
 .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/87999547/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
index 6b3aae1..a4e9c54 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
@@ -37,7 +37,7 @@ def accumulo_service( name,
   ignore_failures=True)
   if name != 'tserver':
 Execute(format("{daemon_script} 
org.apache.accumulo.master.state.SetGoalState NORMAL"),
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
 )
   address = params.hostname
@@ -45,7 +45,7 @@ def accumulo_service( name,
 address = '0.0.0.0'
   daemon_cmd = format("{daemon_script} {role} --address {address} > 
{log_dir}/accumulo-{role}.out 2>{log_dir}/accumulo-{role}.err & echo $! > 
{pid_file}")
   Execute ( daemon_cmd,
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
 
@@ -54,11 +54,11 @@ def accumulo_service( name,
 
   pid = format("`cat {pid_file}` >/dev/null 2>&1")
   Execute(format("kill {pid}"),
-not_if=no_pid_exists,
+not_if=as_user(no_pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
   Execute(format("kill -9 {pid}"),
-not_if=format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"),
+not_if=as_user(format("sleep 2; {no_pid_exists} || sleep 20; 
{no_pid_exists}"), params.accumulo_user),
 ignore_failures=True,
 user=params.accumulo_user
   )



ambari git commit: AMBARI-13464. Kerberos Wiz: KDC host has moved on the page

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 854894824 -> 42742caba


AMBARI-13464. Kerberos Wiz: KDC host has moved on the page


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

Branch: refs/heads/trunk
Commit: 42742cabad68283e2293866f6163eaf167866268
Parents: 8548948
Author: Alex Antonenko 
Authored: Mon Oct 19 12:05:52 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 12:05:52 2015 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42742cab/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index b846650..66fda2a 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1761,6 +1761,14 @@ var hdp2properties = [
 "index": 0
   },
   {
+"name": "kdc_host",
+"displayType": "supportTextConnection",
+"serviceName": "KERBEROS",
+"filename": "kerberos-env.xml",
+"category": "KDC",
+"index": 1
+  },
+  {
 "name": "realm",
 "displayType": "host",
 "serviceName": "KERBEROS",
@@ -1784,6 +1792,13 @@ var hdp2properties = [
 "index": 4
   },
   {
+"name": "domains",
+"serviceName": "KERBEROS",
+"filename": "krb5-conf.xml",
+"category": "KDC",
+"index": 5
+  },
+  {
 "name": "manage_identities",
 "displayType": "checkbox",
 "serviceName": "KERBEROS",
@@ -1894,13 +1909,6 @@ var hdp2properties = [
 "index" : 13
   },
   {
-"name": "domains",
-"serviceName": "KERBEROS",
-"filename": "krb5-conf.xml",
-"category": "KDC",
-"index": 5
-  },
-  {
 "name": "admin_server_host",
 "displayType": "host",
 "serviceName": "KERBEROS",



ambari git commit: AMBARI-13466. Fix UI unit tests

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 42742caba -> 6d4a93159


AMBARI-13466. Fix UI unit tests


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

Branch: refs/heads/trunk
Commit: 6d4a93159681383613e2fc71958223deacc37471
Parents: 42742ca
Author: Alex Antonenko 
Authored: Mon Oct 19 12:48:43 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 12:48:43 2015 +0300

--
 ambari-web/test/mappers/alert_definitions_mapper_test.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6d4a9315/ambari-web/test/mappers/alert_definitions_mapper_test.js
--
diff --git a/ambari-web/test/mappers/alert_definitions_mapper_test.js 
b/ambari-web/test/mappers/alert_definitions_mapper_test.js
index 3f6ed93..180e728 100644
--- a/ambari-web/test/mappers/alert_definitions_mapper_test.js
+++ b/ambari-web/test/mappers/alert_definitions_mapper_test.js
@@ -21,8 +21,7 @@ require('mappers/alert_definitions_mapper');
 var testHelpers = require('test/helpers');
 
 describe('App.alertDefinitionsMapper', function () {
-
-  describe('#map', function () {
+  describe.skip('#map', function () {
 
 var json = {
   items: [



ambari git commit: AMBARI-13466. Fix UI unit tests.

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 2e021159a -> e145d605f


AMBARI-13466. Fix UI unit tests.


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

Branch: refs/heads/branch-2.1
Commit: e145d605fcc9824cffead24d0ba95d3c221d11d2
Parents: 2e02115
Author: Alex Antonenko 
Authored: Mon Oct 19 12:48:43 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 13:02:23 2015 +0300

--
 ambari-web/test/mappers/alert_definitions_mapper_test.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e145d605/ambari-web/test/mappers/alert_definitions_mapper_test.js
--
diff --git a/ambari-web/test/mappers/alert_definitions_mapper_test.js 
b/ambari-web/test/mappers/alert_definitions_mapper_test.js
index 3f6ed93..180e728 100644
--- a/ambari-web/test/mappers/alert_definitions_mapper_test.js
+++ b/ambari-web/test/mappers/alert_definitions_mapper_test.js
@@ -21,8 +21,7 @@ require('mappers/alert_definitions_mapper');
 var testHelpers = require('test/helpers');
 
 describe('App.alertDefinitionsMapper', function () {
-
-  describe('#map', function () {
+  describe.skip('#map', function () {
 
 var json = {
   items: [



ambari git commit: AMBARI-13464. Kerberos Wiz: KDC host has moved on the page

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 bd31090af -> 2e021159a


AMBARI-13464. Kerberos Wiz: KDC host has moved on the page


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

Branch: refs/heads/branch-2.1
Commit: 2e021159a33d53570945d4fc503023e5ed56c84d
Parents: bd31090
Author: Alex Antonenko 
Authored: Mon Oct 19 12:05:52 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 12:49:28 2015 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2e021159/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index bc57f41..45fb3a8 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1762,6 +1762,14 @@ var hdp2properties = [
 "index": 0
   },
   {
+"name": "kdc_host",
+"displayType": "supportTextConnection",
+"serviceName": "KERBEROS",
+"filename": "kerberos-env.xml",
+"category": "KDC",
+"index": 1
+  },
+  {
 "name": "realm",
 "displayType": "host",
 "serviceName": "KERBEROS",
@@ -1785,6 +1793,13 @@ var hdp2properties = [
 "index": 4
   },
   {
+"name": "domains",
+"serviceName": "KERBEROS",
+"filename": "krb5-conf.xml",
+"category": "KDC",
+"index": 5
+  },
+  {
 "name": "manage_identities",
 "displayType": "checkbox",
 "serviceName": "KERBEROS",
@@ -1895,13 +1910,6 @@ var hdp2properties = [
 "index" : 13
   },
   {
-"name": "domains",
-"serviceName": "KERBEROS",
-"filename": "krb5-conf.xml",
-"category": "KDC",
-"index": 5
-  },
-  {
 "name": "admin_server_host",
 "displayType": "host",
 "serviceName": "KERBEROS",



ambari git commit: AMBARI-13468. Strange behavior on Customize Services -> Review transition (onechiporenko)

2015-10-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 e145d605f -> 7f835344d


AMBARI-13468. Strange behavior on Customize Services -> Review transition 
(onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: 7f835344d36edac4189dac634c6abfe42da28306
Parents: e145d60
Author: Oleg Nechiporenko 
Authored: Mon Oct 19 13:49:53 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Mon Oct 19 13:49:53 2015 +0300

--
 ambari-web/app/controllers/wizard.js|  7 ++
 .../app/controllers/wizard/step7_controller.js  | 79 +++-
 .../test/controllers/wizard/step7_test.js   | 96 +++-
 3 files changed, 155 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f835344/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index fb6bd44..ad78d8c 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -210,6 +210,13 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
 return this.get('currentStep') == 10;
   }.property('currentStep'),
 
+  /**
+   * Move user to the selected step
+   *
+   * @param {number} step number of the step, where user is moved
+   * @param {boolean} disableNaviWarning true - don't show warning about 
moving more than 1 step back
+   * @returns {boolean}
+   */
   gotoStep: function (step, disableNaviWarning) {
 if (this.get('isStepDisabled').findProperty('step', step).get('value') !== 
false) {
   return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f835344/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 189d700..f4c4a4e 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1268,9 +1268,9 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   getAmbariDatabaseSuccess: function (data) {
 var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_hostname').value;
 var ambariServiceHostComponents = data.hostComponents;
-if (!!ambariServiceHostComponents.length) {
+if (ambariServiceHostComponents.length) {
   var ambariDBInfo = 
JSON.stringify(ambariServiceHostComponents[0].RootServiceHostComponents.properties);
-  this.set('mySQLServerConflict', ambariDBInfo.indexOf('mysql') > 0 && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
+  this.set('mySQLServerConflict', ambariDBInfo.contains('mysql') && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
 } else {
   this.set('mySQLServerConflict', false);
 }
@@ -1292,34 +1292,63 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_database').value;
 if (hiveDBType == 'New MySQL Database') {
   var self = this;
-  this.checkMySQLHost().done(function () {
-if (self.get('mySQLServerConflict')) {
-  // error popup before you can proceed
+  return this.checkMySQLHost().done(function () {
+self.mySQLWarningHandler();
+  });
+}
+else {
+  this.moveNext();
+}
+  },
+
+  /**
+   * Show warning popup about MySQL-DB issues (on post-submit)
+   *
+   * @returns {*}
+   * @method mySQLWarningHandler
+   */
+  mySQLWarningHandler: function () {
+var self = this;
+if (this.get('mySQLServerConflict')) {
+  // error popup before you can proceed
+  return App.ModalPopup.show({
+header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
+body:Em.I18n.t('installer.step7.popup.mySQLWarning.body'),
+secondary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
+primary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
+encodeBody: false,
+onPrimary: function () {
+  this._super();
+  self.set('submitButtonClicked', false);
+},
+onSecondary: function () {
+  var parent = this;
   return App.ModalPopup.show({
-header: 

ambari git commit: AMBARI-13465. Customize Services opens the "Advanced" tab by default

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 7f835344d -> 66de959d8


AMBARI-13465. Customize Services opens the "Advanced" tab by default


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

Branch: refs/heads/branch-2.1
Commit: 66de959d8afdbeaf6809dedfca2c042ef984f513
Parents: 7f83534
Author: Alex Antonenko 
Authored: Mon Oct 19 13:05:26 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 13:50:53 2015 +0300

--
 ambari-web/app/models/configs/theme/tab.js   |  5 +
 .../configs/service_config_layout_tab_view.js|  2 ++
 .../views/common/configs/service_config_view.js  | 19 ++-
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/66de959d/ambari-web/app/models/configs/theme/tab.js
--
diff --git a/ambari-web/app/models/configs/theme/tab.js 
b/ambari-web/app/models/configs/theme/tab.js
index 0940022..cb7aeae 100644
--- a/ambari-web/app/models/configs/theme/tab.js
+++ b/ambari-web/app/models/configs/theme/tab.js
@@ -31,6 +31,11 @@ App.Tab = DS.Model.extend({
   isRendered: DS.attr('boolean', {defaultValue: false}),
 
   /**
+   * Determines if all configs were attached to tab.
+   */
+  isConfigsPrepared: DS.attr('boolean', {defaultValue: false}),
+
+  /**
* Number of the errors in all sections in the current tab
* @type {number}
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/66de959d/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js 
b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
index f7a376d..720dd12 100644
--- a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
+++ b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
@@ -172,11 +172,13 @@ App.ServiceConfigLayoutTabView = 
Em.View.extend(App.ConfigOverridable, {
 
   didInsertElement: function () {
 this.set('dataIsReady', false);
+this.set('content.isConfigsPrepared', false);
 this._super();
 this.prepareConfigProperties();
 if (this.get('controller.isCompareMode')) {
   this.get('parentView').filterEnhancedConfigs();
 }
+this.set('content.isConfigsPrepared', true);
 this.set('dataIsReady', true);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/66de959d/ambari-web/app/views/common/configs/service_config_view.js
--
diff --git a/ambari-web/app/views/common/configs/service_config_view.js 
b/ambari-web/app/views/common/configs/service_config_view.js
index 016b546..fc868fa 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -31,6 +31,12 @@ App.ServiceConfigView = Em.View.extend({
   filter: '',
 
   /**
+   * Determines that active tab is set during view initialize.
+   * @type {boolean}
+   */
+  initalActiveTabIsSet: false,
+
+  /**
* Bound from parent view in the template
* @type {object[]}
*/
@@ -182,11 +188,22 @@ App.ServiceConfigView = Em.View.extend({
   advancedTab.set('isRendered', false);
 }
 this.processTabs(tabs);
-this.pickActiveTab(tabs);
 return tabs;
   }.property('controller.selectedServiceNameTrigger'),
 
   /**
+   * Set active tab when view attached and configs are linked to tabs.
+   */
+  initialActiveTabObserver: function() {
+var tabs = this.get('tabs').filterProperty('isAdvanced', false);
+if (tabs.everyProperty('isConfigsPrepared', true) && 
!this.get('initalActiveTabIsSet')) {
+  this.get('tabs').setEach('isActive', false);
+  this.pickActiveTab(this.get('tabs'));
+  this.set('tabsWereSet', true);
+}
+  }.observes('tabs.@each.isConfigsPrepared'),
+
+  /**
* Pick the first non hidden tab and make it active when there is no active 
tab
* @method pickActiveTab
*/



ambari git commit: AMBARI-13465. Customize Services opens the "Advanced" tab by default

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6d4a93159 -> 823c3b988


AMBARI-13465. Customize Services opens the "Advanced" tab by default


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

Branch: refs/heads/trunk
Commit: 823c3b988dad59af5d421ae674fee5ec2c939fc8
Parents: 6d4a931
Author: Alex Antonenko 
Authored: Mon Oct 19 13:05:26 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 13:05:26 2015 +0300

--
 ambari-web/app/models/configs/theme/tab.js   |  5 +
 .../configs/service_config_layout_tab_view.js|  2 ++
 .../views/common/configs/service_config_view.js  | 19 ++-
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/models/configs/theme/tab.js
--
diff --git a/ambari-web/app/models/configs/theme/tab.js 
b/ambari-web/app/models/configs/theme/tab.js
index 0940022..cb7aeae 100644
--- a/ambari-web/app/models/configs/theme/tab.js
+++ b/ambari-web/app/models/configs/theme/tab.js
@@ -31,6 +31,11 @@ App.Tab = DS.Model.extend({
   isRendered: DS.attr('boolean', {defaultValue: false}),
 
   /**
+   * Determines if all configs were attached to tab.
+   */
+  isConfigsPrepared: DS.attr('boolean', {defaultValue: false}),
+
+  /**
* Number of the errors in all sections in the current tab
* @type {number}
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js 
b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
index f7a376d..720dd12 100644
--- a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
+++ b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
@@ -172,11 +172,13 @@ App.ServiceConfigLayoutTabView = 
Em.View.extend(App.ConfigOverridable, {
 
   didInsertElement: function () {
 this.set('dataIsReady', false);
+this.set('content.isConfigsPrepared', false);
 this._super();
 this.prepareConfigProperties();
 if (this.get('controller.isCompareMode')) {
   this.get('parentView').filterEnhancedConfigs();
 }
+this.set('content.isConfigsPrepared', true);
 this.set('dataIsReady', true);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/views/common/configs/service_config_view.js
--
diff --git a/ambari-web/app/views/common/configs/service_config_view.js 
b/ambari-web/app/views/common/configs/service_config_view.js
index 5ad5c2e..ad50998 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -31,6 +31,12 @@ App.ServiceConfigView = Em.View.extend({
   filter: '',
 
   /**
+   * Determines that active tab is set during view initialize.
+   * @type {boolean}
+   */
+  initalActiveTabIsSet: false,
+
+  /**
* Bound from parent view in the template
* @type {object[]}
*/
@@ -180,11 +186,22 @@ App.ServiceConfigView = Em.View.extend({
   advancedTab.set('isRendered', false);
 }
 this.processTabs(tabs);
-this.pickActiveTab(tabs);
 return tabs;
   }.property('controller.selectedServiceNameTrigger'),
 
   /**
+   * Set active tab when view attached and configs are linked to tabs.
+   */
+  initialActiveTabObserver: function() {
+var tabs = this.get('tabs').filterProperty('isAdvanced', false);
+if (tabs.everyProperty('isConfigsPrepared', true) && 
!this.get('initalActiveTabIsSet')) {
+  this.get('tabs').setEach('isActive', false);
+  this.pickActiveTab(this.get('tabs'));
+  this.set('tabsWereSet', true);
+}
+  }.observes('tabs.@each.isConfigsPrepared'),
+
+  /**
* Pick the first non hidden tab and make it active when there is no active 
tab
* @method pickActiveTab
*/



ambari git commit: AMBARI-13458. Expose in the API whether downgrade is supported or not (dgrinenko via dlysnichenko)

2015-10-19 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 16b2f928c -> 7bd1a2a3b


AMBARI-13458. Expose in the API whether downgrade is supported or not 
(dgrinenko via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 7bd1a2a3ba0198111d0447b1ff8ec8cf364e9fef
Parents: 16b2f92
Author: Lisnichenko Dmitro 
Authored: Mon Oct 19 16:18:08 2015 +0300
Committer: Lisnichenko Dmitro 
Committed: Mon Oct 19 16:18:08 2015 +0300

--
 .../internal/UpgradeResourceProvider.java   |  4 ++
 .../server/orm/entities/UpgradeEntity.java  | 15 +-
 .../ambari/server/state/stack/UpgradePack.java  | 18 +++
 .../server/upgrade/UpgradeCatalog213.java   | 27 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  1 +
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  1 +
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  1 +
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  1 +
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |  1 +
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  1 +
 .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml |  1 +
 .../ambari/server/orm/dao/UpgradeDAOTest.java   |  4 ++
 .../server/upgrade/UpgradeCatalog213Test.java   | 56 +++-
 13 files changed, 127 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd1a2a3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 3a52025..a1d2451 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -124,6 +124,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   protected static final String UPGRADE_FROM_VERSION = "Upgrade/from_version";
   protected static final String UPGRADE_TO_VERSION = "Upgrade/to_version";
   protected static final String UPGRADE_DIRECTION = "Upgrade/direction";
+  protected static final String UPGRADE_DOWNGRADE_ALLOWED = 
"Upgrade/downgrade_allowed";
   protected static final String UPGRADE_REQUEST_STATUS = 
"Upgrade/request_status";
   protected static final String UPGRADE_ABORT_REASON = "Upgrade/abort_reason";
   protected static final String UPGRADE_SKIP_PREREQUISITE_CHECKS = 
"Upgrade/skip_prerequisite_checks";
@@ -238,6 +239,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 PROPERTY_IDS.add(UPGRADE_FROM_VERSION);
 PROPERTY_IDS.add(UPGRADE_TO_VERSION);
 PROPERTY_IDS.add(UPGRADE_DIRECTION);
+PROPERTY_IDS.add(UPGRADE_DOWNGRADE_ALLOWED);
 PROPERTY_IDS.add(UPGRADE_SKIP_FAILURES);
 PROPERTY_IDS.add(UPGRADE_SKIP_SC_FAILURES);
 PROPERTY_IDS.add(UPGRADE_SKIP_MANUAL_VERIFICATION);
@@ -462,6 +464,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 setResourceProperty(resource, UPGRADE_FROM_VERSION, 
entity.getFromVersion(), requestedIds);
 setResourceProperty(resource, UPGRADE_TO_VERSION, entity.getToVersion(), 
requestedIds);
 setResourceProperty(resource, UPGRADE_DIRECTION, entity.getDirection(), 
requestedIds);
+setResourceProperty(resource, UPGRADE_DOWNGRADE_ALLOWED, 
entity.isDowngradeAllowed(), requestedIds);
 
 return resource;
   }
@@ -803,6 +806,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 entity.setDirection(direction);
 entity.setUpgradePackage(pack.getName());
 entity.setUpgradeType(pack.getType());
+entity.setDowngradeAllowed(pack.isDowngradeAllowed());
 
 req.getRequestStatusResponse();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd1a2a3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
index ad9073a..297fc8d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
+++ 

ambari git commit: AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar via srimanth)

2015-10-19 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 7bd1a2a3b -> d23917f81


AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar 
via srimanth)


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

Branch: refs/heads/trunk
Commit: d23917f8156c810748450c289c2fc10b43a5294e
Parents: 7bd1a2a
Author: Srimanth Gunturi 
Authored: Mon Oct 19 06:50:43 2015 -0700
Committer: Srimanth Gunturi 
Committed: Mon Oct 19 06:51:35 2015 -0700

--
 contrib/views/hive/pom.xml  |  12 +-
 .../ambari/view/hive/client/Connection.java | 262 ++-
 .../view/hive/client/ConnectionFactory.java |  11 +-
 .../hive/client/HttpBasicAuthInterceptor.java   |  55 
 .../client/HttpKerberosRequestInterceptor.java  |  72 +
 .../hive/client/HttpRequestInterceptorBase.java |  88 +++
 .../apache/ambari/view/hive/client/Utils.java   |  47 +++-
 contrib/views/hive/src/main/resources/view.xml  |  30 +++
 .../ambari/view/hive/client/ConnectionTest.java |   6 +-
 .../hive/resources/jobs/JobLDAPServiceTest.java |   5 +-
 10 files changed, 578 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d23917f8/contrib/views/hive/pom.xml
--
diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml
index 9b5a010..46c3cf1 100644
--- a/contrib/views/hive/pom.xml
+++ b/contrib/views/hive/pom.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
 -->
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://maven.apache.org/POM/4.0.0;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
   4.0.0
   org.apache.ambari.contrib.views
@@ -211,6 +211,16 @@
   commons-io
   2.4
 
+
+  org.apache.httpcomponents
+  httpclient
+  4.5.1
+
+
+  org.apache.httpcomponents
+  httpcore
+  4.4.3
+
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/d23917f8/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
index d93df24..0e42d99 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
@@ -27,16 +27,38 @@ import org.apache.hive.service.auth.KerberosSaslHelper;
 import org.apache.hive.service.auth.PlainSaslHelper;
 import org.apache.hive.service.auth.SaslQOP;
 import org.apache.hive.service.cli.thrift.*;
+import org.apache.http.HttpRequestInterceptor;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.CookieStore;
+import org.apache.http.client.ServiceUnavailableRetryStrategy;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.THttpClient;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
 import javax.security.sasl.Sasl;
 import javax.security.sasl.SaslException;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.security.KeyStore;
+import java.security.SecureRandom;
+import java.sql.SQLException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -81,12 +103,14 @@ public class Connection {
 
   public synchronized void openConnection() throws HiveClientException, 
HiveAuthRequiredException {
 try {
-   

ambari git commit: AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar via srimanth)

2015-10-19 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 94b630733 -> 7d96c7e9e


AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar 
via srimanth)


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

Branch: refs/heads/branch-2.1
Commit: 7d96c7e9e8e07e37afcd90ff46c4f5a37e90da0c
Parents: 94b6307
Author: Srimanth Gunturi 
Authored: Mon Oct 19 06:50:43 2015 -0700
Committer: Srimanth Gunturi 
Committed: Mon Oct 19 06:50:43 2015 -0700

--
 contrib/views/hive/pom.xml  |  12 +-
 .../ambari/view/hive/client/Connection.java | 262 ++-
 .../view/hive/client/ConnectionFactory.java |  11 +-
 .../hive/client/HttpBasicAuthInterceptor.java   |  55 
 .../client/HttpKerberosRequestInterceptor.java  |  72 +
 .../hive/client/HttpRequestInterceptorBase.java |  88 +++
 .../apache/ambari/view/hive/client/Utils.java   |  47 +++-
 contrib/views/hive/src/main/resources/view.xml  |  30 +++
 .../ambari/view/hive/client/ConnectionTest.java |   6 +-
 .../hive/resources/jobs/JobLDAPServiceTest.java |   5 +-
 10 files changed, 578 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7d96c7e9/contrib/views/hive/pom.xml
--
diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml
index 81ddfc1..7fb5c62 100644
--- a/contrib/views/hive/pom.xml
+++ b/contrib/views/hive/pom.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
 -->
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://maven.apache.org/POM/4.0.0;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
   4.0.0
   org.apache.ambari.contrib.views
@@ -211,6 +211,16 @@
   commons-io
   2.4
 
+
+  org.apache.httpcomponents
+  httpclient
+  4.5.1
+
+
+  org.apache.httpcomponents
+  httpcore
+  4.4.3
+
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/7d96c7e9/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
index d93df24..0e42d99 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
@@ -27,16 +27,38 @@ import org.apache.hive.service.auth.KerberosSaslHelper;
 import org.apache.hive.service.auth.PlainSaslHelper;
 import org.apache.hive.service.auth.SaslQOP;
 import org.apache.hive.service.cli.thrift.*;
+import org.apache.http.HttpRequestInterceptor;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.CookieStore;
+import org.apache.http.client.ServiceUnavailableRetryStrategy;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.THttpClient;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
 import javax.security.sasl.Sasl;
 import javax.security.sasl.SaslException;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.security.KeyStore;
+import java.security.SecureRandom;
+import java.sql.SQLException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -81,12 +103,14 @@ public class Connection {
 
   public synchronized void openConnection() throws HiveClientException, 
HiveAuthRequiredException {
 

[36/50] [abbrv] ambari git commit: AMBARI-13459 - Hive Metastore Upgrade Retry Fails Because Of Driver Copy Issue (jonathanhurley)

2015-10-19 Thread ncole
AMBARI-13459 - Hive Metastore Upgrade Retry Fails Because Of Driver Copy Issue 
(jonathanhurley)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: d8d19268a4c7078216d3a1dd3d589d9ff0cf23bb
Parents: 4023dcf
Author: Jonathan Hurley 
Authored: Fri Oct 16 14:09:26 2015 -0400
Committer: Jonathan Hurley 
Committed: Fri Oct 16 16:07:50 2015 -0400

--
 .../package/scripts/hive_metastore.py   | 30 +---
 .../stacks/2.1/HIVE/test_hive_metastore.py  |  8 --
 2 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8d19268/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index 796ec18..8a3833b 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -33,7 +33,6 @@ from resource_management.libraries.functions.security_commons 
import get_params_
 from resource_management.libraries.functions.security_commons import 
validate_security_config_properties
 from resource_management.libraries.functions.security_commons import 
FILE_TYPE_XML
 from resource_management.core.resources.system import File
-from resource_management.core.shell import as_sudo
 
 from hive import hive
 from hive import jdbc_connector
@@ -155,7 +154,7 @@ class HiveMetastoreDefault(HiveMetastore):
 """
 Executes the schema upgrade binary.  This is its own function because it 
could
 be called as a standalone task from the upgrade pack, but is safe to run 
it for each
-metastore instance.
+metastore instance. The schema upgrade on an already upgraded metastore is 
a NOOP.
 
 The metastore schema upgrade requires a database driver library for most
 databases. During an upgrade, it's possible that the library is not 
present,
@@ -173,28 +172,36 @@ class HiveMetastoreDefault(HiveMetastore):
 # present, then download it first
 if params.hive_jdbc_driver in params.hive_jdbc_drivers_list and 
params.hive_use_existing_db:
   target_directory = format("/usr/hdp/{version}/hive/lib")
-  if not os.path.exists(params.target):
-# download it
+
+  # normally, the JDBC driver would be referenced by 
/usr/hdp/current/.../foo.jar
+  # but if hdp-select is called and the restart fails, then this means 
that current pointer
+  # is now pointing to the upgraded version location; that's bad for the 
cp command
+  source_jdbc_file = format(params.target.replace("/usr/hdp/current", 
"/usr/hdp/{current_version}"))
+
+  # download it if it does not exist
+  if not os.path.exists(source_jdbc_file):
 jdbc_connector()
 
+  target_directory_and_filename = os.path.join(target_directory, 
os.path.basename(source_jdbc_file))
+
   if params.sqla_db_used:
 target_native_libs_directory = 
format("{target_directory}/native/lib64")
 
 Execute(format("yes | {sudo} cp {jars_in_hive_lib} 
{target_directory}"))
 
-Directory(target_native_libs_directory,
-  recursive=True)
+Directory(target_native_libs_directory, recursive=True)
 
 Execute(format("yes | {sudo} cp {libs_in_hive_lib} 
{target_native_libs_directory}"))
 
 Execute(format("{sudo} chown -R {hive_user}:{user_group} 
{hive_lib}/*"))
   else:
-Execute(('cp', params.target, target_directory),
-path=["/bin", "/usr/bin/"], sudo = True)
+# copy the JDBC driver from the older metastore location to the new 
location only
+# if it does not already exist
+if not os.path.exists(target_directory_and_filename):
+  Execute(('cp', source_jdbc_file, target_directory),
+path=["/bin", "/usr/bin/"], sudo = True)
 
-  File(os.path.join(target_directory, os.path.basename(params.target)),
-mode = 0644,
-  )
+  File(target_directory_and_filename, mode = 0644)
 
 # build the schema tool command
 binary = format("/usr/hdp/{version}/hive/bin/schematool")
@@ -215,5 +222,6 @@ class HiveMetastoreDefault(HiveMetastore):
 command = format("{binary} -dbType {hive_metastore_db_type} 

[45/50] [abbrv] ambari git commit: AMBARI-13468. Strange behavior on Customize Services -> Review transition (onechiporenko)

2015-10-19 Thread ncole
AMBARI-13468. Strange behavior on Customize Services -> Review transition 
(onechiporenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 0ccc873e884f713025e1f56f21a3d8e5aab4c5af
Parents: 823c3b9
Author: Oleg Nechiporenko 
Authored: Mon Oct 19 13:49:53 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Mon Oct 19 14:07:29 2015 +0300

--
 ambari-web/app/controllers/wizard.js|  7 ++
 .../app/controllers/wizard/step7_controller.js  | 79 +++-
 .../test/controllers/wizard/step7_test.js   | 96 +++-
 .../test/mappers/configs/themes_mapper_test.js  |  6 +-
 4 files changed, 159 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0ccc873e/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index 2049099..fdee580 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -238,6 +238,13 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
 return this.get('currentStep') == 10;
   }.property('currentStep'),
 
+  /**
+   * Move user to the selected step
+   *
+   * @param {number} step number of the step, where user is moved
+   * @param {boolean} disableNaviWarning true - don't show warning about 
moving more than 1 step back
+   * @returns {boolean}
+   */
   gotoStep: function (step, disableNaviWarning) {
 if (this.get('isStepDisabled').findProperty('step', step).get('value') !== 
false) {
   return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/0ccc873e/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 635b26a..8bb37f7 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1242,9 +1242,9 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   getAmbariDatabaseSuccess: function (data) {
 var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_hostname').value;
 var ambariServiceHostComponents = data.hostComponents;
-if (!!ambariServiceHostComponents.length) {
+if (ambariServiceHostComponents.length) {
   var ambariDBInfo = 
JSON.stringify(ambariServiceHostComponents[0].RootServiceHostComponents.properties);
-  this.set('mySQLServerConflict', ambariDBInfo.indexOf('mysql') > 0 && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
+  this.set('mySQLServerConflict', ambariDBInfo.contains('mysql') && 
ambariDBInfo.indexOf(hiveDBHostname) > 0);
 } else {
   this.set('mySQLServerConflict', false);
 }
@@ -1266,34 +1266,63 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 
'HIVE').configs.findProperty('name', 'hive_database').value;
 if (hiveDBType == 'New MySQL Database') {
   var self = this;
-  this.checkMySQLHost().done(function () {
-if (self.get('mySQLServerConflict')) {
-  // error popup before you can proceed
+  return this.checkMySQLHost().done(function () {
+self.mySQLWarningHandler();
+  });
+}
+else {
+  this.moveNext();
+}
+  },
+
+  /**
+   * Show warning popup about MySQL-DB issues (on post-submit)
+   *
+   * @returns {*}
+   * @method mySQLWarningHandler
+   */
+  mySQLWarningHandler: function () {
+var self = this;
+if (this.get('mySQLServerConflict')) {
+  // error popup before you can proceed
+  return App.ModalPopup.show({
+header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
+body:Em.I18n.t('installer.step7.popup.mySQLWarning.body'),
+secondary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
+primary: 
Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
+encodeBody: false,
+onPrimary: function () {
+  this._super();
+  self.set('submitButtonClicked', false);
+},
+onSecondary: function () {
+  var parent = this;
   return App.ModalPopup.show({
-header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
- 

[48/50] [abbrv] ambari git commit: AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.

2015-10-19 Thread ncole
AMBARI-13472. KDC Credentials: Retrieve storage type along with Security Status.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 16b2f928c74204fda45dedca4605568cd3ef0aa7
Parents: 27acc3a
Author: Alex Antonenko 
Authored: Mon Oct 19 15:39:30 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 15:49:02 2015 +0300

--
 .../controllers/global/cluster_controller.js|  1 +
 .../main/admin/kerberos/step2_controller.js |  4 ---
 .../main/admin/kerberos/wizard_controller.js|  9 +--
 ambari-web/app/mappers/cluster_mapper.js|  4 +--
 .../common/kdc_credentials_controller_mixin.js  |  5 ++--
 ambari-web/app/models/cluster.js| 10 +--
 .../app/views/common/chart/linear_time.js   |  8 +++---
 .../common/form/manage_credentials_form_view.js |  9 +++
 .../common/modal_popups/invalid_KDC_popup.js| 15 +++
 .../kdc_credentials_controller_mixin_test.js| 28 
 .../form/manage_kdc_credentials_form_test.js|  6 ++---
 11 files changed, 27 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/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 8c7b19c..6fdfc18 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -197,6 +197,7 @@ App.ClusterController = 
Em.Controller.extend(App.ReloadPopupMixin, {
 
 App.HttpClient.get(clusterUrl, App.clusterMapper, {
   complete: function (jqXHR, textStatus) {
+App.set('isCredentialStorePersistent', 
Em.getWithDefault(App.Cluster.find().findProperty('clusterName', 
App.get('clusterName')), 'isCredentialStorePersistent', false));
   }
 }, function (jqXHR, textStatus) {
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index 77a27e5..59cb813 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -36,10 +36,6 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend(App.KDCCred
 
   addMiscTabToPage: false,
 
-  isStorePersisted: function() {
-return this.get('wizardController.content.secureStoragePersisted');
-  }.property('wizardController.content.secureStoragePersisted'),
-
   /**
* @type {boolean} true if test connection to hosts is in progress
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index 4541914..69329a0 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -64,8 +64,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
 services: [],
 advancedServiceConfig: null,
 serviceConfigProperties: [],
-failedTask: null,
-secureStoragePersisted: null
+failedTask: null
   }),
 
   /**
@@ -241,13 +240,7 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
   {
 type: 'sync',
 callback: function () {
-  var self = this;
   this.loadKerberosOption();
-  if (App.get('supports.storeKDCCredentials')) {
-
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
-  self.set('content.secureStoragePersisted', isPersisted);
-});
-  }
 }
   }
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/16b2f928/ambari-web/app/mappers/cluster_mapper.js
--
diff --git a/ambari-web/app/mappers/cluster_mapper.js 
b/ambari-web/app/mappers/cluster_mapper.js
index 4604aaf..5689867 100644
--- 

[42/50] [abbrv] ambari git commit: AMBARI-13464. Kerberos Wiz: KDC host has moved on the page

2015-10-19 Thread ncole
AMBARI-13464. Kerberos Wiz: KDC host has moved on the page


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 42742cabad68283e2293866f6163eaf167866268
Parents: 8548948
Author: Alex Antonenko 
Authored: Mon Oct 19 12:05:52 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 12:05:52 2015 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42742cab/ambari-web/app/data/HDP2/site_properties.js
--
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index b846650..66fda2a 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1761,6 +1761,14 @@ var hdp2properties = [
 "index": 0
   },
   {
+"name": "kdc_host",
+"displayType": "supportTextConnection",
+"serviceName": "KERBEROS",
+"filename": "kerberos-env.xml",
+"category": "KDC",
+"index": 1
+  },
+  {
 "name": "realm",
 "displayType": "host",
 "serviceName": "KERBEROS",
@@ -1784,6 +1792,13 @@ var hdp2properties = [
 "index": 4
   },
   {
+"name": "domains",
+"serviceName": "KERBEROS",
+"filename": "krb5-conf.xml",
+"category": "KDC",
+"index": 5
+  },
+  {
 "name": "manage_identities",
 "displayType": "checkbox",
 "serviceName": "KERBEROS",
@@ -1894,13 +1909,6 @@ var hdp2properties = [
 "index" : 13
   },
   {
-"name": "domains",
-"serviceName": "KERBEROS",
-"filename": "krb5-conf.xml",
-"category": "KDC",
-"index": 5
-  },
-  {
 "name": "admin_server_host",
 "displayType": "host",
 "serviceName": "KERBEROS",



[21/50] [abbrv] ambari git commit: AMBARI-13449. FE changes for persisting/updating/removing KDC admin credentials.

2015-10-19 Thread ncole
AMBARI-13449. FE changes for persisting/updating/removing KDC admin credentials.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1076ec760bdafae4de876e66e39acad4f26c0b7e
Parents: 4a95428
Author: Alex Antonenko 
Authored: Fri Oct 16 13:13:53 2015 +0300
Committer: Alex Antonenko 
Committed: Fri Oct 16 13:38:21 2015 +0300

--
 ambari-web/app/assets/test/tests.js |   1 +
 .../app/controllers/main/admin/kerberos.js  |   5 +
 .../main/admin/kerberos/wizard_controller.js|  10 +-
 ambari-web/app/messages.js  |   3 +
 .../common/kdc_credentials_controller_mixin.js  |   5 +-
 ambari-web/app/styles/common.less   |   8 +-
 .../common/form/manage_credentilas_form.hbs |  58 +
 .../app/templates/main/admin/kerberos.hbs   |   3 +
 ambari-web/app/utils/ajax/ajax.js   |   2 +-
 ambari-web/app/utils/credentials.js |  47 -
 ambari-web/app/views.js |   2 +
 .../common/form/manage_credentials_form_view.js | 209 +++
 .../common/modal_popups/invalid_KDC_popup.js|   2 +-
 .../manage_kdc_credentials_popup.js |  58 +
 .../form/manage_kdc_credentials_form_test.js| 138 
 15 files changed, 535 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1076ec76/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 5b5f588..b59f91f 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -273,6 +273,7 @@ var files = [
   'test/views/common/controls_view_test',
   'test/views/common/configs/widgets/time_interval_spinner_view_test',
   'test/views/common/form/spinner_input_view_test',
+  'test/views/common/form/manage_kdc_credentials_form_test',
   'test/views/wizard/step3/hostLogPopupBody_view_test',
   'test/views/wizard/step3/hostWarningPopupBody_view_test',
   'test/views/wizard/step3/hostWarningPopupFooter_view_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1076ec76/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 ca2f0dc..d339f63 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -582,5 +582,10 @@ App.MainAdminKerberosController = 
App.KerberosWizardStep4Controller.extend({
 dfd.reject();
   }, Em.I18n.t('common.warning'), Em.I18n.t('common.proceedAnyway'));
 }
+  },
+
+  showManageKDCCredentialsPopup: function() {
+return App.showManageCredentialsPopup();
   }
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/1076ec76/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index 6209f29..e0e146a 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -263,10 +263,14 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
 callback: function() {
   var self = this;
   var dfd = $.Deferred();
-  
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
-self.set('content.secureStoragePersisted', isPersisted);
+  if (App.get('supports.storeKDCCredentials')) {
+
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
+  self.set('content.secureStoragePersisted', isPersisted);
+  dfd.resolve();
+});
+  } else {
 dfd.resolve();
-  });
+  }
   return dfd.promise();
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1076ec76/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6437ee9..5df161b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1033,6 +1033,9 @@ Em.I18n.translations = {
   

[04/50] [abbrv] ambari git commit: AMBARI-13433. Issues with CSV download.

2015-10-19 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json
--
diff --git a/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json 
b/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json
index 40d9170..576c25f 100644
--- a/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json
+++ b/ambari-web/app/assets/data/cluster_metrics/memory_1hr.json
@@ -2,12 +2,12 @@
   "href" : 
"http://ambari/api/clusters/vmc?fields=metrics/memory[1352702257,1352705857,15];,
   "metrics" : {
 "memory" : {
-  "Cache" : 
"[[2.19856896E8,1352706465],[2.19856896E8,1352706480],[2.146645E8,1352706495],[2.04279808E8,1352706510],[2.04279808E8,1352706525],[2.0454959787E8,1352706540],[2.0529152E8,1352706555],[2.059829248E8,1352706570],[2.07884288E8,1352706585],[2.07884288E8,1352706600],[2.0824692053E8,1352706615],[2.0924416E8,1352706630],[2.0924416E8,1352706645],[2.0981213867E8,1352706660],[2.1137408E8,1352706675],[2.11685376E8,1352706690],[2.1254144E8,1352706705],[2.1254144E8,1352706720],[2.129313792E8,1352706735],[2.14003712E8,1352706750],[2.14003712E8,1352706765],[2.1431282347E8,1352706780],[2.1516288E8,1352706795],[2.15523328E8,1352706810],[2.1696512E8,1352706825],[2.1696512E8,1352706840],[2.1444962987E8,1352706855],[2.07532032E8,1352706870],[2.07532032E8,1352706885],[1.998348288E8,1352706900],[1.7866752E8,1352706915],[1.7916340907E8,1352706930],[1.80527104E8,1352706945],[1.80527104E8,1352706960],[1.806893056E8,1352706975],[1.81743616E8,1352706990],[1.81743616E8,1352707005],[1.819705
 
344E8,1352707020],[1.82878208E8,1352707035],[1.830600704E8,1352707050],[1.84242176E8,1352707065],[1.84242176E8,1352707080],[1.844666368E8,1352707095],[1.8536448E8,1352707110],[1.8536448E8,1352707125],[1.8567031467E8,1352707140],[1.8651136E8,1352707155],[1.868283904E8,1352707170],[1.88096512E8,1352707185],[1.88096512E8,1352707200],[1.888616448E8,1352707215],[1.91922176E8,1352707230],[1.91922176E8,1352707245],[1.90906368E8,1352707260],[1.86843136E8,1352707275],[1.873313792E8,1352707290],[1.89284352E8,1352707305],[1.89284352E8,1352707320],[1.894621184E8,1352707335],[1.90173184E8,1352707350],[1.90173184E8,1352707365],[1.904254976E8,1352707380],[1.91434752E8,1352707395],[1.895170048E8,1352707410],[1.81846016E8,1352707425],[1.81846016E8,1352707440],[1.821253632E8,1352707455],[1.83242752E8,1352707470],[1.83242752E8,1352707485],[1.8375748267E8,1352707500],[1.84786944E8,1352707515],[1.853145088E8,1352707530],[1.86105856E8,1352707545],[1.86105856E8,1352707560],[1.8650589867E8,1352707575],[1.8
 
7305984E8,1352707590],[1.87305984E8,1352707605],[1.84549376E8,1352707620],[1.7903616E8,1352707635],[1.796603904E8,1352707650],[1.80596736E8,1352707665],[1.80596736E8,1352707680],[1.8098449067E8,1352707695],[1.8176E8,1352707710],[1.8176E8,1352707725],[1.82194176E8,1352707740],[1.83062528E8,1352707755],[1.8359883093E8,1352707770],[1.85073664E8,1352707785],[1.85073664E8,1352707800],[1.833091072E8,1352707815],[1.7625088E8,1352707830],[1.7642018133E8,1352707845],[1.7752064E8,1352707860],[1.7752064E8,1352707875],[1.7768502613E8,1352707890],[1.78753536E8,1352707905],[1.78753536E8,1352707920],[1.789779968E8,1352707935],[1.7987584E8,1352707950],[1.7987584E8,1352707965],[1.788010496E8,1352707980],[1.74501888E8,1352707995],[1.7473344853E8,1352708010],[1.76238592E8,1352708025],[1.76238592E8,1352708040],[1.76238592E8,1352708055],[1.77414144E8,1352708070],[1.7749906773E8,1352708085],[1.78688E8,1352708100],[1.78688E8,1352708115],[1.78688E8,1352708130],[1.80191232E8,1352708145],[1.80191232E8,135270
 
8160],[1.80191232E8,1352708175],[1.77688576E8,1352708190],[1.77688576E8,1352708205],[1.78950144E8,1352708220],[1.78950144E8,1352708235],[1.78950144E8,1352708250],[1.80211712E8,1352708265],[1.80211712E8,1352708280],[1.80211712E8,1352708295],[1.81460992E8,1352708310],[1.81460992E8,1352708325],[1.7311552853E8,1352708340],[1.72519424E8,1352708355],[1.72519424E8,1352708370],[1.7511519573E8,1352708385],[1.75300608E8,1352708400],[1.76685056E8,1352708415],[1.76898048E8,1352708430],[1.76898048E8,1352708445],[1.7891437227E8,1352708460],[1.79224576E8,1352708475],[1.79224576E8,1352708490],[1.802764288E8,1352708505],[1.80539392E8,1352708520],[1.7745455787E8,1352708535],[1.763328E8,1352708550],[1.763328E8,1352708565],[1.7743817387E8,1352708580],[1.77840128E8,1352708595],[1.77840128E8,1352708610],[1.78618368E8,1352708625],[1.79007488E8,1352708640],[1.8176E8,1352708655],[1.83595008E8,1352708670],[1.83595008E8,1352708685],[1.780629504E8,1352708700],[1.74374912E8,1352708715],[1.7513076053E8,135270873
 

[02/50] [abbrv] ambari git commit: AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen)

2015-10-19 Thread ncole
AMBARI-13373 hdfs balancer via ambari fails to run once HA is enabled (dsen)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 95d85dbc4a890678a9565b649c037db97076fe67
Parents: 6bcdcd9
Author: Dmytro Sen 
Authored: Thu Oct 15 17:33:02 2015 +0300
Committer: Dmytro Sen 
Committed: Thu Oct 15 17:33:02 2015 +0300

--
 .../server/upgrade/UpgradeCatalog210.java   | 37 +--
 .../server/upgrade/UpgradeCatalog213.java   | 18 
 .../server/upgrade/UpgradeCatalog213Test.java   | 47 
 3 files changed, 77 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/95d85dbc/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index 12a1f44..308e7c9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -122,6 +122,7 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
   private static final String TOPOLOGY_HOST_REQUEST_TABLE = 
"topology_host_request";
   private static final String TOPOLOGY_HOST_TASK_TABLE = "topology_host_task";
   private static final String TOPOLOGY_LOGICAL_TASK_TABLE = 
"topology_logical_task";
+  private static final String HDFS_SITE_CONFIG = "hdfs-site";
 
   // constants for stack table changes
   private static final String STACK_ID_COLUMN_NAME = "stack_id";
@@ -1458,7 +1459,7 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
   /***
* Update dfs.namenode.rpc-address set hostname instead of localhost
*/
-  if (cluster.getDesiredConfigByType("hdfs-site") != null && 
!cluster.getHosts("HDFS","NAMENODE").isEmpty()) {
+  if (cluster.getDesiredConfigByType(HDFS_SITE_CONFIG) != null && 
!cluster.getHosts("HDFS","NAMENODE").isEmpty()) {
 
 URI nameNodeRpc = null;
 String hostName = 
cluster.getHosts("HDFS","NAMENODE").iterator().next();
@@ -1467,33 +1468,19 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
   
cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS") 
!= null) {
   try {
 if (isNNHAEnabled(cluster)) {
-  String nn1RpcAddress = null;
-  Config hdfsSiteConfig = 
cluster.getDesiredConfigByType("hdfs-site");
-  Map properties = 
hdfsSiteConfig.getProperties();
-  String nameServices = properties.get("dfs.nameservices");
-  if (!StringUtils.isEmpty(nameServices)) {
-String namenodes = 
properties.get(String.format("dfs.ha.namenodes.%s",nameServices));
-if (!StringUtils.isEmpty(namenodes) && 
namenodes.split(",").length > 1) {
-  nn1RpcAddress = 
properties.get(String.format("dfs.namenode.rpc-address.%s.%s", nameServices,
-  namenodes.split(",")[0]));
-}
-  }
-  if (!StringUtils.isEmpty(nn1RpcAddress)) {
-if (!nn1RpcAddress.startsWith("http")) {
-  nn1RpcAddress = "http://; + nn1RpcAddress;
-}
-nameNodeRpc= new URI(nn1RpcAddress);
-  } else {
-// set default value
-nameNodeRpc= new URI("http://localhost:8020;);
-  }
+  // NN HA enabled
+  // Remove dfs.namenode.rpc-address property
+  Set removePropertiesSet = new HashSet<>();
+  removePropertiesSet.add("dfs.namenode.rpc-address");
+  removeConfigurationPropertiesFromCluster(cluster, 
HDFS_SITE_CONFIG, removePropertiesSet);
 } else {
+  // NN HA disabled
   nameNodeRpc = new 
URI(cluster.getDesiredConfigByType("core-site").getProperties().get("fs.defaultFS"));
+  Map hdfsProp = new HashMap();
+  hdfsProp.put("dfs.namenode.rpc-address", hostName + ":" + 
nameNodeRpc.getPort());
+  updateConfigurationPropertiesForCluster(cluster, 
HDFS_SITE_CONFIG,
+ 

[10/50] [abbrv] ambari git commit: AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)

2015-10-19 Thread ncole
AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files 
fail to be distributed to some hosts (rlevas)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 868a15d65074b2c4ab8aaf653e7f8779f1124769
Parents: 22f0982
Author: Robert Levas 
Authored: Thu Oct 15 13:42:50 2015 -0400
Committer: Robert Levas 
Committed: Thu Oct 15 13:42:57 2015 -0400

--
 .../server/controller/KerberosHelperImpl.java   |   4 +-
 .../AmbariManagementControllerImplTest.java |  48 
 .../server/controller/KerberosHelperTest.java   | 228 +++
 3 files changed, 277 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/868a15d6/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 dbb59bd..bf8c519 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
@@ -2275,9 +2275,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   private class EnableKerberosHandler extends Handler {
 @Override
 public boolean shouldProcess(SecurityState desiredSecurityState, 
ServiceComponentHost sch) throws AmbariException {
-  return (desiredSecurityState == SecurityState.SECURED_KERBEROS) &&
-  (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) &&
-  (sch.getSecurityState() != SecurityState.SECURING);
+  return (desiredSecurityState == SecurityState.SECURED_KERBEROS);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/868a15d6/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index dd80f46..1d9e53d 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@ -596,6 +596,54 @@ public class AmbariManagementControllerImplTest {
   }
 
   /**
+   * Ensure that when the cluster security type updated from KERBEROS to 
KERBEROS,
+   * KerberosHandler.toggleKerberos IS NOT invoked
+   */
+
+  @Test
+  public void testUpdateClustersToggleKerberosReenable() throws Exception {
+// member state mocks
+Capture controllerCapture = new 
Capture();
+Injector injector = createStrictMock(Injector.class);
+Cluster cluster = createNiceMock(Cluster.class);
+ActionManager actionManager = createNiceMock(ActionManager.class);
+ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class);
+
+// requests
+Set setRequests = Collections.singleton(clusterRequest);
+
+KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class);
+// expectations
+injector.injectMembers(capture(controllerCapture));
+expect(injector.getInstance(Gson.class)).andReturn(null);
+expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null);
+
expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper);
+expect(clusterRequest.getClusterId()).andReturn(1L).times(6);
+
expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
+expect(clusters.getClusterById(1L)).andReturn(cluster).times(2);
+expect(cluster.getClusterName()).andReturn("cluster").times(2);
+
expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
+
+cluster.addSessionAttributes(anyObject(Map.class));
+expectLastCall().once();
+
+expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, 
null))
+.andReturn(false)
+.once();
+// Note: kerberosHelper.toggleKerberos is not called
+
+// replay mocks
+replay(actionManager, cluster, clusters, injector, clusterRequest, 
sessionManager, kerberosHelper);
+
+// test
+AmbariManagementController controller = new 

[15/50] [abbrv] ambari git commit: AMBARI-13412. HAWQ and PXF are not mentioned in the stack service display order (Mithun Mathew via odiachenko).

2015-10-19 Thread ncole
AMBARI-13412. HAWQ and PXF are not mentioned in the stack service display order 
(Mithun Mathew via odiachenko).


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: fbc65a9c4b6b3f33c93e46d04c451eba07eb157c
Parents: 716e258
Author: Oleksandr Diachenko 
Authored: Thu Oct 15 14:27:24 2015 -0700
Committer: Oleksandr Diachenko 
Committed: Thu Oct 15 14:27:24 2015 -0700

--
 ambari-web/app/models/stack_service.js | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fbc65a9c/ambari-web/app/models/stack_service.js
--
diff --git a/ambari-web/app/models/stack_service.js 
b/ambari-web/app/models/stack_service.js
index 78059d3..ce4278e 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -206,8 +206,10 @@ App.StackService.displayOrder = [
   'TEZ',
   'GANGLIA',
   'HIVE',
+  'HAWQ',
   'HBASE',
   'PIG',
+  'PXF',
   'SQOOP',
   'OOZIE',
   'ZOOKEEPER',



[30/50] [abbrv] ambari git commit: AMBARI-13455. Ambari QE Deploy Test - Kerberos service check fails (akovalenko)

2015-10-19 Thread ncole
AMBARI-13455. Ambari QE Deploy Test - Kerberos service check fails (akovalenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2f7184af40599922e1e23b0150cf9c9c9d78cfc3
Parents: e89a003
Author: Aleksandr Kovalenko 
Authored: Fri Oct 16 18:17:25 2015 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Oct 16 18:17:25 2015 +0300

--
 .../app/controllers/main/admin/kerberos/wizard_controller.js   | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f7184af/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index e0e146a..cb7ae74 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -241,7 +241,13 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
   {
 type: 'sync',
 callback: function () {
+  var self = this;
   this.loadKerberosOption();
+  if (App.get('supports.storeKDCCredentials')) {
+
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
+  self.set('content.secureStoragePersisted', isPersisted);
+});
+  }
 }
   }
 ],



[09/50] [abbrv] ambari git commit: AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site",

2015-10-19 Thread ncole
AMBARI-13404 Exported blueprint contains unmasked hostname in 
["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", 
"supervisor_hosts":"storm-site", "nimbus_hosts":"storm-site"] (dsen)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 22f0982df86002b08ee772bff73d648fbb046c5f
Parents: 52083d1
Author: Dmytro Sen 
Authored: Thu Oct 15 20:28:39 2015 +0300
Committer: Dmytro Sen 
Committed: Thu Oct 15 20:28:39 2015 +0300

--
 .../internal/BlueprintConfigurationProcessor.java  |  5 +
 .../BlueprintConfigurationProcessorTest.java   | 17 +
 2 files changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/22f0982d/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 5fd5563..18fca8a 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
@@ -2102,9 +2102,14 @@ public class BlueprintConfigurationProcessor {
 
 // STORM
 stormSiteMap.put("nimbus.host", new SingleHostTopologyUpdater("NIMBUS"));
+stormSiteMap.put("nimbus_hosts", new SingleHostTopologyUpdater("NIMBUS"));
+stormSiteMap.put("drpc_server_host", new 
SingleHostTopologyUpdater("DRPC_SERVER"));
+stormSiteMap.put("storm_ui_server_host", new 
SingleHostTopologyUpdater("STORM_UI_SERVER"));
 stormSiteMap.put("worker.childopts", new 
OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
 stormSiteMap.put("supervisor.childopts", new 
OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
 stormSiteMap.put("nimbus.childopts", new 
OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
+multiStormSiteMap.put("supervisor_hosts",
+new YamlMultiValuePropertyDecorator(new 
MultipleHostTopologyUpdater("SUPERVISOR")));
 multiStormSiteMap.put("storm.zookeeper.servers",
 new YamlMultiValuePropertyDecorator(new 
MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")));
 multiStormSiteMap.put("nimbus.seeds",

http://git-wip-us.apache.org/repos/asf/ambari/blob/22f0982d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index ac86668..34b72b6 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -448,6 +448,10 @@ public class BlueprintConfigurationProcessorTest {
 Map> properties = new HashMap>();
 Map typeProps = new HashMap();
 typeProps.put("storm.zookeeper.servers", 
"['testhost:5050','testhost2:9090','testhost2a:9090','testhost2b:9090']");
+typeProps.put("drpc_server_host", "['testhost:5050']");
+typeProps.put("storm_ui_server_host", "['testhost:5050']");
+typeProps.put("supervisor_hosts", "['testhost:5050','testhost2:9090']");
+
 properties.put("storm-site", typeProps);
 
 Configuration clusterConfig = new Configuration(properties,
@@ -457,12 +461,16 @@ public class BlueprintConfigurationProcessorTest {
 hgComponents.add("NAMENODE");
 hgComponents.add("SECONDARY_NAMENODE");
 hgComponents.add("ZOOKEEPER_SERVER");
+hgComponents.add("DRPC_SERVER");
+hgComponents.add("STORM_UI_SERVER");
+hgComponents.add("SUPERVISOR");
 TestHostGroup group1 = new TestHostGroup("group1", hgComponents, 
Collections.singleton("testhost"));
 
 Collection hgComponents2 = new HashSet();
 hgComponents2.add("DATANODE");
 hgComponents2.add("HDFS_CLIENT");
 hgComponents2.add("ZOOKEEPER_SERVER");
+hgComponents2.add("SUPERVISOR");
 Set hosts2 = new HashSet();
 

[18/50] [abbrv] ambari git commit: AMBARI-13443. Do not timeout when user is on wizard (rzang)

2015-10-19 Thread ncole
AMBARI-13443. Do not timeout when user is on wizard (rzang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 082db1cc29c106f1a817683485143b39f39ca8f4
Parents: d834d3a
Author: Richard Zang 
Authored: Thu Oct 15 17:34:00 2015 -0700
Committer: Richard Zang 
Committed: Thu Oct 15 17:37:26 2015 -0700

--
 ambari-web/app/controllers/main.js   | 8 +++-
 .../main/admin/stack_and_upgrade_controller_test.js  | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/082db1cc/ambari-web/app/controllers/main.js
--
diff --git a/ambari-web/app/controllers/main.js 
b/ambari-web/app/controllers/main.js
index b7b0b4a..fb73770 100644
--- a/ambari-web/app/controllers/main.js
+++ b/ambari-web/app/controllers/main.js
@@ -227,7 +227,7 @@ App.MainController = Em.Controller.extend({
   checkActiveness: function() {
 var scope = App.router.get('mainController');
 //console.error("checkActiveness " + scope.get('lastUserActiveTime') + " : 
" + Date.now());
-if (Date.now() - scope.get('lastUserActiveTime') > 
scope.get('userTimeOut')) {
+if (Date.now() - scope.get('lastUserActiveTime') > 
scope.get('userTimeOut') && !scope.isOnWizard()) {
   scope.set('isUserActive', false);
   //console.error("LOGOUT!");
   scope.unbindActivityEventMonitors();
@@ -241,6 +241,12 @@ App.MainController = Em.Controller.extend({
 this.bindActivityEventMonitors();
   },
 
+  isOnWizard: function() {
+var isWizard = window.location.href.indexOf('/step') != -1;
+var isUpgrade = window.location.href.indexOf('/stack/upgrade') != -1;
+return isWizard || isUpgrade;
+  },
+
   bindActivityEventMonitors: function() {
 $(window).bind('mousemove', this.keepActive);
 $(window).bind('keypress', this.keepActive);

http://git-wip-us.apache.org/repos/asf/ambari/blob/082db1cc/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 ce176ea..0124608 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
@@ -311,8 +311,8 @@ describe('App.MainAdminStackAndUpgradeController', 
function() {
   value: '2.2',
   label: 'HDP-2.2',
   type: 'ROLLING',
-  skipComponentFailures: false,
-  skipSCFailures: false
+  skipComponentFailures: 'false',
+  skipSCFailures: 'false'
 },
 success: "runPreUpgradeCheckSuccess",
 error: "runPreUpgradeCheckError"



[33/50] [abbrv] ambari git commit: AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)

2015-10-19 Thread ncole
AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 3318eb682611fffbe817815cdffdf6aca2aacfa2
Parents: dec7c8e
Author: Jayush Luniya 
Authored: Fri Oct 16 11:30:38 2015 -0700
Committer: Jayush Luniya 
Committed: Fri Oct 16 11:30:38 2015 -0700

--
 .../libraries/functions/decorator.py|  5 ++--
 .../libraries/functions/namenode_ha_utils.py| 27 ++--
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 17 +++-
 3 files changed, 44 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3318eb68/ambari-common/src/main/python/resource_management/libraries/functions/decorator.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/decorator.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/decorator.py
index cd653e5..1b45981 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/decorator.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/decorator.py
@@ -26,7 +26,7 @@ __all__ = ['retry', ]
 from resource_management.core.logger import Logger
 
 
-def retry(times=3, sleep_time=1, backoff_factor=1, err_class=Exception):
+def retry(times=3, sleep_time=1, max_sleep_time=8, backoff_factor=1, 
err_class=Exception):
   """
   Retry decorator for improved robustness of functions.
   :param times: Number of times to attempt to call the function.
@@ -44,12 +44,13 @@ def retry(times=3, sleep_time=1, backoff_factor=1, 
err_class=Exception):
 
   while _times > 1:
 _times -= 1
-_sleep_time *= _backoff_factor
 try:
   return function(*args, **kwargs)
 except _err_class, err:
   Logger.info("Will retry %d time(s), caught exception: %s. Sleeping 
for %d sec(s)" % (_times, str(err), _sleep_time))
   time.sleep(_sleep_time)
+if(_sleep_time * _backoff_factor <= max_sleep_time):
+  _sleep_time *= _backoff_factor
 
   return function(*args, **kwargs)
 return wrapper

http://git-wip-us.apache.org/repos/asf/ambari/blob/3318eb68/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
index 99f90b8..0920e85 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
@@ -23,6 +23,8 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.libraries.functions.jmx import get_value_from_jmx
 from resource_management.core.base import Fail
 from resource_management.core import shell
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.decorator import retry
 
 __all__ = ["get_namenode_states", "get_active_namenode", 
"get_property_for_active_namenode"]
 
@@ -32,8 +34,29 @@ HDFS_NN_STATE_STANDBY = 'standby'
 NAMENODE_HTTP_FRAGMENT = 'dfs.namenode.http-address.{0}.{1}'
 NAMENODE_HTTPS_FRAGMENT = 'dfs.namenode.https-address.{0}.{1}'
 JMX_URI_FRAGMENT = 
"{0}://{1}/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem"
-  
-def get_namenode_states(hdfs_site, security_enabled, run_user):
+
+def get_namenode_states(hdfs_site, security_enabled, run_user, times=10, 
sleep_time=1, backoff_factor=2):
+  """
+  return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 
'hdfs://hostname2:port2')] , [], []
+  """
+  @retry(times=times, sleep_time=sleep_time, backoff_factor=backoff_factor, 
err_class=Fail)
+  def doRetries(hdfs_site, security_enabled, run_user):
+doRetries.attempt += 1
+active_namenodes, standby_namenodes, unknown_namenodes = 
get_namenode_states_noretries(hdfs_site, security_enabled, run_user)
+Logger.info(
+  "NameNode HA states: active_namenodes = {0}, standby_namenodes = {1}, 
unknown_namenodes = {2}".format(
+active_namenodes, standby_namenodes, unknown_namenodes))
+if active_namenodes:
+  return active_namenodes, standby_namenodes, unknown_namenodes
+elif doRetries.attempt == times:
+  Logger.warning("No active NameNode 

[46/50] [abbrv] ambari git commit: AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)

2015-10-19 Thread ncole
AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 87999547f18c560744a2296853e9106ca377ad5a
Parents: 0ccc873
Author: Andrew Onishuk 
Authored: Mon Oct 19 14:25:30 2015 +0300
Committer: Andrew Onishuk 
Committed: Mon Oct 19 14:25:30 2015 +0300

--
 .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/87999547/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
index 6b3aae1..a4e9c54 100644
--- 
a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
+++ 
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py
@@ -37,7 +37,7 @@ def accumulo_service( name,
   ignore_failures=True)
   if name != 'tserver':
 Execute(format("{daemon_script} 
org.apache.accumulo.master.state.SetGoalState NORMAL"),
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
 )
   address = params.hostname
@@ -45,7 +45,7 @@ def accumulo_service( name,
 address = '0.0.0.0'
   daemon_cmd = format("{daemon_script} {role} --address {address} > 
{log_dir}/accumulo-{role}.out 2>{log_dir}/accumulo-{role}.err & echo $! > 
{pid_file}")
   Execute ( daemon_cmd,
-not_if=pid_exists,
+not_if=as_user(pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
 
@@ -54,11 +54,11 @@ def accumulo_service( name,
 
   pid = format("`cat {pid_file}` >/dev/null 2>&1")
   Execute(format("kill {pid}"),
-not_if=no_pid_exists,
+not_if=as_user(no_pid_exists, params.accumulo_user),
 user=params.accumulo_user
   )
   Execute(format("kill -9 {pid}"),
-not_if=format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"),
+not_if=as_user(format("sleep 2; {no_pid_exists} || sleep 20; 
{no_pid_exists}"), params.accumulo_user),
 ignore_failures=True,
 user=params.accumulo_user
   )



[50/50] [abbrv] ambari git commit: Merge remote-tracking branch 'origin/trunk' into branch-dev-patch-upgrade

2015-10-19 Thread ncole
Merge remote-tracking branch 'origin/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/3265d0b8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3265d0b8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3265d0b8

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 3265d0b8f2c0c30c5c73bbb1851a909796c574d2
Parents: f99d821 7bd1a2a
Author: Nate Cole 
Authored: Mon Oct 19 09:53:01 2015 -0400
Committer: Nate Cole 
Committed: Mon Oct 19 09:53:01 2015 -0400

--
 ambari-admin/pom.xml|8 +-
 .../app/scripts/controllers/mainCtrl.js |   47 +-
 .../admin-web/app/scripts/services/Cluster.js   |   13 +
 .../unit/controllers/CreateViewInstanceCtrl.js  |   14 +-
 .../test/unit/controllers/mainCtrl_test.js  |   17 +-
 ambari-agent/conf/unix/ambari-agent.ini |1 +
 ambari-agent/conf/windows/ambari-agent.ini  |1 +
 ambari-agent/pom.xml|8 +-
 .../src/main/python/ambari_agent/ActionQueue.py |   11 +-
 .../ambari_agent/AlertSchedulerHandler.py   |   21 +-
 .../main/python/ambari_agent/AmbariConfig.py|   46 +-
 .../src/main/python/ambari_agent/Controller.py  |   10 +-
 .../src/main/python/ambari_agent/NetUtil.py |2 +-
 .../main/python/ambari_agent/RecoveryManager.py |   70 +-
 .../src/main/python/ambari_agent/hostname.py|   29 +-
 .../src/main/python/ambari_agent/main.py|   73 +-
 .../src/main/python/ambari_agent/security.py|   13 +-
 .../test/python/ambari_agent/TestActionQueue.py |2 +-
 .../ambari_agent/TestAlertSchedulerHandler.py   |   22 +-
 .../src/test/python/ambari_agent/TestAlerts.py  |8 +-
 .../python/ambari_agent/TestCertGeneration.py   |3 +-
 .../ambari_agent/TestCertGeneration.py.orig |   50 -
 .../test/python/ambari_agent/TestController.py  |5 +-
 .../TestCustomServiceOrchestrator.py.orig   |  643 ---
 .../test/python/ambari_agent/TestHostname.py|   53 +-
 .../src/test/python/ambari_agent/TestMain.py|   27 +-
 .../src/test/python/ambari_agent/TestNetUtil.py |6 +-
 .../python/ambari_agent/TestRecoveryManager.py  |  123 +-
 .../test/python/ambari_agent/TestSecurity.py|   22 +-
 .../python/ambari_agent/TestSecurity.py.orig|  389 --
 ambari-client/groovy-client/pom.xml |4 +-
 ambari-client/pom.xml   |4 +-
 ambari-client/python-client/pom.xml |4 +-
 .../python/resource_management/core/logger.py   |6 +-
 .../libraries/functions/decorator.py|5 +-
 .../libraries/functions/namenode_ha_utils.py|   27 +-
 .../libraries/functions/ranger_functions.py |  158 +-
 .../libraries/functions/ranger_functions_v2.py  |   94 +-
 .../libraries/script/script.py  |   15 +-
 ambari-metrics/ambari-metrics-assembly/pom.xml  |8 +-
 ambari-metrics/ambari-metrics-common/pom.xml|2 +-
 .../timeline/cache/TimelineMetricsCache.java|2 +-
 .../ambari-metrics-flume-sink/pom.xml   |8 +-
 .../sink/flume/FlumeTimelineMetricsSink.java|   21 +-
 .../flume/FlumeTimelineMetricsSinkTest.java |2 +-
 .../ambari-metrics-hadoop-sink/pom.xml  |8 +-
 .../ambari-metrics-host-monitoring/pom.xml  |8 +-
 .../ambari-metrics-kafka-sink/pom.xml   |8 +-
 .../ambari-metrics-storm-sink/pom.xml   |8 +-
 .../ambari-metrics-timelineservice/pom.xml  |   10 +-
 ambari-metrics/pom.xml  |   21 +-
 ambari-project/pom.xml  |4 +-
 ambari-server/conf/unix/ambari.properties   |   13 +-
 ambari-server/conf/windows/ambari.properties|9 +-
 ambari-server/pom.xml   |   10 +-
 .../java/org/apache/ambari/server/Role.java |1 +
 .../ambari/server/agent/HeartBeatHandler.java   |2 +-
 .../ambari/server/agent/RecoveryConfig.java |   26 +
 .../resources/ResourceInstanceFactoryImpl.java  |   10 +-
 .../server/api/services/AmbariMetaInfo.java |   21 +-
 .../api/services/KerberosDescriptorService.java |   90 +
 .../server/checks/AbstractCheckDescriptor.java  |   56 +-
 .../ambari/server/checks/CheckDescription.java  |7 +
 .../server/checks/ClientRetryPropertyCheck.java |   17 +-
 .../checks/ComponentsInstallationCheck.java |  100 +
 .../server/checks/ConfigurationMergeCheck.java  |   29 +-
 .../HiveDynamicServiceDiscoveryCheck.java   |   15 +-
 .../checks/HiveMultipleMetastoreCheck.java  |   13 +-
 .../server/checks/HostsHeartbeatCheck.java  |2 +-
 .../checks/HostsMasterMaintenanceCheck.java |   15 +-
 .../checks/HostsRepositoryVersionCheck.java |   11 +-
 ...apReduce2JobHistoryStatePreservingCheck.java |7 +-
 .../checks/SecondaryNamenodeDeletedCheck.java   |   15 +-
 

[26/50] [abbrv] ambari git commit: AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)

2015-10-19 Thread ncole
AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8bb2b14fb3ac7d80031d618767e3b43972ad0f0f
Parents: 34082a5
Author: Andrew Onishuk 
Authored: Fri Oct 16 16:01:05 2015 +0300
Committer: Andrew Onishuk 
Committed: Fri Oct 16 16:01:05 2015 +0300

--
 .../common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8bb2b14f/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py
index 44bf958..a9ccede 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py
@@ -40,8 +40,7 @@ def post_regionserver(env):
   check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd)
 
   exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd)
-  call_and_match(exec_cmd, params.hbase_user, params.hostname.lower() + ":")
-
+  call_and_match(exec_cmd, params.hbase_user, params.hostname + ":")
 
 @retry(times=15, sleep_time=2, err_class=Fail)
 def call_and_match(cmd, user, regex):



[24/50] [abbrv] ambari git commit: AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)

2015-10-19 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/34082a5a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
--
diff --git a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js 
b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
index cbfdf1b..5d4a1d1 100644
--- a/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
+++ b/ambari-web/vendor/scripts/moment-timezone-with-data-2010-2020.js
@@ -433,49 +433,30 @@
"Africa/Ceuta|CET CEST|-10 
-20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 
11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
"Africa/Johannesburg|SAST|-20|0|",
"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 
1o00",
-   "Africa/Windhoek|WAST WAT|-20 
-10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 
1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0",
"America/Adak|HST HDT|a0 
90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anchorage|AKST AKDT|90 
80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Anguilla|AST|40|0|",
-   "America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0",
"America/Argentina/Buenos_Aires|ART|30|0|",
-   "America/Asuncion|PYST PYT|30 
40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 
17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0",
"America/Atikokan|EST|50|0|",
-   "America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0",
-   "America/Bahia_Banderas|MST CDT CST|70 50 
60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 
14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
-   "America/Belem|BRT|30|0|",
"America/Belize|CST|60|0|",
"America/Boa_Vista|AMT|40|0|",
"America/Bogota|COT|50|0|",
"America/Boise|MST MDT|70 
60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-   "America/Campo_Grande|AMST AMT|30 
40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 
1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10",
"America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 
1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0",
"America/Caracas|VET|4u|0|",
-   "America/Cayenne|GFT|30|0|",
"America/Chicago|CST CDT|60 
50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Chihuahua|MST MDT|70 
60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 
14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0",
"America/Creston|MST|70|0|",
"America/Dawson|PST PDT|80 
70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Detroit|EST EDT|50 
40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-   "America/Eirunepe|AMT ACT|40 50|01|1KLE0",
-   "America/Glace_Bay|AST ADT|40 
30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
"America/Godthab|WGT WGST|30 
20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 
11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00",
-   "America/Goose_Bay|AST ADT|40 
30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 
1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-   "America/Grand_Turk|EST EDT AST|50 40 
40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0",
-   "America/Guayaquil|ECT|50|0|",
-   "America/Guyana|GYT|40|0|",
"America/Havana|CST CDT|50 
40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 
1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0",
-   "America/La_Paz|BOT|40|0|",
"America/Lima|PET|50|0|",
-   "America/Merida|CST CDT|60 

[34/50] [abbrv] ambari git commit: AMBARI-13418. Stop-and-Start Upgrade: Upgrade START call cannot find upgrade pack to use (alejandro)

2015-10-19 Thread ncole
AMBARI-13418. Stop-and-Start Upgrade: Upgrade START call cannot find upgrade 
pack to use (alejandro)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1d61e6662942902c721df03b306ef02fd958a1f1
Parents: 3318eb6
Author: Alejandro Fernandez 
Authored: Fri Oct 16 11:58:54 2015 -0700
Committer: Alejandro Fernandez 
Committed: Fri Oct 16 11:58:54 2015 -0700

--
 .../java/org/apache/ambari/server/state/UpgradeHelperTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d61e666/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 77595a3..1cc67ef 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -160,7 +160,7 @@ public class UpgradeHelperTest {
 
 makeCluster();
 try {
-  String preferredUpgradePackName = null;
+  String preferredUpgradePackName = "upgrade_test";
   UpgradePack up = m_upgradeHelper.suggestUpgradePack(clusterName, 
upgradeFromVersion, upgradeToVersion, upgradeDirection, upgradeType, 
preferredUpgradePackName);
   assertEquals(upgradeType, up.getType());
 } catch (AmbariException e){



[32/50] [abbrv] ambari git commit: Revert "AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)"

2015-10-19 Thread ncole
Revert "AMBARI-13427: NAMENODE START failed with both NN's being passive 
(jluniya)"

This reverts commit ce356ddc8ca233737e270fec097381192bc4bcb8.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: dec7c8eed63393e8fbc5e3114695eb6b43b6c25e
Parents: ce356dd
Author: Jayush Luniya 
Authored: Fri Oct 16 09:26:20 2015 -0700
Committer: Jayush Luniya 
Committed: Fri Oct 16 09:26:20 2015 -0700

--
 .../libraries/functions/namenode_ha_utils.py| 27 ++--
 1 file changed, 2 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dec7c8ee/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
index 0920e85..99f90b8 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
@@ -23,8 +23,6 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.libraries.functions.jmx import get_value_from_jmx
 from resource_management.core.base import Fail
 from resource_management.core import shell
-from resource_management.core.logger import Logger
-from resource_management.libraries.functions.decorator import retry
 
 __all__ = ["get_namenode_states", "get_active_namenode", 
"get_property_for_active_namenode"]
 
@@ -34,29 +32,8 @@ HDFS_NN_STATE_STANDBY = 'standby'
 NAMENODE_HTTP_FRAGMENT = 'dfs.namenode.http-address.{0}.{1}'
 NAMENODE_HTTPS_FRAGMENT = 'dfs.namenode.https-address.{0}.{1}'
 JMX_URI_FRAGMENT = 
"{0}://{1}/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem"
-
-def get_namenode_states(hdfs_site, security_enabled, run_user, times=10, 
sleep_time=1, backoff_factor=2):
-  """
-  return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 
'hdfs://hostname2:port2')] , [], []
-  """
-  @retry(times=times, sleep_time=sleep_time, backoff_factor=backoff_factor, 
err_class=Fail)
-  def doRetries(hdfs_site, security_enabled, run_user):
-doRetries.attempt += 1
-active_namenodes, standby_namenodes, unknown_namenodes = 
get_namenode_states_noretries(hdfs_site, security_enabled, run_user)
-Logger.info(
-  "NameNode HA states: active_namenodes = {0}, standby_namenodes = {1}, 
unknown_namenodes = {2}".format(
-active_namenodes, standby_namenodes, unknown_namenodes))
-if active_namenodes:
-  return active_namenodes, standby_namenodes, unknown_namenodes
-elif doRetries.attempt == times:
-  Logger.warning("No active NameNode was found after {0} retries. Will 
return current NameNode HA states".format(times))
-  return active_namenodes, standby_namenodes, unknown_namenodes
-raise Fail('No active NameNode was found.')
-
-  doRetries.attempt = 0
-  return doRetries(hdfs_site, security_enabled, run_user)
-
-def get_namenode_states_noretries(hdfs_site, security_enabled, run_user):
+  
+def get_namenode_states(hdfs_site, security_enabled, run_user):
   """
   return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 
'hdfs://hostname2:port2')] , [], []
   """



[08/50] [abbrv] ambari git commit: AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk)

2015-10-19 Thread ncole
AMBARI-13437. HDFS File caching does not work because of ulimit not being 
passed into the start command for datanode. (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 52083d1ff8425948485149cd1c862ba9ddcb58db
Parents: 81280ea
Author: Andrew Onishuk 
Authored: Thu Oct 15 19:58:01 2015 +0300
Committer: Andrew Onishuk 
Committed: Thu Oct 15 19:58:27 2015 +0300

--
 .../server/upgrade/UpgradeCatalog213.java   | 25 
 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml |  8 +++
 .../2.0.6/hooks/before-ANY/scripts/params.py|  3 +++
 .../services/HDFS/configuration/hadoop-env.xml  |  8 +++
 .../services/HDFS/configuration/hadoop-env.xml  |  8 +++
 .../server/upgrade/UpgradeCatalog213Test.java   |  4 
 6 files changed, 56 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
index 90a75be..803e5f4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
@@ -58,7 +58,15 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
   private static final String AMS_ENV = "ams-env";
   private static final String AMS_HBASE_ENV = "ams-hbase-env";
   private static final String HBASE_ENV_CONFIG = "hbase-env";
+  private static final String HADOOP_ENV_CONFIG = "hadoop-env";
   private static final String CONTENT_PROPERTY = "content";
+  private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if 
is_datanode_max_locked_memory_set %}\n" +
+"# Fix temporary bug, when ulimit from 
conf files is not picked up, without full relogin. \n" +
+"# Makes sense to fix only when runing DN 
as root \n" +
+"if [ \"$command\" == \"datanode\" ] && [ 
\"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" +
+"  ulimit -l 
{{datanode_max_locked_memory}}\n" +
+"fi\n" +
+"{% endif %};\n";
 
   private static final String KERBEROS_DESCRIPTOR_TABLE = 
"kerberos_descriptor";
   private static final String KERBEROS_DESCRIPTOR_NAME_COLUMN = 
"kerberos_descriptor_name";
@@ -141,6 +149,7 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 updateAMSConfigs();
 updateHDFSConfigs();
 updateHbaseEnvConfig();
+updateHadoopEnv();
 updateKafkaConfigs();
   }
 
@@ -212,6 +221,22 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 
 return rootJson.toString();
   }
+  
+  protected void updateHadoopEnv() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+
+for (final Cluster cluster : 
getCheckedClusterMap(ambariManagementController.getClusters()).values()) {
+  Config hadoopEnvConfig = 
cluster.getDesiredConfigByType(HADOOP_ENV_CONFIG);
+  if (hadoopEnvConfig != null) {
+String content = hadoopEnvConfig.getProperties().get(CONTENT_PROPERTY);
+if (content != null) {
+  content += HADOOP_ENV_CONTENT_TO_APPEND;
+  Map updates = 
Collections.singletonMap(CONTENT_PROPERTY, content);
+  updateConfigurationPropertiesForCluster(cluster, HADOOP_ENV_CONFIG, 
updates, true, false);
+}
+  }
+}
+  }
 
   protected void updateHDFSConfigs() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(

http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
index a8f7951..5319da9 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
+++ 

[44/50] [abbrv] ambari git commit: AMBARI-13465. Customize Services opens the "Advanced" tab by default

2015-10-19 Thread ncole
AMBARI-13465. Customize Services opens the "Advanced" tab by default


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 823c3b988dad59af5d421ae674fee5ec2c939fc8
Parents: 6d4a931
Author: Alex Antonenko 
Authored: Mon Oct 19 13:05:26 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 13:05:26 2015 +0300

--
 ambari-web/app/models/configs/theme/tab.js   |  5 +
 .../configs/service_config_layout_tab_view.js|  2 ++
 .../views/common/configs/service_config_view.js  | 19 ++-
 3 files changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/models/configs/theme/tab.js
--
diff --git a/ambari-web/app/models/configs/theme/tab.js 
b/ambari-web/app/models/configs/theme/tab.js
index 0940022..cb7aeae 100644
--- a/ambari-web/app/models/configs/theme/tab.js
+++ b/ambari-web/app/models/configs/theme/tab.js
@@ -31,6 +31,11 @@ App.Tab = DS.Model.extend({
   isRendered: DS.attr('boolean', {defaultValue: false}),
 
   /**
+   * Determines if all configs were attached to tab.
+   */
+  isConfigsPrepared: DS.attr('boolean', {defaultValue: false}),
+
+  /**
* Number of the errors in all sections in the current tab
* @type {number}
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js 
b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
index f7a376d..720dd12 100644
--- a/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
+++ b/ambari-web/app/views/common/configs/service_config_layout_tab_view.js
@@ -172,11 +172,13 @@ App.ServiceConfigLayoutTabView = 
Em.View.extend(App.ConfigOverridable, {
 
   didInsertElement: function () {
 this.set('dataIsReady', false);
+this.set('content.isConfigsPrepared', false);
 this._super();
 this.prepareConfigProperties();
 if (this.get('controller.isCompareMode')) {
   this.get('parentView').filterEnhancedConfigs();
 }
+this.set('content.isConfigsPrepared', true);
 this.set('dataIsReady', true);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/823c3b98/ambari-web/app/views/common/configs/service_config_view.js
--
diff --git a/ambari-web/app/views/common/configs/service_config_view.js 
b/ambari-web/app/views/common/configs/service_config_view.js
index 5ad5c2e..ad50998 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -31,6 +31,12 @@ App.ServiceConfigView = Em.View.extend({
   filter: '',
 
   /**
+   * Determines that active tab is set during view initialize.
+   * @type {boolean}
+   */
+  initalActiveTabIsSet: false,
+
+  /**
* Bound from parent view in the template
* @type {object[]}
*/
@@ -180,11 +186,22 @@ App.ServiceConfigView = Em.View.extend({
   advancedTab.set('isRendered', false);
 }
 this.processTabs(tabs);
-this.pickActiveTab(tabs);
 return tabs;
   }.property('controller.selectedServiceNameTrigger'),
 
   /**
+   * Set active tab when view attached and configs are linked to tabs.
+   */
+  initialActiveTabObserver: function() {
+var tabs = this.get('tabs').filterProperty('isAdvanced', false);
+if (tabs.everyProperty('isConfigsPrepared', true) && 
!this.get('initalActiveTabIsSet')) {
+  this.get('tabs').setEach('isActive', false);
+  this.pickActiveTab(this.get('tabs'));
+  this.set('tabsWereSet', true);
+}
+  }.observes('tabs.@each.isConfigsPrepared'),
+
+  /**
* Pick the first non hidden tab and make it active when there is no active 
tab
* @method pickActiveTab
*/



[16/50] [abbrv] ambari git commit: AMBARI-13436. Kerberos Wizard: null in request logs (rlevas)

2015-10-19 Thread ncole
AMBARI-13436. Kerberos Wizard: null in request logs (rlevas)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 86fb7574aa8bdb02791ef31b45322c92c9e5ac02
Parents: fbc65a9
Author: Robert Levas 
Authored: Thu Oct 15 18:01:30 2015 -0400
Committer: Robert Levas 
Committed: Thu Oct 15 18:01:35 2015 -0400

--
 .../server/controller/ShortTaskStatus.java  | 23 +++---
 .../AmbariManagementControllerTest.java | 25 
 2 files changed, 45 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/86fb7574/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java
index 6fe4db2..975476f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ShortTaskStatus.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.server.controller;
 
 import org.apache.ambari.server.actionmanager.HostRoleCommand;
+import org.apache.ambari.server.utils.StageUtils;
+import org.apache.commons.lang.StringUtils;
 
 public class ShortTaskStatus {
   protected long requestId;
@@ -39,7 +41,7 @@ public class ShortTaskStatus {
  String customCommandName, String outputLog, String 
errorLog) {
 this.taskId = taskId;
 this.stageId = stageId;
-this.hostName = hostName;
+this.hostName = translateHostName(hostName);
 this.role = role;
 this.command = command;
 this.status = status;
@@ -52,7 +54,7 @@ public class ShortTaskStatus {
 this.taskId = hostRoleCommand.getTaskId();
 this.stageId = hostRoleCommand.getStageId();
 this.command = hostRoleCommand.getRoleCommand().toString();
-this.hostName = hostRoleCommand.getHostName();
+this.hostName = translateHostName(hostRoleCommand.getHostName());
 this.role = hostRoleCommand.getRole().toString();
 this.status = hostRoleCommand.getStatus().toString();
 this.customCommandName = hostRoleCommand.getCustomCommandName();
@@ -97,7 +99,7 @@ public class ShortTaskStatus {
   }
 
   public void setHostName(String hostName) {
-this.hostName = hostName;
+this.hostName = translateHostName(hostName);
   }
 
   public String getRole() {
@@ -155,4 +157,19 @@ public class ShortTaskStatus {
 return sb.toString();
   }
 
+  /**
+   * If the hostname is null (or empty), returns the hostname of the Ambari 
Server; else returns the
+   * supplied hostname value.
+   *
+   * @param hostName a hostname
+   * @return the hostname of the Ambari Server if the hostname is null (or 
empty); else supplied hostname value
+   */
+  private String translateHostName(String hostName) {
+// if the hostname in the command is null, replace it with the hostname of 
the Ambari Server
+// This is because commands (to be) handled by the Ambari Server have a 
null value for its
+// host designation.
+return (StringUtils.isEmpty(hostName))
+? StageUtils.getHostName()
+: hostName;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/86fb7574/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 528d343..7e2090a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -100,6 +100,7 @@ import 
org.apache.ambari.server.state.configgroup.ConfigGroup;
 import org.apache.ambari.server.state.configgroup.ConfigGroupFactory;
 import 
org.apache.ambari.server.state.svccomphost.ServiceComponentHostInstallEvent;
 import 
org.apache.ambari.server.state.svccomphost.ServiceComponentHostOpSucceededEvent;
+import 
org.apache.ambari.server.state.svccomphost.ServiceComponentHostServerActionEvent;
 import 
org.apache.ambari.server.state.svccomphost.ServiceComponentHostStartEvent;
 import 

[38/50] [abbrv] ambari git commit: AMBARI-13444. Add a constant poller for admin web (rzang)

2015-10-19 Thread ncole
AMBARI-13444. Add a constant poller for admin web (rzang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c9085317bd65c100741a5655c59188df329128cc
Parents: f6ff71b
Author: Richard Zang 
Authored: Fri Oct 16 15:22:30 2015 -0700
Committer: Richard Zang 
Committed: Fri Oct 16 15:22:30 2015 -0700

--
 .../ui/admin-web/app/scripts/controllers/mainCtrl.js | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9085317/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
index e16d1dc..2c9e1c9 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js
@@ -118,11 +118,19 @@ angular.module('ambariAdminConsole')
 $rootScope.userActivityTimeoutInterval = 
window.setInterval(checkActiveness, 1000);
   };
 
+  // Send noop requests every 10 seconds just to keep backend session alive
+  $scope.startNoopPolling = function() {
+$rootScope.noopPollingInterval = setInterval(Cluster.getAmbariTimeout, 
1);
+  };
+
   if (!$rootScope.userActivityTimeoutInterval) {
 Cluster.getAmbariTimeout().then(function(timeout) {
   if (Number(timeout) > 0)
 $scope.startInactiveTimeoutMonitoring(timeout * 1000);
 });
   }
+  if (!$rootScope.noopPollingInterval) {
+$scope.startNoopPolling();
+  }
   $scope.updateInstances();
 }]);



[23/50] [abbrv] ambari git commit: AMBARI-13446 Subsection tab having visible invalid property should show error count next to subsection tab label. (ababiichuk)

2015-10-19 Thread ncole
AMBARI-13446 Subsection tab having visible invalid property should show error 
count next to subsection tab label. (ababiichuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2fbbadf85d86004b0df97747cbf3f46e7a904a2e
Parents: c402dae
Author: aBabiichuk 
Authored: Fri Oct 16 11:54:32 2015 +0300
Committer: aBabiichuk 
Committed: Fri Oct 16 14:36:48 2015 +0300

--
 .../app/templates/common/configs/service_config_layout_tab.hbs| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2fbbadf8/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs 
b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
index c1bb92b..4c9dccf 100644
--- a/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_layout_tab.hbs
@@ -53,6 +53,9 @@
   
 
   {{subSectionTab.displayName}}
+  {{#if subSectionTab.errorsCount}}
+{{subSectionTab.errorsCount}}
+  {{/if}}
 
   
 {{/each}}



[19/50] [abbrv] ambari git commit: AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk)

2015-10-19 Thread ncole
AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: a509510ee7fca526178afbed93847112b510b59d
Parents: 082db1c
Author: Andrew Onishuk 
Authored: Fri Oct 16 13:07:42 2015 +0300
Committer: Andrew Onishuk 
Committed: Fri Oct 16 13:07:42 2015 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  1 +
 ambari-agent/conf/windows/ambari-agent.ini  |  1 +
 .../ambari_agent/AlertSchedulerHandler.py   | 21 ++-
 .../src/main/python/ambari_agent/Controller.py  |  4 +++-
 .../ambari_agent/TestAlertSchedulerHandler.py   | 22 ++--
 .../src/test/python/ambari_agent/TestAlerts.py  |  8 +++
 6 files changed, 31 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 3b7631c..80afdb2 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -29,6 +29,7 @@ cache_dir=/var/lib/ambari-agent/cache
 tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
+alert_grace_period=5
 
 [security]
 keysdir=/var/lib/ambari-agent/keys

http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/conf/windows/ambari-agent.ini
--
diff --git a/ambari-agent/conf/windows/ambari-agent.ini 
b/ambari-agent/conf/windows/ambari-agent.ini
index 972e11e..1b24f25 100644
--- a/ambari-agent/conf/windows/ambari-agent.ini
+++ b/ambari-agent/conf/windows/ambari-agent.ini
@@ -29,6 +29,7 @@ ping_port=8670
 cache_dir=cache
 tolerate_download_failures=true
 parallel_execution=0
+alert_grace_period=5
 
 [security]
 keysdir=keys

http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py 
b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
index cddee57..d3aab87 100644
--- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
+++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py
@@ -43,14 +43,8 @@ class AlertSchedulerHandler():
   TYPE_SCRIPT = 'SCRIPT'
   TYPE_WEB = 'WEB'
 
-  APS_CONFIG = { 
-'threadpool.core_threads': 3,
-'coalesce': True,
-'standalone': False
-  }
-
   def __init__(self, cachedir, stacks_dir, common_services_dir, 
host_scripts_dir,
-  cluster_configuration, config, in_minutes=True):
+  alert_grace_period, cluster_configuration, config, in_minutes=True):
 
 self.cachedir = cachedir
 self.stacks_dir = stacks_dir
@@ -65,8 +59,15 @@ class AlertSchedulerHandler():
   except:
 logger.critical("[AlertScheduler] Could not create the cache directory 
{0}".format(cachedir))
 
+self.APS_CONFIG = {
+  'apscheduler.threadpool.core_threads': 3,
+  'apscheduler.coalesce': True,
+  'apscheduler.standalone': False,
+  'apscheduler.misfire_grace_time': alert_grace_period
+}
+
 self._collector = AlertCollector()
-self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG)
+self.__scheduler = Scheduler(self.APS_CONFIG)
 self.__in_minutes = in_minutes
 self.config = config
 
@@ -122,7 +123,7 @@ class AlertSchedulerHandler():
 
 if self.__scheduler.running:
   self.__scheduler.shutdown(wait=False)
-  self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG)
+  self.__scheduler = Scheduler(self.APS_CONFIG)
 
 alert_callables = self.__load_definitions()
 
@@ -139,7 +140,7 @@ class AlertSchedulerHandler():
   def stop(self):
 if not self.__scheduler is None:
   self.__scheduler.shutdown(wait=False)
-  self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG)
+  self.__scheduler = Scheduler(self.APS_CONFIG)
 
 logger.info("[AlertScheduler] Stopped the alert scheduler.")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/src/main/python/ambari_agent/Controller.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py 
b/ambari-agent/src/main/python/ambari_agent/Controller.py
index 5a4bb00..520d78d 100644
--- 

[40/50] [abbrv] ambari git commit: AMBARI-13463. Auto start should allow selection of components that can be auto-started (smohanty)

2015-10-19 Thread ncole
AMBARI-13463. Auto start should allow selection of components that can be 
auto-started (smohanty)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 4ba6aceb270037a6e1c33db3ed394b13e2add05c
Parents: 4017f06
Author: Sumit Mohanty 
Authored: Sun Oct 18 18:32:44 2015 -0700
Committer: Sumit Mohanty 
Committed: Sun Oct 18 18:33:18 2015 -0700

--
 .../src/main/python/ambari_agent/ActionQueue.py |  11 +-
 .../main/python/ambari_agent/RecoveryManager.py |  70 +--
 .../test/python/ambari_agent/TestActionQueue.py |   2 +-
 .../python/ambari_agent/TestRecoveryManager.py  | 123 +++
 .../ambari/server/agent/HeartBeatHandler.java   |   2 +-
 .../ambari/server/agent/RecoveryConfig.java |  26 
 .../server/configuration/Configuration.java |  30 -
 7 files changed, 221 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4ba6aceb/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 6a64f99..b82afe8 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -326,7 +326,8 @@ class ActionQueue(threading.Thread):
 
 # let recovery manager know the current state
 if status == self.COMPLETED_STATUS:
-  if self.controller.recovery_manager.enabled() and 
command.has_key('roleCommand'):
+  if self.controller.recovery_manager.enabled() and 
command.has_key('roleCommand') \
+  and 
self.controller.recovery_manager.configured_for_recovery(command['role']):
 if command['roleCommand'] == self.ROLE_COMMAND_START:
   
self.controller.recovery_manager.update_current_status(command['role'], 
LiveStatus.LIVE_STATUS)
   
self.controller.recovery_manager.update_config_staleness(command['role'], False)
@@ -441,10 +442,14 @@ class ActionQueue(threading.Thread):
 
   if component_status_result['exitcode'] == 0:
 component_status = LiveStatus.LIVE_STATUS
-self.controller.recovery_manager.update_current_status(component, 
component_status)
+if self.controller.recovery_manager.enabled() \
+and 
self.controller.recovery_manager.configured_for_recovery(component):
+  self.controller.recovery_manager.update_current_status(component, 
component_status)
   else:
 component_status = LiveStatus.DEAD_STATUS
-self.controller.recovery_manager.update_current_status(component, 
component_status)
+if self.controller.recovery_manager.enabled() \
+and 
self.controller.recovery_manager.configured_for_recovery(component):
+  self.controller.recovery_manager.update_current_status(component, 
component_status)
   request_execution_cmd = 
self.controller.recovery_manager.requires_recovery(component)
 
   if component_status_result.has_key('structuredOut'):

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ba6aceb/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py 
b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
index 595c4fc..cab81f5 100644
--- a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
+++ b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
@@ -85,6 +85,8 @@ class RecoveryManager:
 self.id = int(time.time())
 self.allowed_desired_states = [self.STARTED, self.INSTALLED]
 self.allowed_current_states = [self.INIT, self.INSTALLED]
+self.enabled_components = []
+self.disabled_components = []
 self.actions = {}
 self.statuses = {}
 self.__status_lock = threading.RLock()
@@ -93,7 +95,7 @@ class RecoveryManager:
 self.active_command_count = 0
 self.paused = False
 
-self.update_config(6, 60, 5, 12, recovery_enabled, auto_start_only)
+self.update_config(6, 60, 5, 12, recovery_enabled, auto_start_only, "", "")
 
 pass
 
@@ -186,6 +188,21 @@ class RecoveryManager:
   self.remove_command(component)
 pass
 
+  """
+  Whether specific components are enabled/disabled for recovery. Being enabled 
takes
+  precedence over being disabled. When specific components are enabled then 
only
+  those components are enabled. When specific components are disabled then all 
of
+  the 

[17/50] [abbrv] ambari git commit: AMBARI-13438. Ranger Audit properties for all services should be recommended to be same as in ranger service. (jaimin)

2015-10-19 Thread ncole
AMBARI-13438. Ranger Audit properties for all services should be recommended to 
be same as in ranger service. (jaimin)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: d834d3a3756d42def793aa487e6abab8c27297c6
Parents: 86fb757
Author: Jaimin Jetly 
Authored: Thu Oct 15 16:45:23 2015 -0700
Committer: Jaimin Jetly 
Committed: Thu Oct 15 17:23:32 2015 -0700

--
 .../RANGER/0.4.0/configuration/ranger-env.xml   | 20 +++---
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 33 +
 .../HBASE/configuration/ranger-hbase-audit.xml  | 43 +++-
 .../HDFS/configuration/ranger-hdfs-audit.xml| 43 +++-
 .../HIVE/configuration/ranger-hive-audit.xml| 43 +++-
 .../KAFKA/configuration/ranger-kafka-audit.xml  | 45 +++-
 .../KNOX/configuration/ranger-knox-audit.xml| 43 +++-
 .../RANGER/configuration/ranger-admin-site.xml  | 10 ++-
 .../RANGER/configuration/ranger-env.xml | 32 +
 .../RANGER/configuration/ranger-ugsync-site.xml |  8 +--
 .../services/RANGER/themes/theme_version_2.json | 72 ++--
 .../STORM/configuration/ranger-storm-audit.xml  | 43 +++-
 .../YARN/configuration/ranger-yarn-audit.xml| 43 +++-
 .../stacks/HDP/2.3/services/stack_advisor.py| 47 +
 .../stacks/2.0.6/common/test_stack_advisor.py   | 65 ++
 15 files changed, 510 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d834d3a3/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
index 0a2a3db..59b7d9e 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml
@@ -116,11 +116,11 @@
   
 
   Yes
-  Enabled
+  ON
 
 
   No
-  Disabled
+  OFF
 
   
   1
@@ -138,11 +138,11 @@
   
 
   Yes
-  Enabled
+  ON
 
 
   No
-  Disabled
+  OFF
 
   
   1
@@ -160,11 +160,11 @@
   
 
   Yes
-  Enabled
+  ON
 
 
   No
-  Disabled
+  OFF
 
   
   1
@@ -182,11 +182,11 @@
   
 
   Yes
-  Enabled
+  ON
 
 
   No
-  Disabled
+  OFF
 
   
   1
@@ -204,11 +204,11 @@
   
 
   Yes
-  Enabled
+  ON
 
 
   No
-  Disabled
+  OFF
 
   
   1

http://git-wip-us.apache.org/repos/asf/ambari/blob/d834d3a3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 9bb21ea..7fb9884 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -483,6 +483,18 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
 pass
 
+  def getHostNamesWithComponent(self, serviceName, componentName, services):
+"""
+Returns the list of hostnames on which service component is installed
+"""
+if services is not None and serviceName in 
[service["StackServices"]["service_name"] for service in services["services"]]:
+  service = [serviceEntry for serviceEntry in services["services"] if 
serviceEntry["StackServices"]["service_name"] == serviceName][0]
+  components = [componentEntry for componentEntry in service["components"] 
if componentEntry["StackServiceComponents"]["component_name"] == componentName]
+  if (len(components) > 0 and 
len(components[0]["StackServiceComponents"]["hostnames"]) > 0):
+componentHostnames = 
components[0]["StackServiceComponents"]["hostnames"]
+return componentHostnames
+return []
+
   def getHostsWithComponent(self, serviceName, componentName, services, 

[07/50] [abbrv] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)

2015-10-19 Thread ncole
AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo 
Puskas via smohanty)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 81280ea39f787ac823f5287e792a655039983576
Parents: c877445
Author: Sumit Mohanty 
Authored: Thu Oct 15 08:06:19 2015 -0700
Committer: Sumit Mohanty 
Committed: Thu Oct 15 08:06:19 2015 -0700

--
 ambari-server/pom.xml   |   2 +-
 .../resources/ResourceInstanceFactoryImpl.java  |  10 +-
 .../api/services/KerberosDescriptorService.java |  90 +
 .../server/controller/ControllerModule.java |  83 -
 .../controller/ResourceProviderFactory.java |   8 +
 .../AbstractControllerResourceProvider.java |   2 +
 .../KerberosDescriptorResourceProvider.java | 182 +++
 .../ambari/server/controller/spi/Resource.java  |  10 +-
 .../server/orm/dao/KerberosDescriptorDAO.java   | 107 +++
 .../orm/entities/KerberosDescriptorEntity.java  |  56 ++
 .../server/topology/KerberosDescriptor.java |  26 +++
 .../topology/KerberosDescriptorFactory.java |  30 +++
 .../server/topology/KerberosDescriptorImpl.java |  50 +
 .../server/upgrade/UpgradeCatalog213.java   |  18 ++
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   7 +
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |   7 +
 .../resources/Ambari-DDL-Postgres-CREATE.sql|   7 +
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |   8 +
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |   7 +
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |   7 +
 .../src/main/resources/META-INF/persistence.xml |   1 +
 .../src/main/resources/key_properties.json  |   3 +
 .../src/main/resources/properties.json  |   8 +-
 .../KerberosDescriptorResourceProviderTest.java | 160 
 .../orm/dao/KerberosDescriptorDAOTest.java  |  82 +
 .../scheduler/ExecutionScheduleManagerTest.java | 169 +
 .../server/upgrade/UpgradeCatalog213Test.java   | 129 +
 27 files changed, 1096 insertions(+), 173 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 75a9489..17e9ea9 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1884,7 +1884,7 @@
 
   org.easymock
   easymock
-  3.1
+  3.3
   test
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index 0499590..e7bbec4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -6,9 +6,9 @@
  * 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
- *
+ * 
+ * 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.
@@ -388,6 +388,10 @@ public class ResourceInstanceFactoryImpl implements 
ResourceInstanceFactory {
 resourceDefinition = new HostKerberosIdentityResourceDefinition();
 break;
 
+  case KerberosDescriptor:
+resourceDefinition = new 
SimpleResourceDefinition(Resource.Type.KerberosDescriptor, 
"kerberos_descriptor", "kerberos_descriptors");
+break;
+
   case Credential:
 resourceDefinition = new CredentialResourceDefinition();
 break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/services/KerberosDescriptorService.java
 

[22/50] [abbrv] ambari git commit: AMBARI-13447 Redirect to Admin View after navigating to Install Wizard. (atkach)

2015-10-19 Thread ncole
AMBARI-13447 Redirect to Admin View after navigating to Install Wizard. (atkach)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c402daed925c8b1f6085cca154fa737567b377ba
Parents: 1076ec7
Author: Andrii Tkach 
Authored: Fri Oct 16 13:42:09 2015 +0300
Committer: Andrii Tkach 
Committed: Fri Oct 16 13:42:09 2015 +0300

--
 ambari-web/app/router.js   | 116 +++---
 ambari-web/test/router_test.js | 238 
 2 files changed, 310 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c402daed/ambari-web/app/router.js
--
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 462ae66..934d434 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -313,57 +313,81 @@ App.Router = Em.Router.extend({
 
   },
 
+  /**
+   * success callback of login request
+   * @param {object} clustersData
+   * @param {object} opt
+   * @param {object} params
+   */
   loginGetClustersSuccessCallback: function (clustersData, opt, params) {
-var loginController = this.get('loginController');
-var loginData = params.loginData;
-var privileges = loginData.privileges || [];
+var privileges = params.loginData.privileges || [];
 var router = this;
-var permissionList = 
privileges.mapProperty('PrivilegeInfo.permission_name');
-  var isAdmin = permissionList.contains('AMBARI.ADMIN');
-  var transitionToApp = false;
-  if (isAdmin) {
-App.set('isAdmin', true);
-if (clustersData.items.length) {
-  router.setClusterInstalled(clustersData);
-  transitionToApp = true;
-} else {
-  App.ajax.send({
-name: 'ambari.service.load_server_version',
-sender: this,
-success: 'adminViewInfoSuccessCallback'
-  });
-}
+var isAdmin = 
privileges.mapProperty('PrivilegeInfo.permission_name').contains('AMBARI.ADMIN');
+
+App.set('isAdmin', isAdmin);
+
+if (clustersData.items.length) {
+  var clusterPermissions = privileges.
+filterProperty('PrivilegeInfo.cluster_name', 
clustersData.items[0].Clusters.cluster_name).
+mapProperty('PrivilegeInfo.permission_name');
+
+  //cluster installed
+  router.setClusterInstalled(clustersData);
+  if (clusterPermissions.contains('CLUSTER.OPERATE')) {
+App.setProperties({
+  isAdmin: true,
+  isOperator: true
+});
+  }
+  if (isAdmin || clusterPermissions.contains('CLUSTER.READ') || 
clusterPermissions.contains('CLUSTER.OPERATE')) {
+router.transitionToApp();
   } else {
-if (clustersData.items.length) {
-  router.setClusterInstalled(clustersData);
-  //TODO: Iterate over clusters
-  var clusterName = clustersData.items[0].Clusters.cluster_name;
-  var clusterPermissions = 
privileges.filterProperty('PrivilegeInfo.cluster_name', 
clusterName).mapProperty('PrivilegeInfo.permission_name');
-  if (clusterPermissions.contains('CLUSTER.OPERATE')) {
-App.setProperties({
-  isAdmin: true,
-  isOperator: true
-});
-transitionToApp = true;
-  } else if (clusterPermissions.contains('CLUSTER.READ')) {
-transitionToApp = true;
-  }
-}
+router.transitionToViews();
   }
-  App.set('isPermissionDataLoaded', true);
-  if (transitionToApp) {
-if (!router.restorePreferedPath()) {
-  router.getSection(function (route) {
-router.transitionTo(route);
-loginController.postLogin(true, true);
-  });
-}
+} else {
+  if (isAdmin) {
+router.transitionToAdminView();
   } else {
-App.router.get('mainViewsController').loadAmbariViews();
-router.transitionTo('main.views.index');
-loginController.postLogin(true,true);
+router.transitionToViews();
   }
+}
+App.set('isPermissionDataLoaded', true);
+App.router.get('userSettingsController').dataLoading();
   },
+
+  /**
+   * redirect user to Admin View
+   * @returns {$.ajax}
+   */
+  transitionToAdminView: function() {
+return App.ajax.send({
+  name: 'ambari.service.load_server_version',
+  sender: this,
+  success: 'adminViewInfoSuccessCallback',
+  error: 'adminViewInfoErrorCallback'
+});
+  },
+
+  /**
+   * redirect user to application Dashboard
+   

[20/50] [abbrv] ambari git commit: AMBARI-13448. CSV export: downloaded data does not reflect what's shown in the chart

2015-10-19 Thread ncole
AMBARI-13448. CSV export: downloaded data does not reflect what's shown in the 
chart


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 4a954283e96a1e598e436b9c264939398793c59d
Parents: a509510
Author: Alex Antonenko 
Authored: Fri Oct 16 13:08:00 2015 +0300
Committer: Alex Antonenko 
Committed: Fri Oct 16 13:38:21 2015 +0300

--
 .../views/common/widget/graph_widget_view.js|   2 +-
 .../common/widget/graph_widget_view_test.js | 112 +++
 2 files changed, 113 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4a954283/ambari-web/app/views/common/widget/graph_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index fb8e754..1ed20d2 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -313,7 +313,7 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, 
App.ExportMetricsMixin, {
   isCSV = !!event.context,
   fileType = isCSV ? 'csv' : 'json',
   fileName = 'data.' + fileType,
-  metrics = this.get('content.metrics'),
+  metrics = this.get('data'),
   hasData = Em.isArray(metrics) && metrics.some(function (item) {
 return Em.isArray(item.data);
   });

http://git-wip-us.apache.org/repos/asf/ambari/blob/4a954283/ambari-web/test/views/common/widget/graph_widget_view_test.js
--
diff --git a/ambari-web/test/views/common/widget/graph_widget_view_test.js 
b/ambari-web/test/views/common/widget/graph_widget_view_test.js
index deccce5..7215128 100644
--- a/ambari-web/test/views/common/widget/graph_widget_view_test.js
+++ b/ambari-web/test/views/common/widget/graph_widget_view_test.js
@@ -18,6 +18,7 @@
 
 var App = require('app');
 require('views/common/widget/graph_widget_view');
+var fileUtils = require('utils/file_utils');
 
 describe('App.GraphWidgetView', function () {
   var view = App.GraphWidgetView.create();
@@ -126,4 +127,115 @@ describe('App.GraphWidgetView', function () {
 });
   });
 
+  describe('#exportGraphData', function () {
+
+var cases = [
+  {
+data: null,
+prepareCSVCallCount: 0,
+prepareJSONCallCount: 0,
+downloadTextFileCallCount: 0,
+showAlertPopupCallCount: 1,
+title: 'no data'
+  },
+  {
+data: {},
+prepareCSVCallCount: 0,
+prepareJSONCallCount: 0,
+downloadTextFileCallCount: 0,
+showAlertPopupCallCount: 1,
+title: 'invalid data'
+  },
+  {
+data: [
+  {
+data: null
+  }
+],
+prepareCSVCallCount: 0,
+prepareJSONCallCount: 0,
+downloadTextFileCallCount: 0,
+showAlertPopupCallCount: 1,
+title: 'empty data'
+  },
+  {
+data: [
+  {
+data: {}
+  }
+],
+prepareCSVCallCount: 0,
+prepareJSONCallCount: 0,
+downloadTextFileCallCount: 0,
+showAlertPopupCallCount: 1,
+title: 'malformed data'
+  },
+  {
+data: [
+  {
+data: [
+  {
+key: 'value'
+  }
+]
+  }
+],
+prepareCSVCallCount: 0,
+prepareJSONCallCount: 1,
+downloadTextFileCallCount: 1,
+showAlertPopupCallCount: 0,
+title: 'JSON export'
+  },
+  {
+data: [
+  {
+data: [
+  {
+key: 'value'
+  }
+]
+  }
+],
+event: {
+  context: true
+},
+prepareCSVCallCount: 1,
+prepareJSONCallCount: 0,
+downloadTextFileCallCount: 1,
+showAlertPopupCallCount: 0,
+title: 'CSV export'
+  }
+];
+
+beforeEach(function () {
+  sinon.stub(view, 'prepareCSV').returns([]);
+  sinon.stub(view, 'prepareJSON').returns([]);
+  sinon.stub(fileUtils, 'downloadTextFile', Em.K);
+  sinon.stub(App, 'showAlertPopup', Em.K);
+});
+
+afterEach(function () {
+  view.prepareCSV.restore();
+  view.prepareJSON.restore();
+  fileUtils.downloadTextFile.restore();
+  App.showAlertPopup.restore();
+});
+
+cases.forEach(function (item) {
+  it(item.title, function () {
+view.set('data', 

[14/50] [abbrv] ambari git commit: AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections window.(xiwang)

2015-10-19 Thread ncole
AMBARI-13393-2. Express Upgrade: UX changes for upgrade method selections 
window.(xiwang)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 716e25803d686a5d466ef8350404c9676509051d
Parents: 520e41f
Author: Xi Wang 
Authored: Wed Oct 14 18:58:38 2015 -0700
Committer: Xi Wang 
Committed: Thu Oct 15 12:43:25 2015 -0700

--
 .../main/admin/stack_and_upgrade_controller.js  | 24 ++--
 ambari-web/app/styles/stack_versions.less   | 16 ++---
 2 files changed, 20 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/716e2580/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 8998055..6a94e6e 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
@@ -92,7 +92,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 }),
 Em.Object.create({
   displayName: 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.title'),
-  type: 'NON-ROLLING',
+  type: 'NON_ROLLING',
   icon: "icon-bolt",
   description: 
Em.I18n.t('admin.stackVersions.version.upgrade.upgradeOptions.EU.description'),
   selected: false,
@@ -512,8 +512,8 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 var upgradeTypeDisplayName  = upgradeMethod ? 
upgradeMethod.get('displayName') : null;
 this.set('upgradeTypeDisplayName', upgradeTypeDisplayName);
 this.set('failuresTolerance', Em.Object.create({
-  skipComponentFailures: params.skipComponentFailures,
-  skipSCFailures: params.skipSCFailures
+  skipComponentFailures: params.skipComponentFailures == 'true',
+  skipSCFailures: params.skipSCFailures == 'true'
 }));
 this.setDBProperties({
   upgradeVersion: params.label,
@@ -522,8 +522,8 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   isDowngrade: !!params.isDowngrade,
   upgradeTypeDisplayName: upgradeTypeDisplayName,
   failuresTolerance: Em.Object.create({
-skipComponentFailures: params.skipComponentFailures,
-skipSCFailures: params.skipSCFailures
+skipComponentFailures: params.skipComponentFailures == 'true',
+skipSCFailures: params.skipSCFailures == 'true'
   })
 });
 App.set('upgradeState', 'PENDING');
@@ -541,8 +541,8 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
*/
   updateOptionsSuccessCallback: function (data, opt, params) {
 this.set('failuresTolerance', Em.Object.create({
-  skipComponentFailures: params.skipComponentFailures,
-  skipSCFailures: params.skipSCFailures
+  skipComponentFailures: params.skipComponentFailures == 'true',
+  skipSCFailures: params.skipSCFailures == 'true'
 }));
   },
 
@@ -596,7 +596,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 });
   } else {
 var ruMethod = self.get('upgradeMethods').findProperty('type', 
'ROLLING');
-var ssuMethod = self.get('upgradeMethods').findProperty('type', 
'NON-ROLLING');
+var ssuMethod = self.get('upgradeMethods').findProperty('type', 
'NON_ROLLING');
 ruMethod.set('selected', ruMethod.get('allowed'));
 ssuMethod.set('selected', !ruMethod.get('allowed') && 
ssuMethod.get('allowed'));
   }
@@ -665,8 +665,8 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 sender: self,
 data: {
   upgradeId: self.get('upgradeId'),
-  skipComponentFailures: this.get('skipComponentFailures') || 
false,
-  skipSCFailures: this.get('skipSCFailures') || false
+  skipComponentFailures: this.get('skipComponentFailures')? 
'true': 'false',
+  skipSCFailures: this.get('skipSCFailures')? 'true': 'false'
 },
 success: 'updateOptionsSuccessCallback'
   });
@@ -762,8 +762,8 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   value: version.get('repositoryVersion'),
   label: version.get('displayName'),
   type: version.get('upgradeType'),
-  

[11/50] [abbrv] ambari git commit: Revert "AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)"

2015-10-19 Thread ncole
Revert "AMBARI-1342. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab 
files fail to be distributed to some hosts (rlevas)"

This reverts commit 868a15d65074b2c4ab8aaf653e7f8779f1124769.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 05ee3061beec38b6a6ae65cc59cf5e43817fe32d
Parents: 868a15d
Author: Robert Levas 
Authored: Thu Oct 15 13:47:33 2015 -0400
Committer: Robert Levas 
Committed: Thu Oct 15 13:47:33 2015 -0400

--
 .../server/controller/KerberosHelperImpl.java   |   4 +-
 .../AmbariManagementControllerImplTest.java |  48 
 .../server/controller/KerberosHelperTest.java   | 228 ---
 3 files changed, 3 insertions(+), 277 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05ee3061/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 bf8c519..dbb59bd 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
@@ -2275,7 +2275,9 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   private class EnableKerberosHandler extends Handler {
 @Override
 public boolean shouldProcess(SecurityState desiredSecurityState, 
ServiceComponentHost sch) throws AmbariException {
-  return (desiredSecurityState == SecurityState.SECURED_KERBEROS);
+  return (desiredSecurityState == SecurityState.SECURED_KERBEROS) &&
+  (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) &&
+  (sch.getSecurityState() != SecurityState.SECURING);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/05ee3061/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index 1d9e53d..dd80f46 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@ -596,54 +596,6 @@ public class AmbariManagementControllerImplTest {
   }
 
   /**
-   * Ensure that when the cluster security type updated from KERBEROS to 
KERBEROS,
-   * KerberosHandler.toggleKerberos IS NOT invoked
-   */
-
-  @Test
-  public void testUpdateClustersToggleKerberosReenable() throws Exception {
-// member state mocks
-Capture controllerCapture = new 
Capture();
-Injector injector = createStrictMock(Injector.class);
-Cluster cluster = createNiceMock(Cluster.class);
-ActionManager actionManager = createNiceMock(ActionManager.class);
-ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class);
-
-// requests
-Set setRequests = Collections.singleton(clusterRequest);
-
-KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class);
-// expectations
-injector.injectMembers(capture(controllerCapture));
-expect(injector.getInstance(Gson.class)).andReturn(null);
-expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null);
-
expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper);
-expect(clusterRequest.getClusterId()).andReturn(1L).times(6);
-
expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
-expect(clusters.getClusterById(1L)).andReturn(cluster).times(2);
-expect(cluster.getClusterName()).andReturn("cluster").times(2);
-
expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
-
-cluster.addSessionAttributes(anyObject(Map.class));
-expectLastCall().once();
-
-expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, 
null))
-.andReturn(false)
-.once();
-// Note: kerberosHelper.toggleKerberos is not called
-
-// replay mocks
-replay(actionManager, cluster, clusters, injector, clusterRequest, 
sessionManager, kerberosHelper);
-
-// test

[01/50] [abbrv] ambari git commit: AMBARI-13432 Issue with config tab. (ababiichuk)

2015-10-19 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade f99d82118 -> 3265d0b8f


AMBARI-13432 Issue with config tab. (ababiichuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 6bcdcd9ac9c44c6536355b061024e91eacafa960
Parents: 80c1c9c
Author: aBabiichuk 
Authored: Thu Oct 15 16:26:39 2015 +0300
Committer: aBabiichuk 
Committed: Thu Oct 15 16:30:17 2015 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6bcdcd9a/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 947254a..4cb67a7 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -447,10 +447,9 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   for (var prop in config.properties) {
 var fileName = App.config.getOriginalFileName(config.type);
 var serviceConfig = allConfigs.filterProperty('name', 
prop).findProperty('filename', fileName);
-var value = App.config.formatPropertyValue(serviceConfig, 
config.properties[prop]);
-var isFinal = !!(config.properties_attributes && 
config.properties_attributes.final && config.properties_attributes.final[prop]);
-
 if (serviceConfig) {
+  var value = App.config.formatPropertyValue(serviceConfig, 
config.properties[prop]);
+  var isFinal = !!(config.properties_attributes && 
config.properties_attributes.final && config.properties_attributes.final[prop]);
   if (self.get('selectedConfigGroup.isDefault') || 
configGroup.get('name') == self.get('selectedConfigGroup.name')) {
 var overridePlainObject = {
   "value": value,



[41/50] [abbrv] ambari git commit: AMBARI-13445. LDAP related properties in ranger-admin-site should be derived from similar properties in ranger

2015-10-19 Thread ncole
AMBARI-13445. LDAP related properties in ranger-admin-site should be derived 
from similar properties in ranger


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 85489482409753a81aa34354f70fda344fd89ca9
Parents: 4ba6ace
Author: Gautam Borad 
Authored: Fri Oct 16 12:35:42 2015 +0530
Committer: Gautam Borad 
Committed: Mon Oct 19 11:28:19 2015 +0530

--
 .../RANGER/0.4.0/package/scripts/params.py  |  5 +
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py | 22 +---
 .../RANGER/configuration/ranger-admin-site.xml  | 20 +-
 .../RANGER/configuration/ranger-ugsync-site.xml |  2 +-
 4 files changed, 30 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/85489482/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index ca77837..3900196 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -173,3 +173,8 @@ if xml_configurations_supported:
 
 ranger_admin_hosts = config['clusterHostInfo']['ranger_admin_hosts']
 is_ranger_ha_enabled = True if len(ranger_admin_hosts) > 1 else False
+ranger_ug_ldap_url = 
config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.url"]
+ranger_ug_ldap_bind_dn = 
config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.binddn"]
+ranger_ug_ldap_user_searchfilter = 
config["configurations"]["ranger-ugsync-site"]["ranger.usersync.ldap.user.searchfilter"]
+ranger_ug_ldap_group_searchbase = 
config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchbase"]
+ranger_ug_ldap_group_searchfilter = 
config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchfilter"]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/85489482/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
index e14c209..570b2b7 100755
--- 
a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
@@ -266,19 +266,19 @@ def enable_kms_plugin():
   if params.has_ranger_admin:
 
 ranger_adm_obj = Rangeradmin(url=params.policymgr_mgr_url)
-response_code, response_recieved = 
ranger_adm_obj.check_ranger_login_urllib2(params.policymgr_mgr_url + 
'/login.jsp', 'test:test')
+ambari_username_password_for_ranger = 
format("{ambari_ranger_admin}:{ambari_ranger_password}")
+response_code = 
ranger_adm_obj.check_ranger_login_urllib2(params.policymgr_mgr_url)
 if response_code is not None and response_code == 200:
-  ambari_ranger_admin, ambari_ranger_password = 
ranger_adm_obj.create_ambari_admin_user(params.ambari_ranger_admin, 
params.ambari_ranger_password, params.admin_uname_password)
-  ambari_username_password_for_ranger = ambari_ranger_admin + ':' + 
ambari_ranger_password
+  user_resp_code = 
ranger_adm_obj.create_ambari_admin_user(params.ambari_ranger_admin, 
params.ambari_ranger_password, params.admin_uname_password)
 else:
   raise Fail('Ranger service is not started on given host')   
 
-if ambari_ranger_admin != '' and ambari_ranger_password != '':
+if user_resp_code is not None and user_resp_code == 200:
   get_repo_flag = get_repo(params.policymgr_mgr_url, params.repo_name, 
ambari_username_password_for_ranger)
   if not get_repo_flag:
 create_repo(params.policymgr_mgr_url, 
json.dumps(params.kms_ranger_plugin_repo), ambari_username_password_for_ranger)
 else:
-  raise Fail('Ambari admin username and password not available')
+  raise Fail('Ambari admin user creation failed')
 
 current_datetime = datetime.now()
 
@@ -361,7 +361,10 @@ def create_repo(url, data, usernamepassword):
 else:
   Logger.info('Repository not created')
   except urllib2.URLError, e:
-raise 

[47/50] [abbrv] ambari git commit: AMBARI-13402 Increase zk timeout for embedded mode (dsen)

2015-10-19 Thread ncole
AMBARI-13402 Increase zk timeout for embedded mode (dsen)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 27acc3af4c0ff4327f65e175939adf7acc5b88e7
Parents: 8799954
Author: Dmytro Sen 
Authored: Mon Oct 19 15:31:11 2015 +0300
Committer: Dmytro Sen 
Committed: Mon Oct 19 15:31:11 2015 +0300

--
 .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/27acc3af/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
index 165b87e..17f9b81 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
@@ -265,7 +265,7 @@
   
   
 zookeeper.session.timeout.localHBaseCluster
-2
+12
 
   ZooKeeper session timeout in milliseconds for
   pseudo distributed mode.



[06/50] [abbrv] ambari git commit: AMBARI-13398. Implement REST resource for storing Kerberos descriptors (Laszlo Puskas via smohanty)

2015-10-19 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/81280ea3/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
index 15234db..f8f47c7 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
@@ -27,10 +27,12 @@ import com.google.inject.Provider;
 import com.google.inject.persist.PersistService;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
+import org.apache.ambari.server.orm.dao.DaoUtils;
 import org.apache.ambari.server.orm.dao.StackDAO;
 import org.apache.ambari.server.orm.entities.StackEntity;
 import org.apache.ambari.server.state.Cluster;
@@ -40,7 +42,10 @@ import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.Service;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.stack.OsFamily;
+import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
+import org.easymock.IMocksControl;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -50,9 +55,11 @@ import javax.persistence.EntityManager;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
-import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.createMockBuilder;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.createStrictMock;
@@ -72,6 +79,8 @@ public class UpgradeCatalog213Test {
   private UpgradeCatalogHelper upgradeCatalogHelper;
   private StackEntity desiredStackEntity;
 
+  private IMocksControl mocksControl = EasyMock.createControl();
+
   @Before
   public void init() {
 reset(entityManagerProvider);
@@ -211,7 +220,7 @@ public class UpgradeCatalog213Test {
 expect(mockClusters.getClusters()).andReturn(new HashMap() {{
   put("normal", mockClusterExpected);
 }}).atLeastOnce();
-expect(mockClusterExpected.getCurrentStackVersion()).andReturn(new 
StackId("HDP","2.2"));
+expect(mockClusterExpected.getCurrentStackVersion()).andReturn(new 
StackId("HDP", "2.2"));
 
 
expect(mockClusterExpected.getDesiredConfigByType("hbase-env")).andReturn(mockHbaseEnv).atLeastOnce();
 
expect(mockHbaseEnv.getProperties()).andReturn(propertiesHbaseEnv).atLeastOnce();
@@ -225,7 +234,7 @@ public class UpgradeCatalog213Test {
   @Test
   public void testUpdateHDFSConfiguration() throws Exception {
 EasyMockSupport easyMockSupport = new EasyMockSupport();
-final AmbariManagementController  mockAmbariManagementController = 
easyMockSupport.createNiceMock(AmbariManagementController.class);
+final AmbariManagementController mockAmbariManagementController = 
easyMockSupport.createNiceMock(AmbariManagementController.class);
 final ConfigHelper mockConfigHelper = 
easyMockSupport.createMock(ConfigHelper.class);
 
 final Clusters mockClusters = 
easyMockSupport.createStrictMock(Clusters.class);
@@ -269,29 +278,29 @@ public class UpgradeCatalog213Test {
 Method updateAmsHbaseEnvContent = 
UpgradeCatalog213.class.getDeclaredMethod("updateAmsHbaseEnvContent", 
String.class);
 UpgradeCatalog213 upgradeCatalog213 = new UpgradeCatalog213(injector);
 String oldContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" +
-"\n" +
-"# The maximum amount of heap to use, in MB. Default is 1000.\n" +
-"export HBASE_HEAPSIZE={{hbase_heapsize}}\n" +
-"\n" +
-"{% if java_version  8 %}\n" +
-"export HBASE_MASTER_OPTS=\" -XX:PermSize=64m 
-XX:MaxPermSize={{hbase_master_maxperm_size}} -Xms{{hbase_heapsize}} 
-Xmx{{hbase_heapsize}} -Xmn{{hbase_master_xmn_size}} 
-XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly\"\n" +
-"export HBASE_REGIONSERVER_OPTS=\"-XX:MaxPermSize=128m 
-Xmn{{regionserver_xmn_size}} -XX:CMSInitiatingOccupancyFraction=70 
-XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}} 
-Xmx{{regionserver_heapsize}}\"\n" +
-"{% else %}\n" +
-"export HBASE_MASTER_OPTS=\" 

[28/50] [abbrv] ambari git commit: AMBARI-13454. Make HDP 2.0 stack inactive for Ambari 2.1.3 (aonishuk)

2015-10-19 Thread ncole
AMBARI-13454. Make HDP 2.0 stack inactive for Ambari 2.1.3 (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: e3958e2da099f783ce637a57d752353fafd3f5b9
Parents: 8817569
Author: Andrew Onishuk 
Authored: Fri Oct 16 17:25:05 2015 +0300
Committer: Andrew Onishuk 
Committed: Fri Oct 16 17:25:05 2015 +0300

--
 .../2.1.0.2.0/package/scripts/params_linux.py   |  7 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  | 20 +---
 .../4.0.0.2.0/package/scripts/params_linux.py   |  2 +-
 .../2.0.6/hooks/after-INSTALL/scripts/params.py |  6 +
 .../2.0.6/hooks/before-ANY/scripts/params.py|  6 +
 .../2.0.6/hooks/before-START/scripts/params.py  |  6 +
 .../main/resources/stacks/HDP/2.0/metainfo.xml  |  2 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   |  8 +++
 .../stacks/2.0.6/HIVE/test_hive_metastore.py|  8 +++
 .../stacks/2.0.6/HIVE/test_webhcat_server.py| 24 ++--
 10 files changed, 36 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3958e2d/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 38eac2e..4cbce34 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -106,12 +106,7 @@ hdfs_user_nofile_limit = 
default("/configurations/hadoop-env/hdfs_user_nofile_li
 hdfs_user_nproc_limit = 
default("/configurations/hadoop-env/hdfs_user_nproc_limit", "65536")
 
 create_lib_snappy_symlinks = not Script.is_hdp_stack_greater_or_equal("2.2")
-
-if Script.is_hdp_stack_greater_or_equal("2.0") and 
Script.is_hdp_stack_less_than("2.1") and not OSCheck.is_suse_family():
-  # deprecated rhel jsvc_path
-  jsvc_path = "/usr/libexec/bigtop-utils"
-else:
-  jsvc_path = "/usr/lib/bigtop-utils"
+jsvc_path = "/usr/lib/bigtop-utils"
 
 execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir
 ulimit_cmd = "ulimit -c unlimited ; "

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3958e2d/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index e16df78..14cf1ac 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -49,7 +49,7 @@ hostname = config["hostname"]
 # This is expected to be of the form #.#.#.#
 stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
 hdp_stack_version_major = format_hdp_stack_version(stack_version_unformatted)
-stack_is_hdp21 = Script.is_hdp_stack_greater_or_equal("2.0") and 
Script.is_hdp_stack_less_than("2.2")
+stack_is_hdp21 = Script.is_hdp_stack_less_than("2.2")
 
 # this is not available on INSTALL action because hdp-select is not available
 hdp_stack_version = functions.get_hdp_version('hive-server2')
@@ -83,10 +83,6 @@ sqoop_tar_file = '/usr/share/HDP-webhcat/sqoop*.tar.gz'
 hive_specific_configs_supported = False
 hive_etc_dir_prefix = "/etc/hive"
 limits_conf_dir = "/etc/security/limits.d"
-hcat_conf_dir = '/etc/hcatalog/conf'
-config_dir = '/etc/hcatalog/conf'
-hcat_lib = '/usr/lib/hcatalog/share/hcatalog'
-webhcat_bin_dir = '/usr/lib/hcatalog/sbin'
 
 hive_user_nofile_limit = 
default("/configurations/hive-env/hive_user_nofile_limit", "32000")
 hive_user_nproc_limit = 
default("/configurations/hive-env/hive_user_nproc_limit", "16000")
@@ -101,11 +97,10 @@ hive_config_dir = status_params.hive_config_dir
 hive_client_conf_dir = status_params.hive_client_conf_dir
 hive_server_conf_dir = status_params.hive_server_conf_dir
 
-if Script.is_hdp_stack_greater_or_equal("2.1"):
-  hcat_conf_dir = '/etc/hive-hcatalog/conf'
-  config_dir = '/etc/hive-webhcat/conf'
-  hcat_lib = '/usr/lib/hive-hcatalog/share/hcatalog'
-  webhcat_bin_dir = 

[49/50] [abbrv] ambari git commit: AMBARI-13458. Expose in the API whether downgrade is supported or not (dgrinenko via dlysnichenko)

2015-10-19 Thread ncole
AMBARI-13458. Expose in the API whether downgrade is supported or not 
(dgrinenko via dlysnichenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 7bd1a2a3ba0198111d0447b1ff8ec8cf364e9fef
Parents: 16b2f92
Author: Lisnichenko Dmitro 
Authored: Mon Oct 19 16:18:08 2015 +0300
Committer: Lisnichenko Dmitro 
Committed: Mon Oct 19 16:18:08 2015 +0300

--
 .../internal/UpgradeResourceProvider.java   |  4 ++
 .../server/orm/entities/UpgradeEntity.java  | 15 +-
 .../ambari/server/state/stack/UpgradePack.java  | 18 +++
 .../server/upgrade/UpgradeCatalog213.java   | 27 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |  1 +
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  1 +
 .../resources/Ambari-DDL-Postgres-CREATE.sql|  1 +
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |  1 +
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |  1 +
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |  1 +
 .../HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml |  1 +
 .../ambari/server/orm/dao/UpgradeDAOTest.java   |  4 ++
 .../server/upgrade/UpgradeCatalog213Test.java   | 56 +++-
 13 files changed, 127 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd1a2a3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 3a52025..a1d2451 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -124,6 +124,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   protected static final String UPGRADE_FROM_VERSION = "Upgrade/from_version";
   protected static final String UPGRADE_TO_VERSION = "Upgrade/to_version";
   protected static final String UPGRADE_DIRECTION = "Upgrade/direction";
+  protected static final String UPGRADE_DOWNGRADE_ALLOWED = 
"Upgrade/downgrade_allowed";
   protected static final String UPGRADE_REQUEST_STATUS = 
"Upgrade/request_status";
   protected static final String UPGRADE_ABORT_REASON = "Upgrade/abort_reason";
   protected static final String UPGRADE_SKIP_PREREQUISITE_CHECKS = 
"Upgrade/skip_prerequisite_checks";
@@ -238,6 +239,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 PROPERTY_IDS.add(UPGRADE_FROM_VERSION);
 PROPERTY_IDS.add(UPGRADE_TO_VERSION);
 PROPERTY_IDS.add(UPGRADE_DIRECTION);
+PROPERTY_IDS.add(UPGRADE_DOWNGRADE_ALLOWED);
 PROPERTY_IDS.add(UPGRADE_SKIP_FAILURES);
 PROPERTY_IDS.add(UPGRADE_SKIP_SC_FAILURES);
 PROPERTY_IDS.add(UPGRADE_SKIP_MANUAL_VERIFICATION);
@@ -462,6 +464,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 setResourceProperty(resource, UPGRADE_FROM_VERSION, 
entity.getFromVersion(), requestedIds);
 setResourceProperty(resource, UPGRADE_TO_VERSION, entity.getToVersion(), 
requestedIds);
 setResourceProperty(resource, UPGRADE_DIRECTION, entity.getDirection(), 
requestedIds);
+setResourceProperty(resource, UPGRADE_DOWNGRADE_ALLOWED, 
entity.isDowngradeAllowed(), requestedIds);
 
 return resource;
   }
@@ -803,6 +806,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 entity.setDirection(direction);
 entity.setUpgradePackage(pack.getName());
 entity.setUpgradeType(pack.getType());
+entity.setDowngradeAllowed(pack.isDowngradeAllowed());
 
 req.getRequestStatusResponse();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7bd1a2a3/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
index ad9073a..297fc8d 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
@@ -84,6 +84,9 @@ public class UpgradeEntity {
   

[43/50] [abbrv] ambari git commit: AMBARI-13466. Fix UI unit tests

2015-10-19 Thread ncole
AMBARI-13466. Fix UI unit tests


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 6d4a93159681383613e2fc71958223deacc37471
Parents: 42742ca
Author: Alex Antonenko 
Authored: Mon Oct 19 12:48:43 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 12:48:43 2015 +0300

--
 ambari-web/test/mappers/alert_definitions_mapper_test.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6d4a9315/ambari-web/test/mappers/alert_definitions_mapper_test.js
--
diff --git a/ambari-web/test/mappers/alert_definitions_mapper_test.js 
b/ambari-web/test/mappers/alert_definitions_mapper_test.js
index 3f6ed93..180e728 100644
--- a/ambari-web/test/mappers/alert_definitions_mapper_test.js
+++ b/ambari-web/test/mappers/alert_definitions_mapper_test.js
@@ -21,8 +21,7 @@ require('mappers/alert_definitions_mapper');
 var testHelpers = require('test/helpers');
 
 describe('App.alertDefinitionsMapper', function () {
-
-  describe('#map', function () {
+  describe.skip('#map', function () {
 
 var json = {
   items: [



[25/50] [abbrv] ambari git commit: AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)

2015-10-19 Thread ncole
AMBARI-13451. Timezone select list needs to be user friendly (onechiporenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 34082a5a7aa90f4c937b46c133629b26aba5e909
Parents: 2fbbadf
Author: Oleg Nechiporenko 
Authored: Fri Oct 16 15:51:44 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Fri Oct 16 15:51:44 2015 +0300

--
 ambari-web/app/assets/test/tests.js |   3 +-
 .../global/user_settings_controller.js  | 166 +-
 .../charts/heatmap_metrics/heatmap_metric.js|   4 +-
 .../app/mappers/service_metrics_mapper.js   |   4 +-
 .../app/models/alerts/alert_definition.js   |   2 +-
 ambari-web/app/models/alerts/alert_instance.js  |   2 +-
 .../models/configs/service_config_version.js|   2 +-
 ambari-web/app/templates/common/settings.hbs|   4 +-
 ambari-web/app/utils/data_manipulation.js   |   2 +-
 ambari-web/app/utils/date.js| 242 ---
 ambari-web/app/utils/date/date.js   | 215 +
 ambari-web/app/utils/date/timezone.js   | 226 ++
 ambari-web/app/utils/helper.js  |   4 +-
 ambari-web/app/utils/host_progress_popup.js |   2 +-
 .../app/views/common/chart/linear_time.js   |   2 +-
 .../app/views/main/alert_definitions_view.js|   2 +-
 ambari-web/app/views/main/alerts.js |   2 +-
 .../views/main/charts/heatmap/heatmap_host.js   |   4 +-
 .../main/dashboard/widgets/links_widget.js  |   2 +-
 .../widgets/resource_manager_uptime.js  |   2 +-
 .../views/main/dashboard/widgets/text_widget.js |   2 +-
 .../dashboard/widgets/uptime_text_widget.js |   2 +-
 ambari-web/app/views/main/host.js   |   2 +-
 ambari-web/app/views/main/host/configs.js   |   2 +-
 ambari-web/app/views/main/host/details.js   |   2 +-
 .../app/views/main/service/services/flume.js|   2 +-
 .../app/views/main/service/services/hbase.js|   2 +-
 .../app/views/main/service/services/hdfs.js |   2 +-
 .../app/views/main/service/services/storm.js|   2 +-
 .../app/views/main/service/services/yarn.js |   2 +-
 .../views/wizard/step9/hostLogPopupBody_view.js |   4 +-
 ambari-web/app/views/wizard/step9_view.js   |   2 +-
 .../heatmap_metrics/heatmap_metric_test.js  |   2 +-
 ambari-web/test/utils/date/date_test.js | 185 
 ambari-web/test/utils/date/timezone_test.js | 175 +++
 ambari-web/test/utils/date_test.js  | 185 
 .../test/views/common/chart/linear_time_test.js |   2 +-
 .../moment-timezone-with-data-2010-2020.js  | 299 +--
 38 files changed, 911 insertions(+), 855 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34082a5a/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index b59f91f..f79658c 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -163,7 +163,8 @@ var files = [
   'test/utils/batch_scheduled_requests_test',
   'test/utils/blueprint_test',
   'test/utils/config_test',
-  'test/utils/date_test',
+  'test/utils/date/date_test',
+  'test/utils/date/timezone_test',
   'test/utils/data_manipulation_test',
   'test/utils/config_test',
   'test/utils/form_field_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/34082a5a/ambari-web/app/controllers/global/user_settings_controller.js
--
diff --git a/ambari-web/app/controllers/global/user_settings_controller.js 
b/ambari-web/app/controllers/global/user_settings_controller.js
index ef53d81..4ad7786 100644
--- a/ambari-web/app/controllers/global/user_settings_controller.js
+++ b/ambari-web/app/controllers/global/user_settings_controller.js
@@ -18,7 +18,7 @@
 
 var App = require('app');
 
-var dateUtils = require('utils/date');
+var timezoneUtils = require('utils/date/timezone');
 
 /**
  * Controller for user settings
@@ -49,47 +49,11 @@ App.UserSettingsController = 
Em.Controller.extend(App.UserPref, {
   },
   timezone: {
 name: prefix + 'timezone-' + loginName,
-defaultValue: dateUtils.detectUserTimezone()
+defaultValue: timezoneUtils.detectUserTimezone()
   }
 };
   }.property('App.router.loginName'),
 
-  init: function () {
-this.set('timezonesFormatted', this._parseTimezones());
-this._super();
-  },
-
-  /**
-   *
-   * 

[03/50] [abbrv] ambari git commit: AMBARI-13433. Issues with CSV download.

2015-10-19 Thread ncole
http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/network_1hr.json
--
diff --git a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json 
b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json
index 931d460..855fb1c 100644
--- a/ambari-web/app/assets/data/cluster_metrics/network_1hr.json
+++ b/ambari-web/app/assets/data/cluster_metrics/network_1hr.json
@@ -2,8 +2,8 @@
   "href" : 
"http://ambari/api/clusters/vmc?fields=metrics/network[1352702257,1352705857,15];,
   "metrics" : {
 "network" : {
-  "Out" : 
"[[12583.08,1352706495],[12583.08,1352706510],[12583.08,1352706525],[12583.08,1352706540],[12583.08,1352706555],[12583.08,1352706570],[12583.08,1352706585],[12583.08,1352706600],[12583.08,1352706615],[12583.08,1352706630],[12583.08,1352706645],[12583.08,1352706660],[12583.08,1352706675],[12106.336,1352706690],[10795.29,1352706705],[10795.29,1352706720],[10795.29,1352706735],[10795.29,1352706750],[10795.29,1352706765],[10795.29,1352706780],[10795.29,1352706795],[10795.29,1352706810],[10795.29,1352706825],[10795.29,1352706840],[31635.684667,1352706855],[88946.77,1352706870],[88946.77,1352706885],[68785.01,1352706900],[13340.17,1352706915],[13340.17,1352706930],[13340.17,1352706945],[13340.17,1352706960],[13340.17,1352706975],[13340.17,1352706990],[13340.17,1352707005],[13340.17,1352707020],[13340.17,1352707035],[13340.17,1352707050],[13340.17,1352707065],[13340.17,1352707080],[13340.17,1352707095],[13340.17,1352707110],[13340.17,1352707125],[13340.17,1352707140],[13340.1
 
7,1352707155],[13340.17,1352707170],[13118.971333,1352707185],[11681.18,1352707200],[11681.18,1352707215],[11681.18,1352707230],[11681.18,1352707245],[11681.18,1352707260],[11681.18,1352707275],[11681.18,1352707290],[11681.18,1352707305],[11681.18,1352707320],[11681.18,1352707335],[11681.18,1352707350],[11681.18,1352707365],[11681.18,1352707380],[11681.18,1352707395],[11681.18,1352707410],[11681.18,1352707425],[11681.18,1352707440],[11681.18,1352707455],[11681.18,1352707470],[11681.18,1352707485],[11983.44,1352707500],[12587.96,1352707515],[12587.96,1352707530],[12587.96,1352707545],[12587.96,1352707560],[12587.96,1352707575],[12587.96,1352707590],[12587.96,1352707605],[12587.96,1352707620],[12587.96,1352707635],[12587.96,1352707650],[12587.96,1352707665],[12587.96,1352707680],[12587.96,1352707695],[12587.96,1352707710],[12587.96,1352707725],[36661.51,1352707740],[84808.62,1352707755],[66401.5,1352707770],[15781.92,1352707785],[15781.92,1352707800],[30233.69,1352707815],[88040.7
 
7,1352707830],[77739.934,1352707845],[10784.5,1352707860],[10784.5,1352707875],[10784.5,1352707890],[10784.5,1352707905],[10784.5,1352707920],[10784.5,1352707935],[10784.5,1352707950],[10784.5,1352707965],[10784.5,1352707980],[10784.5,1352707995],[10784.5,1352708010],[10784.5,1352708025],[10784.5,1352708040],[10784.5,1352708055],[10784.5,1352708070],[10784.5,1352708085],[10784.5,1352708100],[10784.5,1352708115],[10784.5,1352708130],[10784.5,1352708145],[12577.01,1352708160],[12577.01,1352708175],[12577.01,1352708190],[12577.01,1352708205],[12577.01,1352708220],[12577.01,1352708235],[12577.01,1352708250],[12577.01,1352708265],[12577.01,1352708280],[12577.01,1352708295],[12577.01,1352708310],[12577.01,1352708325],[12577.01,1352708340],[12577.01,1352708355],[12577.01,1352708370],[12577.01,1352708385],[12577.01,1352708400],[12577.01,1352708415],[12577.01,1352708430],[12577.01,1352708445],[76909.477333,1352708460],[86806.78,1352708475],[86806.78,1352708490],[28706.124,1352708505],[14180.
 
96,1352708520],[14180.96,1352708535],[14180.96,1352708550],[14180.96,1352708565],[14180.96,1352708580],[14180.96,1352708595],[14180.96,1352708610],[14180.96,1352708625],[14180.96,1352708640],[14180.96,1352708655],[14180.96,1352708670],[14180.96,1352708685],[14180.96,1352708700],[14180.96,1352708715],[14180.96,1352708730],[14180.96,1352708745],[14180.96,1352708760],[14180.96,1352708775],[14180.96,1352708790],[12369.776,1352708805],[10784.99,1352708820],[10784.99,1352708835],[10784.99,1352708850],[10784.99,1352708865],[10784.99,1352708880],[10784.99,1352708895],[10784.99,1352708910],[10784.99,1352708925],[10784.99,1352708940],[10784.99,1352708955],[10784.99,1352708970],[10784.99,1352708985],[10784.99,1352709000],[10784.99,1352709015],[10784.99,1352709030],[10784.99,1352709045],[10784.99,1352709060],[10784.99,1352709075],[11502.454,1352709090],[12578.65,1352709105],[12578.65,1352709120],[12578.65,1352709135],[12578.65,1352709150],[12578.65,1352709165],[12578.65,1352709180],[12578.65,13
 

[27/50] [abbrv] ambari git commit: AMBARI-13453. Fix UI unit tests for admin-view

2015-10-19 Thread ncole
AMBARI-13453. Fix UI unit tests for admin-view


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 88175691e6d414ccca6d07fb33cf7412419b913d
Parents: 8bb2b14
Author: Alex Antonenko 
Authored: Fri Oct 16 16:34:58 2015 +0300
Committer: Alex Antonenko 
Committed: Fri Oct 16 16:39:57 2015 +0300

--
 .../unit/controllers/CreateViewInstanceCtrl.js | 14 +-
 .../test/unit/controllers/mainCtrl_test.js | 17 +++--
 2 files changed, 28 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/88175691/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
index cd71d11..35ddc16 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/CreateViewInstanceCtrl.js
@@ -53,6 +53,7 @@ describe('#CreateViewInstanceCtrl', function () {
   }
 };
 $httpBackend.flush();
+scope.instance = {};
 scope.save();
 expect(View.createInstance).toHaveBeenCalled();
   });
@@ -63,11 +64,22 @@ describe('#CreateViewInstanceCtrl', function () {
 $dirty: true
   }
 };
+scope.instance = {};
 scope.version = '1.0.0';
 $httpBackend.expectGET('template/modal/backdrop.html');
 $httpBackend.expectGET('template/modal/window.html');
+$httpBackend.whenGET(/\/api\/v1\/clusters\?_=\d+/).respond(200, {
+  "items" : [
+{
+  "Clusters" : {
+"cluster_name" : "c1",
+"version" : "HDP-2.2"
+  }
+}
+  ]
+});
 scope.$digest();
 $httpBackend.flush();
 chai.expect(scope.view.ViewVersionInfo.parameters[0].value).to.equal('d');
   });
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/88175691/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/mainCtrl_test.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/mainCtrl_test.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/mainCtrl_test.js
index 0ba01a3..8d748d2 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/mainCtrl_test.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/mainCtrl_test.js
@@ -39,6 +39,15 @@ describe('#Auth', function () {
   });
   $window = _$window_;
   $httpBackend = _$httpBackend_;
+  var re = /api\/v1\/services\/AMBARI\/components\/AMBARI_SERVER.+/;
+  $httpBackend.whenGET(re).respond(200, {
+  RootServiceComponents: {
+component_version: 2.2,
+properties: {
+  'user.inactivity.timeout.default': 20
+}
+  }
+  });
   $httpBackend.whenGET(/\/api\/v1\/logout\?_=\d+/).respond(200,{message: 
"successfully logged out"});
   $httpBackend.whenGET(/\/api\/v1\/views.+/)
 .respond(200,{
@@ -95,7 +104,11 @@ describe('#Auth', function () {
 
 it('should reset window.location and ambari localstorage', function () {
   scope.signOut();
-  chai.expect($window.location.pathname).to.be.empty;
+
+  runs(function() {
+chai.expect($window.location.pathname).to.be.empty;
+  });
+
   var data = JSON.parse(localStorage.ambari);
   chai.expect(data.app.authenticated).to.equal(undefined);
   chai.expect(data.app.loginName).to.equal(undefined);
@@ -110,4 +123,4 @@ describe('#Auth', function () {
   
chai.expect(scope.viewInstances[0].instance_name).to.equal('VisibleInstance');
 });
   });
-});
\ No newline at end of file
+});



[31/50] [abbrv] ambari git commit: AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)

2015-10-19 Thread ncole
AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: ce356ddc8ca233737e270fec097381192bc4bcb8
Parents: 2f7184a
Author: Jayush Luniya 
Authored: Fri Oct 16 08:43:13 2015 -0700
Committer: Jayush Luniya 
Committed: Fri Oct 16 08:43:13 2015 -0700

--
 .../libraries/functions/namenode_ha_utils.py| 27 ++--
 1 file changed, 25 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce356ddc/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
index 99f90b8..0920e85 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
@@ -23,6 +23,8 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.libraries.functions.jmx import get_value_from_jmx
 from resource_management.core.base import Fail
 from resource_management.core import shell
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.decorator import retry
 
 __all__ = ["get_namenode_states", "get_active_namenode", 
"get_property_for_active_namenode"]
 
@@ -32,8 +34,29 @@ HDFS_NN_STATE_STANDBY = 'standby'
 NAMENODE_HTTP_FRAGMENT = 'dfs.namenode.http-address.{0}.{1}'
 NAMENODE_HTTPS_FRAGMENT = 'dfs.namenode.https-address.{0}.{1}'
 JMX_URI_FRAGMENT = 
"{0}://{1}/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem"
-  
-def get_namenode_states(hdfs_site, security_enabled, run_user):
+
+def get_namenode_states(hdfs_site, security_enabled, run_user, times=10, 
sleep_time=1, backoff_factor=2):
+  """
+  return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 
'hdfs://hostname2:port2')] , [], []
+  """
+  @retry(times=times, sleep_time=sleep_time, backoff_factor=backoff_factor, 
err_class=Fail)
+  def doRetries(hdfs_site, security_enabled, run_user):
+doRetries.attempt += 1
+active_namenodes, standby_namenodes, unknown_namenodes = 
get_namenode_states_noretries(hdfs_site, security_enabled, run_user)
+Logger.info(
+  "NameNode HA states: active_namenodes = {0}, standby_namenodes = {1}, 
unknown_namenodes = {2}".format(
+active_namenodes, standby_namenodes, unknown_namenodes))
+if active_namenodes:
+  return active_namenodes, standby_namenodes, unknown_namenodes
+elif doRetries.attempt == times:
+  Logger.warning("No active NameNode was found after {0} retries. Will 
return current NameNode HA states".format(times))
+  return active_namenodes, standby_namenodes, unknown_namenodes
+raise Fail('No active NameNode was found.')
+
+  doRetries.attempt = 0
+  return doRetries(hdfs_site, security_enabled, run_user)
+
+def get_namenode_states_noretries(hdfs_site, security_enabled, run_user):
   """
   return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 
'hdfs://hostname2:port2')] , [], []
   """



[12/50] [abbrv] ambari git commit: AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files fail to be distributed to some hosts (rlevas)

2015-10-19 Thread ncole
AMBARI-13425. Ambari 1.7 to 2.1.x upgrade with existing Kerberos, keytab files 
fail to be distributed to some hosts (rlevas)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5c800d27bc81e589a338269c07e6435ec0334dd4
Parents: 05ee306
Author: Robert Levas 
Authored: Thu Oct 15 13:48:29 2015 -0400
Committer: Robert Levas 
Committed: Thu Oct 15 13:48:29 2015 -0400

--
 .../server/controller/KerberosHelperImpl.java   |   4 +-
 .../AmbariManagementControllerImplTest.java |  48 
 .../server/controller/KerberosHelperTest.java   | 228 +++
 3 files changed, 277 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c800d27/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 dbb59bd..bf8c519 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
@@ -2275,9 +2275,7 @@ public class KerberosHelperImpl implements KerberosHelper 
{
   private class EnableKerberosHandler extends Handler {
 @Override
 public boolean shouldProcess(SecurityState desiredSecurityState, 
ServiceComponentHost sch) throws AmbariException {
-  return (desiredSecurityState == SecurityState.SECURED_KERBEROS) &&
-  (sch.getSecurityState() != SecurityState.SECURED_KERBEROS) &&
-  (sch.getSecurityState() != SecurityState.SECURING);
+  return (desiredSecurityState == SecurityState.SECURED_KERBEROS);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/5c800d27/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index dd80f46..1d9e53d 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@ -596,6 +596,54 @@ public class AmbariManagementControllerImplTest {
   }
 
   /**
+   * Ensure that when the cluster security type updated from KERBEROS to 
KERBEROS,
+   * KerberosHandler.toggleKerberos IS NOT invoked
+   */
+
+  @Test
+  public void testUpdateClustersToggleKerberosReenable() throws Exception {
+// member state mocks
+Capture controllerCapture = new 
Capture();
+Injector injector = createStrictMock(Injector.class);
+Cluster cluster = createNiceMock(Cluster.class);
+ActionManager actionManager = createNiceMock(ActionManager.class);
+ClusterRequest clusterRequest = createNiceMock(ClusterRequest.class);
+
+// requests
+Set setRequests = Collections.singleton(clusterRequest);
+
+KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class);
+// expectations
+injector.injectMembers(capture(controllerCapture));
+expect(injector.getInstance(Gson.class)).andReturn(null);
+expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null);
+
expect(injector.getInstance(KerberosHelper.class)).andReturn(kerberosHelper);
+expect(clusterRequest.getClusterId()).andReturn(1L).times(6);
+
expect(clusterRequest.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
+expect(clusters.getClusterById(1L)).andReturn(cluster).times(2);
+expect(cluster.getClusterName()).andReturn("cluster").times(2);
+
expect(cluster.getSecurityType()).andReturn(SecurityType.KERBEROS).anyTimes();
+
+cluster.addSessionAttributes(anyObject(Map.class));
+expectLastCall().once();
+
+expect(kerberosHelper.shouldExecuteCustomOperations(SecurityType.KERBEROS, 
null))
+.andReturn(false)
+.once();
+// Note: kerberosHelper.toggleKerberos is not called
+
+// replay mocks
+replay(actionManager, cluster, clusters, injector, clusterRequest, 
sessionManager, kerberosHelper);
+
+// test
+AmbariManagementController controller = new 

[35/50] [abbrv] ambari git commit: AMBARI-13455. Ambari QE Deploy Test - Kerberos service check fails. Additional changes. (akovalenko)

2015-10-19 Thread ncole
AMBARI-13455. Ambari QE Deploy Test - Kerberos service check fails. Additional 
changes. (akovalenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 4023dcf9ece78995fde9dbb2e70644489aaad01f
Parents: 1d61e66
Author: Aleksandr Kovalenko 
Authored: Fri Oct 16 22:18:37 2015 +0300
Committer: Aleksandr Kovalenko 
Committed: Fri Oct 16 22:19:27 2015 +0300

--
 .../main/admin/kerberos/wizard_controller.js| 16 
 1 file changed, 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4023dcf9/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index cb7ae74..4541914 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -263,22 +263,6 @@ App.KerberosWizardController = 
App.WizardController.extend(App.InstallComponent,
 }, this);
   }
 }
-  },
-  {
-type: 'async',
-callback: function() {
-  var self = this;
-  var dfd = $.Deferred();
-  if (App.get('supports.storeKDCCredentials')) {
-
credentialsUtils.isStorePersisted(App.get('clusterName')).then(function(isPersisted)
 {
-  self.set('content.secureStoragePersisted', isPersisted);
-  dfd.resolve();
-});
-  } else {
-dfd.resolve();
-  }
-  return dfd.promise();
-}
   }
 ],
 '3': [



[05/50] [abbrv] ambari git commit: AMBARI-13433. Issues with CSV download.

2015-10-19 Thread ncole
AMBARI-13433. Issues with CSV download.


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c877445e4863a14754faea893555f80b6f909491
Parents: 95d85db
Author: Alex Antonenko 
Authored: Thu Oct 15 17:00:52 2015 +0300
Committer: Alex Antonenko 
Committed: Thu Oct 15 17:40:24 2015 +0300

--
 .../assets/data/cluster_metrics/cpu_1hr.json| 10 +--
 .../assets/data/cluster_metrics/load_1hr.json   |  8 +-
 .../assets/data/cluster_metrics/memory_1hr.json | 12 +--
 .../data/cluster_metrics/network_1hr.json   |  4 +-
 .../common/widgets/export_metrics_mixin.js  | 14 +++-
 ambari-web/app/styles/application.less  |  4 +-
 .../app/styles/enhanced_service_dashboard.less  | 78 ++--
 .../app/templates/common/chart/linear_time.hbs  | 12 ++-
 .../templates/common/widget/gauge_widget.hbs| 14 ++--
 .../templates/common/widget/graph_widget.hbs| 22 +++---
 .../templates/common/widget/number_widget.hbs   |  8 +-
 .../templates/common/widget/template_widget.hbs | 14 ++--
 .../app/templates/main/charts/linear_time.hbs   |  4 +-
 .../main/dashboard/widgets/cluster_metrics.hbs  |  2 +-
 .../app/views/common/chart/linear_time.js   | 22 --
 .../views/common/export_metrics_menu_view.js|  2 +-
 .../views/common/widget/graph_widget_view.js| 16 ++--
 .../dashboard/widgets/cluster_metrics_widget.js |  2 +-
 .../common/widgets/export_metrics_mixin_test.js | 43 +--
 .../test/views/common/chart/linear_time_test.js | 20 +
 20 files changed, 196 insertions(+), 115 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c877445e/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json
--
diff --git a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json 
b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json
index 89b0dfa..bb8d7cb 100644
--- a/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json
+++ b/ambari-web/app/assets/data/cluster_metrics/cpu_1hr.json
@@ -2,11 +2,11 @@
   "href" : 
"http://ambari/api/clusters/vmc?fields=metrics/cpu[1352702257,1352705857,15];,
   "metrics" : {
 "cpu" : {
-  "User" : 
"[[15.5,1352706465],[15.96667,1352706480],[16.4,1352706495],[15.5,1352706510],[15.5,1352706525],[15.5,1352706540],[15.5,1352706555],[15.5,1352706570],[15.82,1352706585],[16.7,1352706600],[16.16667,1352706615],[14.7,1352706630],[14.7,1352706645],[14.96667,1352706660],[15.64,1352706675],[15.48,1352706690],[15.7,1352706705],[15.7,1352706720],[15.7,1352706735],[15.7,1352706750],[15.7,1352706765],[15.62,1352706780],[15.24,1352706795],[14.78,1352706810],[14.7,1352706825],[29.9,1352706840],[51.38667,1352706855],[29.8,1352706870],[36.2,1352706885],[41.58667,1352706900],[48.16,1352706915],[15.2,1352706930],[14.98,1352706945],[14.1,1352706960],[14.2,1352706975],[15.1,1352706990],[15.1,1352707005],[15.1,1352707020],[15.1,1352707035],[15.38,1352707050],[17.01333,1352707065],[15.8,1352707080],[15.8,1352707095],[15.8,1352707110],[15.8,1352707125],[15.8,1352707140],[15.8,1352707155],[15.92,1352707170],[17.74667,1352707185],[26.5,13
 
52707200],[33.38,1352707215],[62.1,1352707230],[66.9,1352707245],[57.88,1352707260],[20.42,1352707275],[15.22,1352707290],[16.5,1352707305],[16.04,1352707320],[14.2,1352707335],[14.2,1352707350],[14.2,1352707365],[14.2,1352707380],[14.2,1352707395],[14.4,1352707410],[15.2,1352707425],[15.34,1352707440],[15.9,1352707455],[15.9,1352707470],[15.9,1352707485],[15.8,1352707500],[15.1,1352707515],[14.94,1352707530],[16.5,1352707545],[15.9,1352707560],[14.8,1352707575],[15.1,1352707590],[15.8,1352707605],[15.9,1352707620],[16.1,1352707635],[16.1,1352707650],[16.1,1352707665],[15.76667,1352707680],[15.1,1352707695],[15.1,1352707710],[15.1,1352707725],[15.96667,1352707740],[31.94,1352707755],[56.40667,1352707770],[16.0,1352707785],[22.04,1352707800],[45.68,1352707815],[39.77333,1352707830],[14.9,1352707845],[14.9,1352707860],[14.9,1352707875],[14.9,1352707890],[14.9,1352707905],[14.96,1352707920],[15.0,1352707935],[14.2,1352707950],[14.2,1352707965],[1
 

ambari git commit: AMBARI-13473 Navigation between pages in installer too long. (atkach)

2015-10-19 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/trunk d23917f81 -> 67da040af


AMBARI-13473 Navigation between pages in installer too long. (atkach)


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

Branch: refs/heads/trunk
Commit: 67da040afbb3af86c3fec72b776f2816b3843697
Parents: d23917f
Author: Andrii Tkach 
Authored: Mon Oct 19 17:33:27 2015 +0300
Committer: Andrii Tkach 
Committed: Mon Oct 19 17:33:27 2015 +0300

--
 .../app/controllers/wizard/step7_controller.js | 17 +++--
 ambari-web/app/mappers/configs/themes_mapper.js|  2 ++
 .../app/utils/configs/config_property_helper.js|  9 +
 .../utils/configs/config_property_helper_test.js   |  8 
 4 files changed, 22 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/67da040a/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 8bb37f7..4e6ab19 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -800,12 +800,25 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 });
 services.forEach(function (service) {
   var configsByService = [];
-  var serviceConfigs = configs.filterProperty('serviceName', 
service.get('serviceName'));
+  var dependencies = {};
+  var serviceConfigs = [];
+
+  configs.forEach(function (config) {
+if (config.serviceName === service.get('serviceName')) {
+  serviceConfigs.push(config);
+}
+if (config.filename === 'hive-site.xml' && config.name === 
'hive.metastore.uris') {
+  dependencies['hive.metastore.uris'] = config.recommendedValue;
+}
+if (config.filename === 'zoo.cfg.xml' && config.name === 'clientPort') 
{
+  dependencies['clientPort'] = config.recommendedValue;
+}
+  }, this);
   serviceConfigs.forEach(function (_config) {
 var serviceConfigProperty = App.ServiceConfigProperty.create(_config);
 this.updateHostOverrides(serviceConfigProperty, _config);
 if (!storedConfigs && !serviceConfigProperty.get('hasInitialValue')) {
-  configPropertyHelper.initialValue(serviceConfigProperty, localDB, 
configs);
+  configPropertyHelper.initialValue(serviceConfigProperty, localDB, 
dependencies);
 }
 serviceConfigProperty.validate();
 configsByService.pushObject(serviceConfigProperty);

http://git-wip-us.apache.org/repos/asf/ambari/blob/67da040a/ambari-web/app/mappers/configs/themes_mapper.js
--
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js 
b/ambari-web/app/mappers/configs/themes_mapper.js
index 2fc9641..fff2013 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -71,6 +71,7 @@ App.themesMapper = App.QuickDataMapper.create({
   },
 
   map: function (json) {
+console.time('App.themesMapper execution time');
 var tabs = [];
 json.items.forEach(function(item) {
   this.mapThemeLayouts(item, tabs);
@@ -80,6 +81,7 @@ App.themesMapper = App.QuickDataMapper.create({
 
 App.store.loadMany(this.get("tabModel"), tabs);
 App.store.commit();
+console.timeEnd('App.themesMapper execution time');
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/67da040a/ambari-web/app/utils/configs/config_property_helper.js
--
diff --git a/ambari-web/app/utils/configs/config_property_helper.js 
b/ambari-web/app/utils/configs/config_property_helper.js
index 125c1f8..3cafc9f 100644
--- a/ambari-web/app/utils/configs/config_property_helper.js
+++ b/ambari-web/app/utils/configs/config_property_helper.js
@@ -20,14 +20,7 @@ var App = require('app');
 
 module.exports = {
 
-  initialValue: function (configProperty, localDB, configs) {
-var hiveMetastoreUrisConfig = configs.filterProperty('filename', 
'hive-site.xml').findProperty('name', 'hive.metastore.uris');
-var clientPortConfig = configs.filterProperty('filename', 
'zoo.cfg.xml').findProperty('name', 'clientPort');
-var dependencies = {
-  'hive.metastore.uris': hiveMetastoreUrisConfig && 
hiveMetastoreUrisConfig.recommendedValue,
-  'clientPort': clientPortConfig && clientPortConfig.recommendedValue

ambari git commit: AMBARI-13475. Override for Flume does not work properly (UI). (akovalenko)

2015-10-19 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 291157741 -> fa04433c2


AMBARI-13475. Override for Flume does not work properly (UI). (akovalenko)


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

Branch: refs/heads/branch-2.1
Commit: fa04433c242cf19f94b125f3840f31670dea2776
Parents: 2911577
Author: Aleksandr Kovalenko 
Authored: Mon Oct 19 18:03:59 2015 +0300
Committer: Aleksandr Kovalenko 
Committed: Mon Oct 19 18:07:37 2015 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa04433c/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index cf5c46b..69d7833 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -119,7 +119,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   canEdit: function () {
 return (this.get('selectedVersion') == this.get('currentDefaultVersion') 
|| !this.get('selectedConfigGroup.isDefault'))
 && !this.get('isCompareMode') && App.isAccessible('MANAGER') && 
!this.get('isHostsConfigsPage');
-  }.property('selectedVersion', 'isCompareMode', 'currentDefaultVersion'),
+  }.property('selectedVersion', 'isCompareMode', 'currentDefaultVersion', 
'selectedConfigGroup.isDefault'),
 
   serviceConfigs: function () {
 return App.config.get('preDefinedServiceConfigs');



ambari git commit: AMBARI-13475. Override for Flume does not work properly (UI). (akovalenko)

2015-10-19 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 67da040af -> fefa1c44d


AMBARI-13475. Override for Flume does not work properly (UI). (akovalenko)


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

Branch: refs/heads/trunk
Commit: fefa1c44d5e8ec7a54ca044f41effb2ec4c5843b
Parents: 67da040
Author: Aleksandr Kovalenko 
Authored: Mon Oct 19 18:03:59 2015 +0300
Committer: Aleksandr Kovalenko 
Committed: Mon Oct 19 18:03:59 2015 +0300

--
 ambari-web/app/controllers/main/service/info/configs.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fefa1c44/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 4cb67a7..8c4b72c 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -119,7 +119,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
   canEdit: function () {
 return (this.get('selectedVersion') == this.get('currentDefaultVersion') 
|| !this.get('selectedConfigGroup.isDefault'))
 && !this.get('isCompareMode') && App.isAccessible('MANAGER') && 
!this.get('isHostsConfigsPage');
-  }.property('selectedVersion', 'isCompareMode', 'currentDefaultVersion'),
+  }.property('selectedVersion', 'isCompareMode', 'currentDefaultVersion', 
'selectedConfigGroup.isDefault'),
 
   serviceConfigs: function () {
 return App.config.get('preDefinedServiceConfigs');



ambari git commit: AMBARI-13473 Navigation between pages in installer too long. (atkach)

2015-10-19 Thread atkach
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 7d96c7e9e -> 291157741


AMBARI-13473 Navigation between pages in installer too long. (atkach)


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

Branch: refs/heads/branch-2.1
Commit: 291157741e8686889d5aff36a4c8a5cd7899950a
Parents: 7d96c7e
Author: Andrii Tkach 
Authored: Mon Oct 19 17:15:54 2015 +0300
Committer: Andrii Tkach 
Committed: Mon Oct 19 17:15:54 2015 +0300

--
 .../app/controllers/wizard/step7_controller.js | 17 +++--
 ambari-web/app/mappers/configs/themes_mapper.js|  2 ++
 .../app/utils/configs/config_property_helper.js|  9 +
 .../utils/configs/config_property_helper_test.js   |  8 
 4 files changed, 22 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/controllers/wizard/step7_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index f4c4a4e..d24d978 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -816,12 +816,25 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 });
 services.forEach(function (service) {
   var configsByService = [];
-  var serviceConfigs = configs.filterProperty('serviceName', 
service.get('serviceName'));
+  var dependencies = {};
+  var serviceConfigs = [];
+
+  configs.forEach(function (config) {
+if (config.serviceName === service.get('serviceName')) {
+  serviceConfigs.push(config);
+}
+if (config.filename === 'hive-site.xml' && config.name === 
'hive.metastore.uris') {
+  dependencies['hive.metastore.uris'] = config.recommendedValue;
+}
+if (config.filename === 'zoo.cfg.xml' && config.name === 'clientPort') 
{
+  dependencies['clientPort'] = config.recommendedValue;
+}
+  }, this);
   serviceConfigs.forEach(function (_config) {
 var serviceConfigProperty = App.ServiceConfigProperty.create(_config);
 this.updateHostOverrides(serviceConfigProperty, _config);
 if (!storedConfigs && !serviceConfigProperty.get('hasInitialValue')) {
-  configPropertyHelper.initialValue(serviceConfigProperty, localDB, 
configs);
+  configPropertyHelper.initialValue(serviceConfigProperty, localDB, 
dependencies);
 }
 serviceConfigProperty.validate();
 configsByService.pushObject(serviceConfigProperty);

http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/mappers/configs/themes_mapper.js
--
diff --git a/ambari-web/app/mappers/configs/themes_mapper.js 
b/ambari-web/app/mappers/configs/themes_mapper.js
index 2fc9641..fff2013 100644
--- a/ambari-web/app/mappers/configs/themes_mapper.js
+++ b/ambari-web/app/mappers/configs/themes_mapper.js
@@ -71,6 +71,7 @@ App.themesMapper = App.QuickDataMapper.create({
   },
 
   map: function (json) {
+console.time('App.themesMapper execution time');
 var tabs = [];
 json.items.forEach(function(item) {
   this.mapThemeLayouts(item, tabs);
@@ -80,6 +81,7 @@ App.themesMapper = App.QuickDataMapper.create({
 
 App.store.loadMany(this.get("tabModel"), tabs);
 App.store.commit();
+console.timeEnd('App.themesMapper execution time');
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/29115774/ambari-web/app/utils/configs/config_property_helper.js
--
diff --git a/ambari-web/app/utils/configs/config_property_helper.js 
b/ambari-web/app/utils/configs/config_property_helper.js
index 11f1d81..d3f0bd5 100644
--- a/ambari-web/app/utils/configs/config_property_helper.js
+++ b/ambari-web/app/utils/configs/config_property_helper.js
@@ -20,14 +20,7 @@ var App = require('app');
 
 module.exports = {
 
-  initialValue: function (configProperty, localDB, configs) {
-var hiveMetastoreUrisConfig = configs.filterProperty('filename', 
'hive-site.xml').findProperty('name', 'hive.metastore.uris');
-var clientPortConfig = configs.filterProperty('filename', 
'zoo.cfg.xml').findProperty('name', 'clientPort');
-var dependencies = {
-  'hive.metastore.uris': hiveMetastoreUrisConfig && 
hiveMetastoreUrisConfig.recommendedValue,
-  'clientPort': clientPortConfig && 

ambari git commit: AMBARI-13471 ZooKeeper "log4j.rootLogger" should have ROLLINGFILE instead of CONSOLE (dsen)

2015-10-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk fefa1c44d -> fe230132f


AMBARI-13471 ZooKeeper "log4j.rootLogger" should have ROLLINGFILE instead of 
CONSOLE (dsen)


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

Branch: refs/heads/trunk
Commit: fe230132f472d64b1cca39d365e958cc37fb150f
Parents: fefa1c4
Author: Dmytro Sen 
Authored: Mon Oct 19 19:05:22 2015 +0300
Committer: Dmytro Sen 
Committed: Mon Oct 19 19:05:22 2015 +0300

--
 .../server/upgrade/UpgradeCatalog213.java   | 42 +---
 .../ZOOKEEPER/configuration/zookeeper-log4j.xml |  4 +-
 .../server/upgrade/UpgradeCatalog213Test.java   | 50 ++--
 3 files changed, 72 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe230132/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
index ed536cc..a5a1b7a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
@@ -62,6 +62,8 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog 
{
   private static final String AMS_ENV = "ams-env";
   private static final String AMS_HBASE_ENV = "ams-hbase-env";
   private static final String HBASE_ENV_CONFIG = "hbase-env";
+  private static final String ZOOKEEPER_LOG4J_CONFIG = "zookeeper-log4j";
+  private static final String NIMBS_MONITOR_FREQ_SECS_PROPERTY = 
"nimbus.monitor.freq.secs";
   private static final String HADOOP_ENV_CONFIG = "hadoop-env";
   private static final String CONTENT_PROPERTY = "content";
   private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if 
is_datanode_max_locked_memory_set %}\n" +
@@ -174,6 +176,7 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 updateHbaseEnvConfig();
 updateHadoopEnv();
 updateKafkaConfigs();
+updateZookeeperLog4j();
   }
 
   /**
@@ -276,26 +279,31 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 }
   }
 
-  protected void updateStormConfigs() throws AmbariException {
+  protected void updateZookeeperLog4j() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
-Clusters clusters = ambariManagementController.getClusters();
 
-if (clusters != null) {
-  Map clusterMap = clusters.getClusters();
+for (final Cluster cluster : 
getCheckedClusterMap(ambariManagementController.getClusters()).values()) {
+  Config zookeeperLog4jConfig = 
cluster.getDesiredConfigByType(ZOOKEEPER_LOG4J_CONFIG);
+  if (zookeeperLog4jConfig != null) {
+String content = 
zookeeperLog4jConfig.getProperties().get(CONTENT_PROPERTY);
+if (content != null) {
+  content = 
content.replaceAll("[\n^]\\s*log4j\\.rootLogger\\s*=\\s*INFO\\s*,\\s*CONSOLE", 
"\nlog4j.rootLogger=INFO, ROLLINGFILE");
+  Map updates = 
Collections.singletonMap(CONTENT_PROPERTY, content);
+  updateConfigurationPropertiesForCluster(cluster, 
ZOOKEEPER_LOG4J_CONFIG, updates, true, false);
+}
+  }
+}
+  }
 
-  if ((clusterMap != null) && !clusterMap.isEmpty()) {
-// Iterate through the clusters and perform any configuration updates
-for (final Cluster cluster : clusterMap.values()) {
-  Config stormSiteProps = cluster.getDesiredConfigByType(STORM_SITE);
-
-  if (stormSiteProps != null) {
-String value = 
stormSiteProps.getProperties().get("nimbus.monitor.freq.secs");
-if (value != null && value.equals("10")) {
-  Map updates = new HashMap();
-  updates.put("nimbus.monitor.freq.secs", "120");
-  updateConfigurationPropertiesForCluster(cluster, STORM_SITE, 
updates, true, false);
-}
-  }
+  protected void updateStormConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+for (final Cluster cluster : 
getCheckedClusterMap(ambariManagementController.getClusters()).values()) {
+  Config stormSiteProps = cluster.getDesiredConfigByType(STORM_SITE);
+  if (stormSiteProps != null) {
+String 

ambari git commit: AMBARI-13471 ZooKeeper "log4j.rootLogger" should have ROLLINGFILE instead of CONSOLE (dsen)

2015-10-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 fa04433c2 -> 8fb899dbc


AMBARI-13471 ZooKeeper "log4j.rootLogger" should have ROLLINGFILE instead of 
CONSOLE (dsen)


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

Branch: refs/heads/branch-2.1
Commit: 8fb899dbcb063bb62846b5222f4f053153cda9f4
Parents: fa04433
Author: Dmytro Sen 
Authored: Mon Oct 19 19:06:58 2015 +0300
Committer: Dmytro Sen 
Committed: Mon Oct 19 19:06:58 2015 +0300

--
 .../server/upgrade/UpgradeCatalog213.java   | 46 ++
 .../ZOOKEEPER/configuration/zookeeper-log4j.xml |  4 +-
 .../server/upgrade/UpgradeCatalog213Test.java   | 51 ++--
 3 files changed, 75 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fb899db/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
index a94723f..0a5a66b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
@@ -83,7 +83,9 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog 
{
   private static final String AMS_ENV = "ams-env";
   private static final String AMS_HBASE_ENV = "ams-hbase-env";
   private static final String HBASE_ENV_CONFIG = "hbase-env";
+  private static final String ZOOKEEPER_LOG4J_CONFIG = "zookeeper-log4j";
   private static final String HADOOP_ENV_CONFIG = "hadoop-env";
+  private static final String NIMBS_MONITOR_FREQ_SECS_PROPERTY = 
"nimbus.monitor.freq.secs";
   private static final String CONTENT_PROPERTY = "content";
   private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if 
is_datanode_max_locked_memory_set %}\n" +
 "# Fix temporary bug, when ulimit from 
conf files is not picked up, without full relogin. \n" +
@@ -189,6 +191,7 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 updateHbaseEnvConfig();
 updateAlertDefinitions();
 updateKafkaConfigs();
+updateZookeeperLog4j();
   }
 
   /**
@@ -584,7 +587,23 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 
 return rootJson.toString();
   }
-  
+
+  protected void updateZookeeperLog4j() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+
+for (final Cluster cluster : 
getCheckedClusterMap(ambariManagementController.getClusters()).values()) {
+  Config zookeeperLog4jConfig = 
cluster.getDesiredConfigByType(ZOOKEEPER_LOG4J_CONFIG);
+  if (zookeeperLog4jConfig != null) {
+String content = 
zookeeperLog4jConfig.getProperties().get(CONTENT_PROPERTY);
+if (content != null) {
+  content = 
content.replaceAll("[\n^]\\s*log4j\\.rootLogger\\s*=\\s*INFO\\s*,\\s*CONSOLE", 
"\nlog4j.rootLogger=INFO, ROLLINGFILE");
+  Map updates = 
Collections.singletonMap(CONTENT_PROPERTY, content);
+  updateConfigurationPropertiesForCluster(cluster, 
ZOOKEEPER_LOG4J_CONFIG, updates, true, false);
+}
+  }
+}
+  }
+
   protected void updateHadoopEnv() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
 
@@ -618,24 +637,13 @@ public class UpgradeCatalog213 extends 
AbstractUpgradeCatalog {
 
   protected void updateStormConfigs() throws AmbariException {
 AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
-Clusters clusters = ambariManagementController.getClusters();
-
-if (clusters != null) {
-  Map clusterMap = clusters.getClusters();
-
-  if ((clusterMap != null) && !clusterMap.isEmpty()) {
-// Iterate through the clusters and perform any configuration updates
-for (final Cluster cluster : clusterMap.values()) {
-  Config stormSiteProps = cluster.getDesiredConfigByType(STORM_SITE);
-
-  if (stormSiteProps != null) {
-String value = 
stormSiteProps.getProperties().get("nimbus.monitor.freq.secs");
-if (value != null && value.equals("10")) {
-  Map updates = new HashMap();
-  

ambari git commit: AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar via srimanth)

2015-10-19 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1.2 79dc49ae0 -> f54752960


AMBARI-13343. Ambari Hive View should be able to talk HTTP to HS2 (Gaurav Nagar 
via srimanth)


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

Branch: refs/heads/branch-2.1.2
Commit: f54752960fef17920d2b53f4f2187821a9068ac8
Parents: 79dc49a
Author: Srimanth Gunturi 
Authored: Mon Oct 19 06:50:43 2015 -0700
Committer: Srimanth Gunturi 
Committed: Mon Oct 19 11:19:11 2015 -0700

--
 contrib/views/hive/pom.xml  |  12 +-
 .../ambari/view/hive/client/Connection.java | 262 ++-
 .../view/hive/client/ConnectionFactory.java |  11 +-
 .../hive/client/HttpBasicAuthInterceptor.java   |  55 
 .../client/HttpKerberosRequestInterceptor.java  |  72 +
 .../hive/client/HttpRequestInterceptorBase.java |  88 +++
 .../apache/ambari/view/hive/client/Utils.java   |  47 +++-
 contrib/views/hive/src/main/resources/view.xml  |  30 +++
 .../ambari/view/hive/client/ConnectionTest.java |   6 +-
 .../hive/resources/jobs/JobLDAPServiceTest.java |   5 +-
 10 files changed, 578 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5475296/contrib/views/hive/pom.xml
--
diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml
index 3a1cf6d..a78eea2 100644
--- a/contrib/views/hive/pom.xml
+++ b/contrib/views/hive/pom.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
 -->
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+http://www.w3.org/2001/XMLSchema-instance; 
xmlns="http://maven.apache.org/POM/4.0.0;
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
   4.0.0
   org.apache.ambari.contrib.views
@@ -199,6 +199,16 @@
   commons-io
   2.4
 
+
+  org.apache.httpcomponents
+  httpclient
+  4.5.1
+
+
+  org.apache.httpcomponents
+  httpcore
+  4.4.3
+
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5475296/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
index d93df24..0e42d99 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/client/Connection.java
@@ -27,16 +27,38 @@ import org.apache.hive.service.auth.KerberosSaslHelper;
 import org.apache.hive.service.auth.PlainSaslHelper;
 import org.apache.hive.service.auth.SaslQOP;
 import org.apache.hive.service.cli.thrift.*;
+import org.apache.http.HttpRequestInterceptor;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.CookieStore;
+import org.apache.http.client.ServiceUnavailableRetryStrategy;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.THttpClient;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
 import javax.security.sasl.Sasl;
 import javax.security.sasl.SaslException;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.security.KeyStore;
+import java.security.SecureRandom;
+import java.sql.SQLException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -81,12 +103,14 @@ public class Connection {
 
   public synchronized void openConnection() throws HiveClientException, 
HiveAuthRequiredException {
 

ambari git commit: AMBARI-13465. Customize Services opens the "Advanced" tab by default. Additional patch.

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk fe230132f -> fa26a59ef


AMBARI-13465. Customize Services opens the "Advanced" tab by default. 
Additional patch.


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

Branch: refs/heads/trunk
Commit: fa26a59eff334f94bc07861d7295649d5bfaf0c2
Parents: fe23013
Author: Alex Antonenko 
Authored: Mon Oct 19 19:20:40 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 19:20:40 2015 +0300

--
 ambari-web/app/views/common/configs/service_config_view.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa26a59e/ambari-web/app/views/common/configs/service_config_view.js
--
diff --git a/ambari-web/app/views/common/configs/service_config_view.js 
b/ambari-web/app/views/common/configs/service_config_view.js
index ad50998..0ef2112 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -162,6 +162,7 @@ App.ServiceConfigView = Em.View.extend({
 
   setActiveTab: function (event) {
 if (event.context.get('isHiddenByFilter')) return false;
+this.set('initalActiveTabIsSet', true);
 this.get('tabs').forEach(function (tab) {
   tab.set('isActive', false);
 });
@@ -197,7 +198,7 @@ App.ServiceConfigView = Em.View.extend({
 if (tabs.everyProperty('isConfigsPrepared', true) && 
!this.get('initalActiveTabIsSet')) {
   this.get('tabs').setEach('isActive', false);
   this.pickActiveTab(this.get('tabs'));
-  this.set('tabsWereSet', true);
+  this.set('initalActiveTabIsSet', true);
 }
   }.observes('tabs.@each.isConfigsPrepared'),
 



ambari git commit: AMBARI-13465. Customize Services opens the "Advanced" tab by default. Additional patch.

2015-10-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 8fb899dbc -> 792b81094


AMBARI-13465. Customize Services opens the "Advanced" tab by default. 
Additional patch.


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

Branch: refs/heads/branch-2.1
Commit: 792b810941e8a929985d1b6e83dbedaebb6bfd89
Parents: 8fb899d
Author: Alex Antonenko 
Authored: Mon Oct 19 19:20:40 2015 +0300
Committer: Alex Antonenko 
Committed: Mon Oct 19 19:26:14 2015 +0300

--
 ambari-web/app/views/common/configs/service_config_view.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/792b8109/ambari-web/app/views/common/configs/service_config_view.js
--
diff --git a/ambari-web/app/views/common/configs/service_config_view.js 
b/ambari-web/app/views/common/configs/service_config_view.js
index fc868fa..6d466ae 100644
--- a/ambari-web/app/views/common/configs/service_config_view.js
+++ b/ambari-web/app/views/common/configs/service_config_view.js
@@ -164,6 +164,7 @@ App.ServiceConfigView = Em.View.extend({
 
   setActiveTab: function (event) {
 if (event.context.get('isHiddenByFilter')) return false;
+this.set('initalActiveTabIsSet', true);
 this.get('tabs').forEach(function (tab) {
   tab.set('isActive', false);
 });
@@ -199,7 +200,7 @@ App.ServiceConfigView = Em.View.extend({
 if (tabs.everyProperty('isConfigsPrepared', true) && 
!this.get('initalActiveTabIsSet')) {
   this.get('tabs').setEach('isActive', false);
   this.pickActiveTab(this.get('tabs'));
-  this.set('tabsWereSet', true);
+  this.set('initalActiveTabIsSet', true);
 }
   }.observes('tabs.@each.isConfigsPrepared'),