git commit: AMBARI-6986. Upgrade to 1.7.0, ambari+mysql fails on version column.(vbrodetskyi)

2014-08-26 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk a80066ae0 - 160abc549


AMBARI-6986. Upgrade to 1.7.0, ambari+mysql fails on version 
column.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 160abc549c03cae1f34511582bc8a1cda467157b
Parents: a80066a
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Tue Aug 26 13:49:22 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Tue Aug 26 13:49:22 2014 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/160abc54/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index eeba932..30059ac 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -437,7 +437,7 @@ public class UpgradeCatalog170 extends 
AbstractUpgradeCatalog {
   private void renameSequenceValueColumnName() throws AmbariException, 
SQLException {
 final String dbType = getDbType();
 if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
-  dbAccessor.executeQuery(ALTER TABLE ambari_sequences RENAME COLUMN 
\value\ to sequence_value DECIMAL(38) NOT NULL);
+  dbAccessor.executeQuery(ALTER TABLE ambari_sequences RENAME COLUMN 
value to sequence_value DECIMAL(38) NOT NULL);
 } else if (Configuration.DERBY_DB_NAME.equals(dbType)) {
   dbAccessor.executeQuery(RENAME COLUMN ambari_sequences.\value\ to 
sequence_value);
 } else if (Configuration.ORACLE_DB_NAME.equals(dbType)) {



git commit: AMBARI-7012. HDP-artifacts tmp directory should not be used at all (aonishuk)

2014-08-26 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 8bed25926 - 909407812


AMBARI-7012. HDP-artifacts tmp directory should not be used at all (aonishuk)


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

Branch: refs/heads/trunk
Commit: 90940781212fbc8c87149bcad99d9292886d8d10
Parents: 8bed259
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Aug 26 15:34:16 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Aug 26 15:34:16 2014 +0300

--
 .../main/resources/custom_actions/check_host.py |  7 +++--
 .../1.3.2/hooks/before-ANY/scripts/params.py|  3 +-
 .../hooks/before-INSTALL/scripts/params.py  |  2 +-
 .../services/HIVE/package/scripts/params.py |  2 +-
 .../2.0.6/hooks/before-ANY/scripts/params.py|  3 +-
 .../hooks/before-INSTALL/scripts/params.py  |  2 +-
 .../services/HIVE/package/scripts/params.py |  2 +-
 ambari-server/src/test/python/TestCheckHost.py  | 29 
 .../stacks/1.3.2/HIVE/test_hive_metastore.py|  4 +--
 .../stacks/1.3.2/HIVE/test_hive_server.py   |  4 +--
 .../1.3.2/hooks/before-ANY/test_before_any.py   |  6 ++--
 .../hooks/before-INSTALL/test_before_install.py |  4 +--
 .../stacks/2.0.6/HIVE/test_hive_metastore.py|  4 +--
 .../stacks/2.0.6/HIVE/test_hive_server.py   |  4 +--
 .../2.0.6/hooks/before-ANY/test_before_any.py   |  6 ++--
 .../hooks/before-INSTALL/test_before_install.py |  4 +--
 .../stacks/2.1/HIVE/test_hive_metastore.py  |  4 +--
 17 files changed, 50 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/90940781/ambari-server/src/main/resources/custom_actions/check_host.py
--
diff --git a/ambari-server/src/main/resources/custom_actions/check_host.py 
b/ambari-server/src/main/resources/custom_actions/check_host.py
index 3543f96..8e9b222 100644
--- a/ambari-server/src/main/resources/custom_actions/check_host.py
+++ b/ambari-server/src/main/resources/custom_actions/check_host.py
@@ -46,6 +46,7 @@ JDBC_DRIVER_SYMLINK_POSTGRESQL = postgres-jdbc-driver.jar
 class CheckHost(Script):
   def actionexecute(self, env):
 config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
 
 #print CONFIG:  + str(config)
 
@@ -64,7 +65,7 @@ class CheckHost(Script):
 
 if CHECK_DB_CONNECTION in check_execute_list:
   try :
-db_connection_check_structured_output = 
self.execute_db_connection_check(config)
+db_connection_check_structured_output = 
self.execute_db_connection_check(config, tmp_dir)
 structured_output[CHECK_DB_CONNECTION] = 
db_connection_check_structured_output
   except Exception, exception:
 print There was an unknown error while checking database 
connectivity:  + str(exception)
@@ -97,7 +98,7 @@ class CheckHost(Script):
 return java_home_check_structured_output
 
 
-  def execute_db_connection_check(self, config):
+  def execute_db_connection_check(self, config, tmp_dir):
 print DB connection check started.
   
 # initialize needed data
@@ -135,7 +136,7 @@ class CheckHost(Script):
   return db_connection_check_structured_output
 
 environment = { no_proxy: format({ambari_server_hostname}) }
-artifact_dir = /tmp/HDP-artifacts/
+artifact_dir = format({tmp_dir}/AMBARI-artifacts/)
 java_dir = os.path.dirname(java64_home)
 
 # download and install java if it doesn't exists

http://git-wip-us.apache.org/repos/asf/ambari/blob/90940781/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-ANY/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-ANY/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-ANY/scripts/params.py
index c7b01d6..0c6a415 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-ANY/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-ANY/scripts/params.py
@@ -20,11 +20,12 @@ limitations under the License.
 from resource_management import *
 
 config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
 
 _authentication = 
config['configurations']['core-site']['hadoop.security.authentication']
 security_enabled = ( not is_empty(_authentication) and _authentication == 
'kerberos')
 
-artifact_dir = /tmp/HDP-artifacts/
+artifact_dir = format({tmp_dir}/AMBARI-artifacts/)
 jce_policy_zip = default(/hostLevelParams/jce_name, None) # None when jdk is 
already installed by user
 jce_location = 

git commit: AMBARI-7013. Fix UI Unit tests. (onechiporenko)

2014-08-26 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 909407812 - 574461df0


AMBARI-7013. Fix UI Unit tests. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 574461df0847b83967ec64c429387fb4859eecd0
Parents: 9094078
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Aug 26 16:25:07 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Aug 26 16:25:07 2014 +0300

--
 ambari-web/test/app_test.js | 52 
 .../dashboard/config_history_controller_test.js | 25 +++---
 ambari-web/test/utils/date_test.js  |  4 +-
 .../common/configs/config_history_flow_test.js  |  6 +--
 4 files changed, 23 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/574461df/ambari-web/test/app_test.js
--
diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js
index c16d5f0..85b50ee 100644
--- a/ambari-web/test/app_test.js
+++ b/ambari-web/test/app_test.js
@@ -81,58 +81,6 @@ describe('App', function () {
 });
   });
 
-  describe('#stack2VersionURL', function () {
-
-var testCases = [
-  {
-title: 'if currentStackVersion and defaultStackVersion are empty then 
stack2VersionURL should contain prefix',
-currentStackVersion: '',
-defaultStackVersion: '',
-result: '/stacks2/HDP/versions/'
-  },
-  {
-title: 'if currentStackVersion is HDP-1.3.1 then stack2VersionURL 
should be /stacks2/HDP/versions/1.3.1',
-currentStackVersion: 'HDP-1.3.1',
-defaultStackVersion: '',
-result: '/stacks2/HDP/versions/1.3.1'
-  },
-  {
-title: 'if defaultStackVersion is HDP-1.3.1 then stack2VersionURL 
should be /stacks/HDP/versions/1.3.1',
-currentStackVersion: '',
-defaultStackVersion: 'HDP-1.3.1',
-result: '/stacks2/HDP/versions/1.3.1'
-  },
-  {
-title: 'if defaultStackVersion and currentStackVersion are different 
then stack2VersionURL should have currentStackVersion value',
-currentStackVersion: 'HDP-1.3.2',
-defaultStackVersion: 'HDP-1.3.1',
-result: '/stacks2/HDP/versions/1.3.2'
-  },
-  {
-title: 'if defaultStackVersion is HDPLocal-1.3.1 then 
stack2VersionURL should be /stacks2/HDPLocal/versions/1.3.1',
-currentStackVersion: '',
-defaultStackVersion: 'HDPLocal-1.3.1',
-result: '/stacks2/HDPLocal/versions/1.3.1'
-  },
-  {
-title: 'if currentStackVersion is HDPLocal-1.3.1 then 
stack2VersionURL should be /stacks2/HDPLocal/versions/1.3.1',
-currentStackVersion: 'HDPLocal-1.3.1',
-defaultStackVersion: '',
-result: '/stacks2/HDPLocal/versions/1.3.1'
-  }
-];
-
-testCases.forEach(function (test) {
-  it(test.title, function () {
-App.set('currentStackVersion', test.currentStackVersion);
-App.set('defaultStackVersion', test.defaultStackVersion);
-expect(App.get('stack2VersionURL')).to.equal(test.result);
-App.set('currentStackVersion', HDP-1.2.2);
-App.set('defaultStackVersion', HDP-1.2.2);
-  });
-});
-  });
-
   describe('#falconServerURL', function () {
 
 var testCases = [

http://git-wip-us.apache.org/repos/asf/ambari/blob/574461df/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js 
b/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js
index 257e012..0692b9e 100644
--- 
a/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js
+++ 
b/ambari-web/test/controllers/main/dashboard/config_history_controller_test.js
@@ -28,11 +28,11 @@ describe('MainConfigHistoryController', function () {
   describe('#realUrl', function () {
 it('cluster name is empty', function () {
   App.set('clusterName', '');
-  
expect(controller.get('realUrl')).to.equal('/api/v1/clusters//configurations/serviceconfigversions?parametersfields=serviceconfigversion,user,appliedtime,createtime,service_name,service_config_version_noteminimal_response=true');
+  
expect(controller.get('realUrl')).to.equal('/api/v1/clusters//configurations/serviceconfigversions?parametersfields=serviceconfigversion,user,group_id,group_name,createtime,service_name,service_config_version_noteminimal_response=true');
 });
 it('cluster name is 

git commit: AMBARI-6987. Ambari upgrade. resource managemnt need refactoring in install-helper.py.-remove(vbrodetskyi)

2014-08-26 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 574461df0 - 40f1c4e8f


AMBARI-6987. Ambari upgrade. resource managemnt need refactoring in 
install-helper.py.-remove(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 40f1c4e8f35bc718681d28a93ea021a412070206
Parents: 574461d
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Tue Aug 26 16:39:55 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Tue Aug 26 16:40:14 2014 +0300

--
 ambari-agent/conf/unix/install-helper.sh  | 7 ---
 ambari-server/conf/unix/install-helper.sh | 3 ---
 2 files changed, 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/40f1c4e8/ambari-agent/conf/unix/install-helper.sh
--
diff --git a/ambari-agent/conf/unix/install-helper.sh 
b/ambari-agent/conf/unix/install-helper.sh
index 497db8d..0be3d2d 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -51,13 +51,6 @@ do_install(){
 }
 
 do_remove(){
-  if [ -d $COMMON_DIR ]; then  # common dir exists
-rm -f $COMMON_DIR
-  fi
-
-  if [ -d $RESOURCE_MANAGEMENT_DIR ]; then  # resource_management dir exists
-rm -f $RESOURCE_MANAGEMENT_DIR
-  fi
 
   if [ -f $PYTHON_WRAPER_TARGET ]; then
 rm -f $PYTHON_WRAPER_TARGET

http://git-wip-us.apache.org/repos/asf/ambari/blob/40f1c4e8/ambari-server/conf/unix/install-helper.sh
--
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 30946a5..751bcd0 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -51,9 +51,6 @@ do_install(){
 
 do_remove(){
 
-  rm -rf $COMMON_DIR
-  rm -rf $RESOURCE_MANAGEMENT_DIR
-
   if [ -f $PYTHON_WRAPER_TARGET ]; then
 rm -f $PYTHON_WRAPER_TARGET
   fi



git commit: AMBARI-7014 FE: Add service wizard not sending configs of added service for validations

2014-08-26 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 40f1c4e8f - db83ea24c


AMBARI-7014 FE: Add service wizard not sending configs of added service for 
validations


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

Branch: refs/heads/trunk
Commit: db83ea24ce47d84895c699137c6c2a9ade2f3577
Parents: 40f1c4e
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Tue Aug 26 16:49:06 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Tue Aug 26 16:49:06 2014 +0300

--
 ambari-web/app/mixins/common/serverValidator.js | 2 +-
 ambari-web/app/models/stack_service.js  | 3 ---
 ambari-web/app/utils/config.js  | 2 +-
 ambari-web/test/utils/blueprint_test.js | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/app/mixins/common/serverValidator.js
--
diff --git a/ambari-web/app/mixins/common/serverValidator.js 
b/ambari-web/app/mixins/common/serverValidator.js
index 5140224..462ff62 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -78,7 +78,7 @@ App.ServerValidatorMixin = Em.Mixin.create({
 return this.get('content.serviceName')
 ? [App.StackService.find(this.get('content.serviceName'))]
 : App.StackService.find().filter(function(s){
-  return s.get('allowServerValidator')  (s.get('isSelected') || 
s.get('isInsalled'))
+  return (s.get('isSelected') || s.get('isInstalled'))
 }).concat(require(data/service_configs));
   }.property('content.serviceName'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/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 744083b..e19e27f 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -171,9 +171,6 @@ App.StackService = DS.Model.extend(App.ServiceModelMixin, {
 return defaultConfigsHandler  defaultConfigsHandler.configsValidator;
   }.property('serviceName'),
 
-  allowServerValidator: function() {
-return [YARN, STORM, MAPREDUCE2, HIVE, 
TEZ].contains(this.get('serviceName'));
-  }.property('serviceName'),
   /**
* configCategories are fetched from  App.StackService.configCategories.
* Also configCategories that does not match any serviceComponent of a 
service and not included in the permissible default pattern are omitted

http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 62db148..03bd079 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -691,7 +691,7 @@ App.config = Em.Object.create({
   // Use calculated default values for some configs
   var recommendedDefaults = {};
   if (App.get('supports.serverRecommendValidate')) {
-if (!storedConfigs  service.get('configTypes')  
service.get('allowServerValidator')) {
+if (!storedConfigs  service.get('configTypes')) {
   Object.keys(service.get('configTypes')).forEach(function (type) {
 if (!recommended || !recommended[type]) {
   return;

http://git-wip-us.apache.org/repos/asf/ambari/blob/db83ea24/ambari-web/test/utils/blueprint_test.js
--
diff --git a/ambari-web/test/utils/blueprint_test.js 
b/ambari-web/test/utils/blueprint_test.js
index 1f8d803..d615896 100644
--- a/ambari-web/test/utils/blueprint_test.js
+++ b/ambari-web/test/utils/blueprint_test.js
@@ -287,7 +287,6 @@ describe('utils/blueprint', function() {
   yarn-site: {},
   yarn-env: {}
 },
-allowServerValidator: true,
 isInstalled: true
   })
 ],



[2/2] git commit: AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster (dlysnichenko)

2014-08-26 Thread dmitriusan
AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster 
(dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 9faeaf5a525bfee0932c1a654b28651c0b1705dd
Parents: db83ea2
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Tue Aug 26 15:02:41 2014 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Tue Aug 26 17:24:48 2014 +0300

--
 .../server/actionmanager/ActionScheduler.java   |  33 +
 .../ambari/server/actionmanager/Stage.java  |  32 -
 .../server/actionmanager/StageFactory.java  |   4 +-
 .../ambari/server/agent/ExecutionCommand.java   |   2 +-
 .../controller/AmbariActionExecutionHelper.java |   9 +-
 .../AmbariCustomCommandExecutionHelper.java |  34 ++---
 .../AmbariManagementControllerImpl.java | 128 ++-
 .../ambari/server/orm/entities/StageEntity.java |  28 
 .../ambari/server/stageplanner/RoleGraph.java   |   3 +-
 .../server/upgrade/UpgradeCatalog170.java   |   7 +-
 .../apache/ambari/server/utils/StageUtils.java  |  57 +
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   2 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |   2 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql|   2 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql |   2 +-
 .../ExecutionCommandWrapperTest.java|   2 +-
 .../actionmanager/TestActionDBAccessorImpl.java |  20 +--
 .../server/actionmanager/TestActionManager.java |  31 +++--
 .../actionmanager/TestActionScheduler.java  |  33 +++--
 .../ambari/server/actionmanager/TestStage.java  |   4 +-
 .../server/agent/TestHeartbeatHandler.java  |  15 ++-
 .../AmbariManagementControllerTest.java |  84 
 .../server/stageplanner/TestStagePlanner.java   |   6 +-
 .../server/upgrade/UpgradeCatalog170Test.java   |  30 +
 .../ambari/server/utils/TestStageUtils.java |  13 +-
 .../app/controllers/wizard/step3_controller.js  |   1 -
 26 files changed, 381 insertions(+), 203 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index b9a67b7..0385686 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -121,6 +121,8 @@ class ActionScheduler implements Runnable {
   private boolean activeAwakeRequest = false;
   //Cache for clusterHostinfo, key - stageId-requestId
   private CacheString, MapString, SetString clusterHostInfoCache;
+  private CacheString, MapString, String commandParamsStageCache;
+  private CacheString, MapString, String hostParamsStageCache;
 
   public ActionScheduler(long sleepTimeMilliSec, long actionTimeoutMilliSec,
   ActionDBAccessor db, ActionQueue actionQueue, Clusters fsmObject,
@@ -138,6 +140,12 @@ class ActionScheduler implements Runnable {
 this.clusterHostInfoCache = CacheBuilder.newBuilder().
 expireAfterAccess(5, TimeUnit.MINUTES).
 build();
+this.commandParamsStageCache = CacheBuilder.newBuilder().
+  expireAfterAccess(5, TimeUnit.MINUTES).
+  build();
+this.hostParamsStageCache = CacheBuilder.newBuilder().
+  expireAfterAccess(5, TimeUnit.MINUTES).
+  build();
 this.configuration = configuration;
   }
 
@@ -748,6 +756,31 @@ class ActionScheduler implements Runnable {
 }
 
 cmd.setClusterHostInfo(clusterHostInfo);
+ 
+//Try to get commandParams from cache and merge them with command-level 
parameters
+MapString, String commandParams = 
commandParamsStageCache.getIfPresent(stagePk);
+
+if (commandParams == null){
+  Type type = new TypeTokenMapString, String() {}.getType();
+  commandParams = StageUtils.getGson().fromJson(s.getCommandParamsStage(), 
type);
+  commandParamsStageCache.put(stagePk, commandParams);
+}
+MapString, String commandParamsCmd = cmd.getCommandParams();
+commandParamsCmd.putAll(commandParams);
+cmd.setCommandParams(commandParamsCmd);
+
+
+//Try to get hostParams from cache and merge them with command-level 
parameters
+MapString, String hostParams = 
hostParamsStageCache.getIfPresent(stagePk);
+if (hostParams == null) {
+  Type type = new TypeTokenMapString, 

[1/2] AMBARI-6061. OutOfMemoryError during host checks on 2k nodes cluster (dlysnichenko)

2014-08-26 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk db83ea24c - 9faeaf5a5


http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
index 13cb231..1cfba46 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java
@@ -134,6 +134,8 @@ public class UpgradeCatalog170Test {
 CaptureDBAccessor.DBColumnInfo clusterConfigAttributesColumnCapture = 
new CaptureDBAccessor.DBColumnInfo();
 CaptureDBAccessor.DBColumnInfo maskColumnCapture = new 
CaptureDBAccessor.DBColumnInfo();
 CaptureDBAccessor.DBColumnInfo maskedColumnCapture = new 
CaptureDBAccessor.DBColumnInfo();
+CaptureDBAccessor.DBColumnInfo stageCommandParamsColumnCapture = new 
CaptureDBAccessor.DBColumnInfo();
+CaptureDBAccessor.DBColumnInfo stageHostParamsColumnCapture = new 
CaptureDBAccessor.DBColumnInfo();
 CaptureListDBAccessor.DBColumnInfo alertDefinitionColumnCapture = new 
CaptureListDBAccessor.DBColumnInfo();
 CaptureListDBAccessor.DBColumnInfo alertHistoryColumnCapture = new 
CaptureListDBAccessor.DBColumnInfo();
 CaptureListDBAccessor.DBColumnInfo alertCurrentColumnCapture = new 
CaptureListDBAccessor.DBColumnInfo();
@@ -148,6 +150,7 @@ public class UpgradeCatalog170Test {
 setViewExpectations(dbAccessor, maskColumnCapture);
 setViewParameterExpectations(dbAccessor, maskedColumnCapture);
 setClusterConfigExpectations(dbAccessor, 
clusterConfigAttributesColumnCapture);
+setStageExpectations(dbAccessor, stageCommandParamsColumnCapture, 
stageHostParamsColumnCapture);
 
 dbAccessor.createTable(eq(alert_definition),
 capture(alertDefinitionColumnCapture), eq(definition_id));
@@ -200,6 +203,7 @@ public class UpgradeCatalog170Test {
 assertClusterConfigColumns(clusterConfigAttributesColumnCapture);
 assertViewColumns(maskColumnCapture);
 assertViewParameterColumns(maskedColumnCapture);
+assertStageColumns(stageCommandParamsColumnCapture, 
stageHostParamsColumnCapture);
 
 assertEquals(12, alertDefinitionColumnCapture.getValue().size());
 assertEquals(11, alertHistoryColumnCapture.getValue().size());
@@ -424,6 +428,17 @@ public class UpgradeCatalog170Test {
 dbAccessor.addColumn(eq(clusterconfig),
 capture(clusterConfigAttributesColumnCapture));
   }
+ 
+  private void setStageExpectations(DBAccessor dbAccessor,
+CaptureDBAccessor.DBColumnInfo 
stageCommandParamsColumnCapture,
+CaptureDBAccessor.DBColumnInfo 
stageHostParamsColumnCapture)
+throws SQLException {
+dbAccessor.addColumn(eq(stage),
+  capture(stageCommandParamsColumnCapture));
+
+dbAccessor.addColumn(eq(stage),
+  capture(stageHostParamsColumnCapture));
+  }
 
   @Test
   public void testGetSourceVersion() {
@@ -465,4 +480,19 @@ public class UpgradeCatalog170Test {
 assertNull(column.getDefaultValue());
 assertTrue(column.isNullable());
   }
+
+  private void assertStageColumns(CaptureDBAccessor.DBColumnInfo 
stageCommandParamsColumnCapture,
+  CaptureDBAccessor.DBColumnInfo 
stageHostParamsColumnCapture) {
+DBAccessor.DBColumnInfo column = 
stageCommandParamsColumnCapture.getValue();
+assertEquals(command_params, column.getName());
+assertEquals(byte[].class, column.getType());
+assertEquals(null, column.getDefaultValue());
+assertTrue(column.isNullable());
+
+column = stageHostParamsColumnCapture.getValue();
+assertEquals(host_params, column.getName());
+assertEquals(byte[].class, column.getType());
+assertEquals(null, column.getDefaultValue());
+assertTrue(column.isNullable());
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/9faeaf5a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java
index 6e587f1..988c67b 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java
@@ -20,6 +20,8 @@ package org.apache.ambari.server.utils;
 import static org.easymock.EasyMock.expect;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.powermock.api.easymock.PowerMock.mockStaticPartial;
+import 

git commit: AMBARI-6010. No such service ambari-agent when trying to use service cmd on agent on SUSE (dlysnichenko)

2014-08-26 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk e984e9b84 - fb9d884be


AMBARI-6010. No such service ambari-agent when trying to use service cmd on 
agent on SUSE (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: fb9d884be4ea4257831d591cd0e4f19c87321e69
Parents: e984e9b
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Tue Aug 26 21:26:28 2014 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Tue Aug 26 21:26:28 2014 +0300

--
 ambari-agent/pom.xml | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb9d884b/ambari-agent/pom.xml
--
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index ebf30fa..a487aa7 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -49,6 +49,7 @@
 ambari.server.module../ambari-server/ambari.server.module
 target.cache.dir${project.build.directory}/cache//target.cache.dir
 
resource.keeper.script${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py/resource.keeper.script
+init.d.dir/etc/rc.d/init.d/init.d.dir
   /properties
   build
 plugins
@@ -349,7 +350,7 @@
   groupnameroot/groupname
 /mapping
 mapping
-  directory/etc/rc.d/init.d/directory
+  directory${init.d.dir}/directory
   filemode755/filemode
   usernameroot/username
   groupnameroot/groupname
@@ -666,4 +667,12 @@
   /extension
 /extensions
   /build
+  profiles
+profile
+  idsuse11/id
+  properties
+init.d.dir/etc/init.d/init.d.dir
+  /properties
+/profile
+  /profiles
 /project



[2/2] git commit: AMBARI-7018. Stack API should provide display name for services and components. (jaimin)

2014-08-26 Thread jaimin
AMBARI-7018. Stack API should provide display name for services and components. 
(jaimin)


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

Branch: refs/heads/trunk
Commit: 02ee3d440596c3e159985830ede4f6fe358a576b
Parents: fb9d884
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Tue Aug 26 12:40:41 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Tue Aug 26 12:40:53 2014 -0700

--
 .../server/api/util/StackExtensionHelper.java   |  9 +++
 .../StackServiceComponentResponse.java  | 33 +--
 .../server/controller/StackServiceResponse.java | 16 -
 .../StackServiceComponentResourceProvider.java  | 22 +++
 .../internal/StackServiceResourceProvider.java  | 22 +++
 .../ambari/server/state/ComponentInfo.java  | 14 -
 .../apache/ambari/server/state/ServiceInfo.java |  9 +++
 .../src/main/resources/properties.json  |  2 +
 .../HDP/1.3.2/services/GANGLIA/metainfo.xml |  3 +
 .../HDP/1.3.2/services/HBASE/metainfo.xml   |  4 ++
 .../stacks/HDP/1.3.2/services/HDFS/metainfo.xml |  5 ++
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 11 +++-
 .../HDP/1.3.2/services/MAPREDUCE/metainfo.xml   |  5 ++
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml  |  2 +
 .../HDP/1.3.2/services/OOZIE/metainfo.xml   |  3 +
 .../stacks/HDP/1.3.2/services/PIG/metainfo.xml  |  2 +
 .../HDP/1.3.2/services/SQOOP/metainfo.xml   |  2 +
 .../HDP/1.3.2/services/WEBHCAT/metainfo.xml |  4 +-
 .../HDP/1.3.2/services/ZOOKEEPER/metainfo.xml   |  3 +
 .../HDP/2.0.6/services/FLUME/metainfo.xml   |  2 +
 .../HDP/2.0.6/services/GANGLIA/metainfo.xml |  3 +
 .../HDP/2.0.6/services/HBASE/metainfo.xml   |  4 ++
 .../stacks/HDP/2.0.6/services/HDFS/metainfo.xml |  7 +++
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 11 +++-
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml  |  2 +
 .../HDP/2.0.6/services/OOZIE/metainfo.xml   |  3 +
 .../stacks/HDP/2.0.6/services/PIG/metainfo.xml  |  2 +
 .../HDP/2.0.6/services/SQOOP/metainfo.xml   |  2 +
 .../HDP/2.0.6/services/WEBHCAT/metainfo.xml |  4 +-
 .../stacks/HDP/2.0.6/services/YARN/metainfo.xml |  7 +++
 .../HDP/2.0.6/services/ZOOKEEPER/metainfo.xml   |  2 +
 .../stacks/HDP/2.1/services/FALCON/metainfo.xml |  3 +
 .../stacks/HDP/2.1/services/STORM/metainfo.xml  |  6 ++
 .../stacks/HDP/2.1/services/TEZ/metainfo.xml|  2 +
 .../stacks/HDP/2.1/services/YARN/metainfo.xml   |  2 +
 .../api/util/StackExtensionHelperTest.java  |  2 +
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml  |  2 +
 .../HDP/2.0.6/services/WEBHCAT/metainfo.xml |  1 +
 .../stacks/HDP/2.0.6/services/YARN/metainfo.xml |  4 ++
 .../HDP/2.0.7/services/HBASE/metainfo.xml   |  4 ++
 .../stacks/HDP/2.0.7/services/HDFS/metainfo.xml |  7 +++
 .../stacks/HDP/2.0.7/services/HIVE/metainfo.xml |  5 ++
 .../HDP/2.0.7/services/ZOOKEEPER/metainfo.xml   |  3 +
 .../HDP/2.0.8/services/SQOOP/metainfo.xml   |  1 +
 .../HDP/2.1.1/services/STORM/metainfo.xml   |  4 ++
 ambari-web/app/mappers/stack_service_mapper.js  |  2 +
 ambari-web/app/mixins.js|  1 -
 ambari-web/app/mixins/models/service_mixin.js   | 30 --
 ambari-web/app/models/service.js|  7 ++-
 ambari-web/app/models/stack_service.js  |  5 +-
 .../app/models/stack_service_component.js   | 10 +---
 ambari-web/app/utils/helper.js  | 15 -
 ambari-web/test/app_test.js |  2 +-
 ambari-web/test/service_components.js   | 61 
 54 files changed, 312 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02ee3d44/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index c39b2ec..fb3ddc9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -138,6 +138,10 @@ public class StackExtensionHelper {
 mergedServiceInfo.setName(childService.getName());
 mergedServiceInfo.setComment(childService.getComment());
 mergedServiceInfo.setVersion(childService.getVersion());
+mergedServiceInfo.setDisplayName(
+childService.getDisplayName() != null ?
+childService.getDisplayName() :
+parentService.getDisplayName());
 

[1/2] AMBARI-7018. Stack API should provide display name for services and components. (jaimin)

2014-08-26 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk fb9d884be - 02ee3d440


http://git-wip-us.apache.org/repos/asf/ambari/blob/02ee3d44/ambari-web/test/service_components.js
--
diff --git a/ambari-web/test/service_components.js 
b/ambari-web/test/service_components.js
index fe7feca..8b89ab3 100644
--- a/ambari-web/test/service_components.js
+++ b/ambari-web/test/service_components.js
@@ -22,6 +22,7 @@ module.exports = {
   StackServices : {
 comments : Apache Hadoop Distributed Processing Framework,
 service_name : MAPREDUCE,
+display_name : MapReduce,
 service_version : 1.2.0.1.3.3.0,
 stack_name : HDP,
 stack_version : 1.3.2
@@ -31,6 +32,7 @@ module.exports = {
   StackServiceComponents : {
 component_category : MASTER,
 component_name : HISTORYSERVER,
+display_name : History Server,
 is_client : false,
 is_master : true,
 service_name : MAPREDUCE,
@@ -43,6 +45,7 @@ module.exports = {
   StackServiceComponents : {
 component_category : MASTER,
 component_name : JOBTRACKER,
+display_name : JobTracker,
 is_client : false,
 is_master : true,
 service_name : MAPREDUCE,
@@ -55,6 +58,7 @@ module.exports = {
   StackServiceComponents : {
 component_category : CLIENT,
 component_name : MAPREDUCE_CLIENT,
+display_name : MapReduce Client,
 is_client : true,
 is_master : false,
 service_name : MAPREDUCE,
@@ -67,6 +71,7 @@ module.exports = {
   StackServiceComponents : {
 component_category : SLAVE,
 component_name : TASKTRACKER,
+display_name : TaskTracker,
 is_client : false,
 is_master : false,
 service_name : MAPREDUCE,
@@ -84,6 +89,7 @@ module.exports = {
 custom_commands : [ ],
 service_check_supported : true,
 service_name : FALCON,
+display_name : Falcon,
 service_version : 0.5.0.2.1,
 stack_name : HDP,
 stack_version : 2.1,
@@ -118,6 +124,7 @@ module.exports = {
 cardinality : 1+,
 component_category : CLIENT,
 component_name : FALCON_CLIENT,
+display_name : Falcon Client,
 custom_commands : [ ],
 is_client : true,
 is_master : false,
@@ -133,6 +140,7 @@ module.exports = {
 cardinality : 1,
 component_category : MASTER,
 component_name : FALCON_SERVER,
+display_name : Falcon Server,
 custom_commands : [ ],
 is_client : false,
 is_master : true,
@@ -172,6 +180,7 @@ module.exports = {
 custom_commands : [ ],
 service_check_supported : true,
 service_name : FLUME,
+display_name : Flume,
 service_version : 1.4.0.2.1.1.0,
 stack_name : HDP,
 stack_version : 2.1,
@@ -201,6 +210,7 @@ module.exports = {
 cardinality : 0+,
 component_category : SLAVE,
 component_name : FLUME_HANDLER,
+display_name : Flume,
 custom_commands : [ ],
 is_client : false,
 is_master : false,
@@ -219,6 +229,7 @@ module.exports = {
 custom_commands : [ ],
 service_check_supported : false,
 service_name : GANGLIA,
+display_name : Ganglia,
 service_version : 3.5.0,
 stack_name : HDP,
 stack_version : 2.1,
@@ -238,6 +249,7 @@ module.exports = {
 cardinality : ALL,
 component_category : SLAVE,
 component_name : GANGLIA_MONITOR,
+display_name : Ganglia Monitor,
 custom_commands : [ ],
 is_client : false,
 is_master : false,
@@ -256,6 +268,7 @@ module.exports = {
 cardinality : 1,
 component_category : MASTER,
 component_name : GANGLIA_SERVER,
+display_name : Ganglia Server,
 custom_commands : [ ],
 is_client : false,
 is_master : true,
@@ -274,6 +287,7 @@ module.exports = {
 custom_commands : [ ],
 service_check_supported : true,
 service_name : HBASE,
+display_name : HBase,
 service_version : 0.98.0.2.1,
 stack_name : HDP,
 stack_version : 2.1,
@@ -308,6 +322,7 @@ module.exports = {
 cardinality : 1+,
 component_category : CLIENT,
 component_name : HBASE_CLIENT,
+display_name : HBase Client,
 custom_commands : [ ],
 is_client : true,
 is_master : false,
@@ -323,6 +338,7 @@ module.exports = {
 cardinality : 1+,
 component_category : MASTER,
 component_name : 

git commit: AMBARI-7025. Config Groups: clean up for config history page (group name filter .etc)(xiwang)

2014-08-26 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk f8193e941 - 1ab3bb551


AMBARI-7025. Config Groups: clean up for config history page (group name filter 
.etc)(xiwang)


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

Branch: refs/heads/trunk
Commit: 1ab3bb551d3e122fe1a771b98aaffe0e52434f40
Parents: f8193e9
Author: Xi Wang xiw...@apache.org
Authored: Tue Aug 26 15:17:56 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Tue Aug 26 16:24:39 2014 -0700

--
 .../main/dashboard/config_history_controller.js |  2 +-
 ambari-web/app/messages.js  |  1 +
 .../templates/common/configs/config_history_flow.hbs|  2 +-
 .../app/templates/main/dashboard/config_history.hbs |  5 +++--
 .../app/views/main/dashboard/config_history_view.js | 12 +++-
 5 files changed, 13 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/controllers/main/dashboard/config_history_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/dashboard/config_history_controller.js 
b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
index 2a81c28..002504a 100644
--- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js
+++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
@@ -41,7 +41,7 @@ App.MainConfigHistoryController = 
Em.ArrayController.extend(App.TableServerMixin
   colPropAssoc: function () {
 var associations = [];
 associations[1] = 'serviceVersion';
-associations[2] = 'configGroupName';
+associations[2] = 'configGroup';
 associations[3] = 'createTime';
 associations[4] = 'author';
 associations[5] = 'briefNotes';

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a02b729..31d3e69 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1994,6 +1994,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.table.empty' : 'No history to display',
   'dashboard.configHistory.table.version.versionText' : 'V{0}',
   'dashboard.configHistory.table.current.tooltip' : 'Current config for 
{0}:{1}',
+  'dashboard.configHistory.table.restart.tooltip' : 'Restart required',
   'dashboard.configHistory.table.filteredHostsInfo': '{0} of {1} versions 
showing',
   'dashboard.configHistory.info-bar.authoredOn': 'authored on',
   'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/common/configs/config_history_flow.hbs
--
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs 
b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index 9aade90..8fe54c8 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -93,7 +93,7 @@
   {{/unless}}
 /ul
   /div
-div class=label-wrapper span9 data-toggle=tooltip {{bindAttr 
data-original-title=view.displayedServiceVersion.briefNotes }}
+div class=label-wrapper span9 data-toggle=tooltip {{bindAttr 
data-original-title=view.displayedServiceVersion.briefNotes}}
   span class=label 
label-info{{view.displayedServiceVersion.versionText}}/span
   {{#if view.displayedServiceVersion.isCurrent}}
 span class=label label-success{{t common.current}}/span

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ab3bb55/ambari-web/app/templates/main/dashboard/config_history.hbs
--
diff --git a/ambari-web/app/templates/main/dashboard/config_history.hbs 
b/ambari-web/app/templates/main/dashboard/config_history.hbs
index de8680a..f0101cc 100644
--- a/ambari-web/app/templates/main/dashboard/config_history.hbs
+++ b/ambari-web/app/templates/main/dashboard/config_history.hbs
@@ -45,11 +45,12 @@
   a {{action goToServiceConfigs item.serviceName}}
 {{item.serviceName}}
   /a
-  i {{bindAttr class=:icon-refresh :restart-required-service 
item.isRestartRequired::hidden}}/i
+  i {{bindAttr class=:icon-refresh :restart-required-service 
item.isRestartRequired::hidden}}
+rel=Tooltip {{translateAttr 

git commit: AMBARI-7024 - Alerts: DDL Update For Default Service Alert Groups (jonathanhurley)

2014-08-26 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 1ab3bb551 - 0e9c744f2


AMBARI-7024 - Alerts: DDL Update For Default Service Alert Groups 
(jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 0e9c744f21a7b8aaada917eafbf3fbbed1a87edc
Parents: 1ab3bb5
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Aug 26 17:53:28 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Aug 26 19:51:38 2014 -0400

--
 .../server/orm/entities/AlertGroupEntity.java   | 74 ++--
 .../server/upgrade/UpgradeCatalog170.java   |  1 +
 .../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 +
 .../server/upgrade/UpgradeCatalog170Test.java   |  4 +-
 7 files changed, 60 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e9c744f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
index 976855e..1ca592c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java
@@ -65,6 +65,9 @@ public class AlertGroupEntity {
   @Column(name = is_default, nullable = false)
   private Integer isDefault = Integer.valueOf(0);
 
+  @Column(name = service_name, nullable = true, length = 255)
+  private String serviceName;
+
   /**
* Bi-directional many-to-many association to {@link AlertDefinitionEntity}
*/
@@ -81,7 +84,7 @@ public class AlertGroupEntity {
 
   /**
* Gets the unique ID of this grouping of alerts.
-   * 
+   *
* @return the ID (never {@code null}).
*/
   public Long getGroupId() {
@@ -90,7 +93,7 @@ public class AlertGroupEntity {
 
   /**
* Sets the unique ID of this grouping of alerts.
-   * 
+   *
* @param groupId
*  the ID (not {@code null}).
*/
@@ -100,7 +103,7 @@ public class AlertGroupEntity {
 
   /**
* Gets the ID of the cluster that this alert group is a part of.
-   * 
+   *
* @return the ID (never {@code null}).
*/
   public Long getClusterId() {
@@ -109,7 +112,7 @@ public class AlertGroupEntity {
 
   /**
* Sets the ID of the cluster that this alert group is a part of.
-   * 
+   *
* @param clusterId
*  the ID of the cluster (not {@code null}).
*/
@@ -120,7 +123,7 @@ public class AlertGroupEntity {
   /**
* Gets the name of the grouping of alerts. Group names are unique in a given
* cluster.
-   * 
+   *
* @return the group name (never {@code null}).
*/
   public String getGroupName() {
@@ -130,7 +133,7 @@ public class AlertGroupEntity {
   /**
* Sets the name of this grouping of alerts. Group names are unique in a 
given
* cluster.
-   * 
+   *
* @param groupName
*  the name of the group (not {@code null}).
*/
@@ -143,7 +146,7 @@ public class AlertGroupEntity {
* groups cannot have their alert definition groupings changed. New alert
* definitions are automtaically added to the default group that belongs to
* the service of that definition.
-   * 
+   *
* @return {@code true} if this is a default group, {@code false} otherwise.
*/
   public boolean isDefault() {
@@ -152,7 +155,7 @@ public class AlertGroupEntity {
 
   /**
* Sets whether this is a default group and is immutable.
-   * 
+   *
* @param isDefault
*  {@code true} to make this group immutable.
*/
@@ -161,8 +164,31 @@ public class AlertGroupEntity {
   }
 
   /**
-   * Gets all of the alert definitions that are a part of this grouping.
+   * Gets the name of the service. This is only applicable when
+   * {@link #isDefault()} is {@code true}.
+   *
+   * @return the service that this is the default group for, or {@code null} if
+   * this is not a default group.
+   */
+  public String getServiceName() {
+return serviceName;
+  }
+
+  /**
+   * Set the service name. This is only applicable when {@link #isDefault()} is
+   * {@code true}.
* 
+   * @param serviceName
+   *  the service that this is the default group for, or {@code null} 
if
+   *  this is not a default group.
+   */
+  public 

git commit: AMBARI-7028. Config History: need to set notes for the new SCV when reverting back via 'Make Current' action.(xiwang)

2014-08-26 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk a8e6736ac - 2dc55f08f


AMBARI-7028. Config History: need to set notes for the new SCV when reverting 
back via 'Make Current' action.(xiwang)


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

Branch: refs/heads/trunk
Commit: 2dc55f08fe7b1660122145853ede4d7a04c014a8
Parents: a8e6736
Author: Xi Wang xiw...@apache.org
Authored: Tue Aug 26 17:35:45 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Tue Aug 26 17:48:46 2014 -0700

--
 ambari-web/app/messages.js  |  3 +-
 .../views/common/configs/config_history_flow.js | 32 
 2 files changed, 28 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2dc55f08/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 31d3e69..9579b04 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1410,7 +1410,7 @@ Em.I18n.translations = {
 'on the Ambari Server host to make the JDBC driver available and to enable 
testing the database connection.',
 
   'services.service.config.configHistory.configGroup': 'Group',
-  'services.service.config.configHistory.makeCurrent.message': 'Are you sure 
you want to make {0} the current version for {1}:{2} ?',
+  'services.service.config.configHistory.makeCurrent.message': 'Created from 
service config version {0}',
 
   'services.add.header':'Add Service Wizard',
   'services.reassign.header':'Move Master Wizard',
@@ -2000,6 +2000,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.info-bar.changesToHandle': 'Changes to handle',
   'dashboard.configHistory.info-bar.showMore': 'Show more',
   'dashboard.configHistory.info-bar.save.popup.title': 'Save Configuration',
+  'dashboard.configHistory.info-bar.makeCurrent.popup.title': 'Make Current 
Confirmation',
   'dashboard.configHistory.info-bar.save.popup.placeholder': 'What did you 
change?',
   'dashboard.configHistory.info-bar.revert.button': 'Make current',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2dc55f08/ambari-web/app/views/common/configs/config_history_flow.js
--
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js 
b/ambari-web/app/views/common/configs/config_history_flow.js
index a4c21af..0c0e686 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -245,14 +245,33 @@ App.ConfigHistoryFlowView = Em.View.extend({
 if (isDisabled) return;
 var serviceConfigVersion = event.context || Em.Object.create({
   version: this.get('displayedServiceVersion.version'),
-  serviceName: this.get('displayedServiceVersion.serviceName')
+  serviceName: this.get('displayedServiceVersion.serviceName'),
+  notes:''
 });
 var versionText = event.context ? event.context.get('versionText') : 
this.get('displayedServiceVersion.versionText');
-App.showConfirmationPopup(function () {
+var configGroupName = this.get('displayedServiceVersion.configGroupName');
+return App.ModalPopup.show({
+  header: 
Em.I18n.t('dashboard.configHistory.info-bar.makeCurrent.popup.title'),
+  serviceConfigNote: 
Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText),
+  bodyClass: Em.View.extend({
+templateName: require('templates/common/configs/save_configuration'),
+notesArea: Em.TextArea.extend({
+  classNames: ['full-width'],
+  value: 
Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText),
+  onChangeValue: function() {
+this.get('parentView.parentView').set('serviceConfigNote', 
this.get('value'));
+  }.observes('value')
+})
+  }),
+  primary: Em.I18n.t('dashboard.configHistory.info-bar.revert.button'),
+  secondary: Em.I18n.t('common.discard'),
+  third: Em.I18n.t('common.cancel'),
+  onPrimary: function () {
+serviceConfigVersion.set('serviceConfigNote', 
this.get('serviceConfigNote'));
 self.sendRevertCall(serviceConfigVersion);
-  },
-  
Em.I18n.t('services.service.config.configHistory.makeCurrent.message').format(versionText,
 this.get('displayedServiceVersion.serviceName'), 
this.get('displayedServiceVersion.configGroupName'))
-);
+this.hide();
+  }
+});
   },
 
   /**
@@ -268,7 +287,8 @@ App.ConfigHistoryFlowView = Em.View.extend({