[27/27] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-16 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev

Conflicts:

ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java

ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java


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

Branch: refs/heads/branch-alerts-dev
Commit: 17b8e799048b96c7fb1074a21c52e2e7ecaaf607
Parents: 760bedf bd04a28
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Sep 16 08:50:14 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Sep 16 08:50:14 2014 -0400

--
 .../ui/admin-web/app/views/leftNavbar.html  |   2 +-
 ambari-agent/src/main/package/rpm/preremove.sh  |   2 +-
 .../ambari_agent/TestActualConfigHandler.py |   6 +-
 .../test/python/ambari_agent/TestLiveStatus.py  |   4 +-
 .../TestExecuteHadoopResource.py|  37 ++-
 ambari-server/docs/api/v1/services.md   |   7 -
 .../stackadvisor/StackAdvisorRunner.java|  10 +-
 .../server/controller/AmbariHandlerList.java|  33 +-
 .../AmbariPrivilegeResourceProvider.java|   2 +-
 .../internal/BaseBlueprintProcessor.java|   2 +-
 .../BlueprintConfigurationProcessor.java|  30 +-
 .../RecommendationResourceProvider.java |   6 +-
 .../internal/ValidationResourceProvider.java|   6 +-
 .../internal/ViewInstanceResourceProvider.java  |  10 +-
 .../ViewPermissionResourceProvider.java |   4 +-
 .../internal/ViewPrivilegeResourceProvider.java |   8 +-
 .../ambari/server/metadata/ActionMetadata.java  |   1 -
 .../ambari/server/orm/entities/ViewEntity.java  |   8 +-
 .../org/apache/ambari/server/state/Service.java |   8 +-
 .../server/upgrade/UpgradeCatalog170.java   | 142 +++-
 .../apache/ambari/server/view/ViewRegistry.java |  10 +-
 ambari-server/src/main/package/rpm/preremove.sh |   2 +-
 .../custom_actions/validate_configs.py  |   2 -
 .../scripts/shared_initialization.py|   3 +-
 .../stacks/HDP/1.3.2/role_command_order.json|   4 +-
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml | 156 +
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 +
 .../HIVE/package/files/templetonSmoke.sh|  96 ++
 .../services/HIVE/package/scripts/params.py |  31 +-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   3 +
 .../services/HIVE/package/scripts/webhcat.py| 107 ++
 .../HIVE/package/scripts/webhcat_server.py  |  53 +++
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  42 +++
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   6 -
 .../package/templates/hadoop-services.cfg.j2|   2 +-
 .../WEBHCAT/configuration/webhcat-env.xml   |  54 ---
 .../WEBHCAT/configuration/webhcat-site.xml  | 156 -
 .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 103 --
 .../WEBHCAT/package/files/templetonSmoke.sh |  96 --
 .../WEBHCAT/package/scripts/__init__.py |  20 --
 .../services/WEBHCAT/package/scripts/params.py  |  78 -
 .../WEBHCAT/package/scripts/service_check.py|  44 ---
 .../WEBHCAT/package/scripts/status_params.py|  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 107 --
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 ---
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../stacks/HDP/1.3/role_command_order.json  |   4 +-
 .../stacks/HDP/1.3/services/HIVE/metainfo.xml   |   5 -
 .../services/HDFS/configuration/core-site.xml   |   9 +
 .../scripts/shared_initialization.py|   3 +-
 .../stacks/HDP/2.0.6/role_command_order.json|   4 +-
 .../services/HDFS/configuration/core-site.xml   |  10 +
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml | 138 
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 +-
 .../HIVE/package/files/templetonSmoke.sh|  96 ++
 .../services/HIVE/package/scripts/params.py |  44 ++-
 .../HIVE/package/scripts/service_check.py   |   2 +
 .../HIVE/package/scripts/status_params.py   |   1 +
 .../services/HIVE/package/scripts/webhcat.py| 112 +++
 .../HIVE/package/scripts/webhcat_server.py  |  53 +++
 .../HIVE/package/scripts/webhcat_service.py |  40 +++
 .../package/scripts/webhcat_service_check.py|  41 +++
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml  |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2   |   8 +-
 

[16/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-web/app/assets/data/alerts/alerts.json
--
diff --git a/ambari-web/app/assets/data/alerts/alerts.json 
b/ambari-web/app/assets/data/alerts/alerts.json
index bcf804f..4ce39ea 100644
--- a/ambari-web/app/assets/data/alerts/alerts.json
+++ b/ambari-web/app/assets/data/alerts/alerts.json
@@ -5,7 +5,7 @@
   href : 
http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-191-202-42.ec2.internal/host_components/NAGIOS_SERVER;,
   HostRoles : {
 cluster_name : test,
-nagios_alerts : {alerts:[{service_description:Ganglia [gmetad] 
Process 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:1,plugin_output:TCP
 OK - 0.004 second response time on port 
8651,last_hard_state_change:1359058506,last_hard_state:0,last_time_ok:1359072006,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072006,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
hbasemaster,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.009 second response time on port 
8663,last_hard_state_change:1359058517,last_hard_state:0,last_time_ok:1359072002,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072002,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] P
 rocess down alert for 
jobtracker,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.009 second response time on port 
8662,last_hard_state_change:1359058528,last_hard_state:0,last_time_ok:1359072013,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072013,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
namenode,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.004 second response time on port 
8661,last_hard_state_change:1359058540,last_hard_state:0,last_time_ok:1359072010,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072010,service_type:GANGLIA},{service_description:Ganglia
 collector [gmond] Process down alert for 
slaves,host_name:ip-10-191-202-42.e
 c2.internal,current_attempt:1,current_state:0,plugin_output:TCP OK 
- 0.009 second response time on port 
8660,last_hard_state_change:1359058551,last_hard_state:0,last_time_ok:1359072006,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072006,service_type:GANGLIA},{service_description:Percent
 region servers 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 total:lt;1gt;, 
affected:lt;0gt;,last_hard_state_change:1359058802,last_hard_state:0,last_time_ok:1359072002,last_time_warning:0,last_time_unknown:0,last_time_critical:1359058772,is_flapping:0,last_check:1359072002,service_type:HBASE},{service_description:HBase
 Web UI 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 Successfully accessed hbase Web UI,last_hard_state_change
 
:1359058574,last_hard_state:0,last_time_ok:1359072014,last_time_warning:1359058634,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359072014,service_type:HBASE},{service_description:HBaseMaster
 CPU 
utilization,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:2
 CPU, average load 14.0% lt; 200% : 
OK,last_hard_state_change:1359058585,last_hard_state:0,last_time_ok:1359071785,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359071785,service_type:HBASE},{service_description:HBaseMaster
 Process 
down,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:TCP
 OK - 0.000 second response time on port 
6,last_hard_state_change:1359058596,last_hard_state:0,last_time_ok:1359071991,last_time_warning:0,last_time_unknown:0,last_time_crit
 
ical:1359058626,is_flapping:0,last_check:1359071991,service_type:HBASE},{service_description:Corrupt\\/Missing
 
blocks,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 corrupt_blocks:lt;0gt;, missing_blocks:lt;0gt;, 
total_blocks:lt;249gt;,last_hard_state_change:1359058509,last_hard_state:0,last_time_ok:1359071949,last_time_warning:0,last_time_unknown:0,last_time_critical:0,is_flapping:0,last_check:1359071949,service_type:HDFS},{service_description:HDFS
 Capacity 
utilization,host_name:ip-10-191-202-42.ec2.internal,current_attempt:1,current_state:0,plugin_output:OK:
 DFSUsedGB:lt;0.1gt;, 

[10/27] git commit: AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. Additional path. (Denys Buzhor via akovalenko)

2014-09-16 Thread jonathanhurley
AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled 
hdfs for HDP 2.1.x. Additional path. (Denys Buzhor via akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 02e9fdbc1941c8ce5e2a5c373f86b68ac0d6b34d
Parents: 007288a
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Mon Sep 15 19:31:07 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Mon Sep 15 19:33:51 2014 +0300

--
 ambari-web/app/views/common/quick_view_link_view.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/02e9fdbc/ambari-web/app/views/common/quick_view_link_view.js
--
diff --git a/ambari-web/app/views/common/quick_view_link_view.js 
b/ambari-web/app/views/common/quick_view_link_view.js
index 0304559..f941100 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -309,7 +309,7 @@ App.QuickViewLinks = Em.View.extend({
 var hadoopSslEnabled = false;
 if (configProperties  configProperties.length  0) {
   var site = configProperties.findProperty('type', 'core-site');
-  if (parseInt(App.get('currentStackVersionNumber')[0])  1) {
+  if (App.get('isHadoop2Stack')) {
 hadoopSslEnabled = (Em.get(site, 'properties')  
site.properties['dfs.http.policy'] === 'HTTPS_ONLY');
   } else {
 hadoopSslEnabled = (Em.get(site, 'properties')   
site.properties['hadoop.ssl.enabled'] == true);



[09/27] git commit: AMBARI-7307 Use fixed URL for repo for versioned RPMs. (dsen)

2014-09-16 Thread jonathanhurley
AMBARI-7307 Use fixed URL for repo for versioned RPMs. (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: 007288a24bb3720117552d60a82beef7c6831263
Parents: 8dd0e81
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 15 19:26:54 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 15 19:26:54 2014 +0300

--
 .../services/OOZIE/package/scripts/params.py|  3 +-
 .../services/SQOOP/package/scripts/params.py| 12 --
 .../services/FALCON/package/scripts/params.py   |  9 +++--
 .../resources/stacks/HDP/2.2/repos/repoinfo.xml | 27 +++---
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml | 12 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |  2 +-
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |  4 +-
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   | 39 +++-
 .../services/OOZIE/configuration/oozie-site.xml |  2 +-
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  | 27 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|  5 +--
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  | 15 +++-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  | 12 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|  2 +-
 .../WEBHCAT/configuration/webhcat-site.xml  | 10 ++---
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   |  2 +-
 .../YARN/configuration-mapred/mapred-site.xml   |  2 +-
 .../services/YARN/configuration/yarn-site.xml   |  2 +-
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |  6 +--
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |  2 +-
 23 files changed, 143 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/007288a2/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index ac26ede..4bce882 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -34,15 +34,16 @@ if rpm_version is not None:
   hadoop_bin_dir = format(/usr/hdp/{rpm_version}/hadoop/bin)
   hadoop_lib_home = format(/usr/hdp/{rpm_version}/hadoop/lib)
   mapreduce_libs_path = format(/usr/hdp/{rpm_version}/hadoop-mapreduce/*)
+  conf_dir = format(/usr/hdp/{rpm_version}/oozie/conf)
 else:
   hadoop_conf_dir = /etc/hadoop/conf
   hadoop_bin_dir = /usr/bin
   hadoop_lib_home = /usr/lib/hadoop/lib
   mapreduce_libs_path = /usr/lib/hadoop-mapreduce/*
+  conf_dir = /etc/oozie/conf
 
 oozie_user = config['configurations']['oozie-env']['oozie_user']
 smokeuser = config['configurations']['cluster-env']['smokeuser']
-conf_dir = /etc/oozie/conf
 user_group = config['configurations']['cluster-env']['user_group']
 jdk_location = config['hostLevelParams']['jdk_location']
 check_db_connection_jar_name = DBConnectionVerification.jar

http://git-wip-us.apache.org/repos/asf/ambari/blob/007288a2/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
index 9170fdc..5784f9d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
@@ -27,18 +27,22 @@ rpm_version = 
default(/configurations/hadoop-env/rpm_version, None)
 #hadoop params
 if rpm_version is not None:
   zoo_conf_dir = format('/usr/hdp/{rpm_version}/etc/zookeeper')
+  sqoop_conf_dir = format('/usr/hdp/{rpm_version}/sqoop/conf')
+  sqoop_lib = format('/usr/hdp/{rpm_version}/sqoop/lib')
+  hbase_home = format('/usr/hdp/{rpm_version}/hbase')
+  hive_home = format('/usr/hdp/{rpm_version}/hive')
 else:
   zoo_conf_dir = /etc/zookeeper
+  sqoop_conf_dir = /usr/lib/sqoop/conf
+  sqoop_lib = /usr/lib/sqoop/lib
+  hbase_home = /usr
+  hive_home = /usr
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 smokeuser 

[06/27] git commit: AMBARI-7266. Properly replace host names in Falcon properties during BP deployment.

2014-09-16 Thread jonathanhurley
AMBARI-7266.  Properly replace host names in Falcon properties during BP 
deployment.


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

Branch: refs/heads/branch-alerts-dev
Commit: 1719a5ce20ebc4f0b109e9c9e2ff1ba23c23e58a
Parents: db9b776
Author: Robert Nettleton rnettle...@hortonworks.com
Authored: Mon Sep 15 10:05:27 2014 -0400
Committer: John Speidel jspei...@hortonworks.com
Committed: Mon Sep 15 10:05:27 2014 -0400

--
 .../BlueprintConfigurationProcessor.java| 30 +++-
 .../BlueprintConfigurationProcessorTest.java| 21 ++
 2 files changed, 50 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1719a5ce/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 c246f83..c31a869 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
@@ -274,6 +274,17 @@ public class BlueprintConfigurationProcessor {
 return hosts;
   }
 
+
+  /**
+   * Provides package-level access to the map of single host topology updaters.
+   * This is useful for facilitating unit-testing of this class.
+   *
+   * @return the map of single host topology updaters
+   */
+  static MapString, MapString, PropertyUpdater 
getSingleHostTopologyUpdaters() {
+return singleHostTopologyUpdaters;
+  }
+
   /**
* Provides functionality to update a property value.
*/
@@ -296,7 +307,7 @@ public class BlueprintConfigurationProcessor {
* Topology based updater which replaces the original host name of a 
property with the host name
* which runs the associated (master) component in the new cluster.
*/
-  private static class SingleHostTopologyUpdater implements PropertyUpdater {
+  static class SingleHostTopologyUpdater implements PropertyUpdater {
 /**
  * Component name
  */
@@ -341,6 +352,16 @@ public class BlueprintConfigurationProcessor {
 }
   }
 }
+
+/**
+ * Provides access to the name of the component associated
+ *   with this updater instance.
+ *
+ * @return component name for this updater
+ */
+public String getComponentName() {
+  return this.component;
+}
   }
 
   /**
@@ -603,6 +624,8 @@ public class BlueprintConfigurationProcessor {
 MapString, PropertyUpdater hiveSiteMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater oozieSiteMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater stormSiteMap = new HashMapString, 
PropertyUpdater();
+MapString, PropertyUpdater falconStartupPropertiesMap = new 
HashMapString, PropertyUpdater();
+
 
 MapString, PropertyUpdater mapredEnvMap = new HashMapString, 
PropertyUpdater();
 MapString, PropertyUpdater hadoopEnvMap = new HashMapString, 
PropertyUpdater();
@@ -623,6 +646,7 @@ public class BlueprintConfigurationProcessor {
 singleHostTopologyUpdaters.put(hive-site, hiveSiteMap);
 singleHostTopologyUpdaters.put(oozie-site, oozieSiteMap);
 singleHostTopologyUpdaters.put(storm-site, stormSiteMap);
+singleHostTopologyUpdaters.put(falcon-startup.properties, 
falconStartupPropertiesMap);
 
 mPropertyUpdaters.put(hadoop-env, hadoopEnvMap);
 mPropertyUpdaters.put(hbase-env, hbaseEnvMap);
@@ -686,6 +710,10 @@ public class BlueprintConfigurationProcessor {
 multiStormSiteMap.put(storm.zookeeper.servers,
 new YamlMultiValuePropertyDecorator(new 
MultipleHostTopologyUpdater(ZOOKEEPER_SERVER)));
 
+// FALCON
+falconStartupPropertiesMap.put(*.broker.url, new 
SingleHostTopologyUpdater(FALCON_SERVER));
+
+
 // Required due to AMBARI-4933.  These no longer seem to be required as 
the default values in the stack
 // are now correct but are left here in case an existing blueprint still 
contains an old value.
 hadoopEnvMap.put(namenode_heapsize, new MPropertyUpdater());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1719a5ce/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
--
diff --git 

[24/27] git commit: AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and instances created (srimanth)

2014-09-16 Thread jonathanhurley
AMBARI-7321. Slider view: Iron out story on how app-packages are deployed and 
instances created (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 63f5ed2cc25f495cf216a350b32f45132adc0725
Parents: a412da8
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Mon Sep 15 20:48:07 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Mon Sep 15 20:48:12 2014 -0700

--
 contrib/views/slider/pom.xml | 8 
 .../ambari/view/slider/SliderAppsViewControllerImpl.java | 7 +++
 .../slider/src/main/resources/ui/app/models/slider_app.js| 2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/pom.xml
--
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index cfb0abc..82d27bb 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -549,6 +549,14 @@
filteringfalse/filtering
directorytarget/lib/directory
/resource
+   resource
+   targetPathWEB-INF/lib/targetPath
+   filteringtrue/filtering
+   directorylib/directory
+   includes
+   includeslider-agent.tar.gz/include
+   /includes
+   /resource
/resources
pluginManagement
plugins

http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index c4871f2..cc35dec 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -57,6 +57,7 @@ import org.apache.slider.client.SliderClient;
 import org.apache.slider.common.SliderKeys;
 import org.apache.slider.common.params.ActionCreateArgs;
 import org.apache.slider.common.params.ActionFreezeArgs;
+import org.apache.slider.common.params.ActionInstallPackageArgs;
 import org.apache.slider.common.params.ActionThawArgs;
 import org.apache.slider.common.tools.SliderFileSystem;
 import org.apache.slider.core.exceptions.SliderException;
@@ -678,9 +679,15 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
   createArgs.image = new Path(hdfsLocation
   + /user/yarn/agent/slider-agent.tar.gz);
   
+  final ActionInstallPackageArgs installArgs = new 
ActionInstallPackageArgs();
+  installArgs.name = appName;
+  installArgs.packageURI = getAppsFolderPath() + 
configs.get(application.def).getAsString();
+  installArgs.replacePkg = true;
+
   return invokeSliderClientRunnable(new 
SliderClientContextRunnableString() {
 @Override
 public String run(SliderClient sliderClient) throws YarnException, 
IOException, InterruptedException {
+  sliderClient.actionInstallPkg(installArgs);
   sliderClient.actionCreate(appName, createArgs);
   ApplicationId applicationId = sliderClient.applicationId;
   if (applicationId != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/63f5ed2c/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
index 3710877..7408911 100644
--- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
+++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
@@ -114,7 +114,7 @@ App.SliderApp = DS.Model.extend({
   showMetrics: function() {
 var global = this.get('configs')['global'];
 //check whether slider has GANGLIA configured if not metrics should be 
hidden
-if (!(global['ganglia_server_host']  global['ganglia_server_id']  
global['ganglia_server_port'])) {
+if 

[01/27] git commit: AMBARI-7290. Usability: show 'Restart Required' bar on Summary tab.(xiwang)

2014-09-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 760bedfe3 - 17b8e7990


AMBARI-7290. Usability: show 'Restart Required' bar on Summary tab.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 1dcb9dc62e59f5320940dcc3188398d15b706d33
Parents: 3355733
Author: Xi Wang xiw...@apache.org
Authored: Fri Sep 12 17:28:47 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Fri Sep 12 17:28:54 2014 -0700

--
 .../controllers/main/service/info/configs.js|  9 +--
 ambari-web/app/styles/application.less  | 14 +
 .../app/templates/main/service/info/configs.hbs |  2 +-
 .../app/templates/main/service/info/summary.hbs | 26 +++-
 .../app/views/main/service/info/summary.js  | 62 
 5 files changed, 107 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/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 2280d01..cea4630 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -2328,9 +2328,10 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* trigger showItemsShouldBeRestarted popup with hosts that requires resetart
* @method showHostsShouldBeRestarted
*/
-  showHostsShouldBeRestarted: function () {
+  showHostsShouldBeRestarted: function (restartRequiredHostsAndComponents) {
 var hosts = [];
-for (var hostName in 
this.get('content.restartRequiredHostsAndComponents')) {
+var rhc = this.get('content.restartRequiredHostsAndComponents') || 
restartRequiredHostsAndComponents;
+for (var hostName in rhc) {
   hosts.push(hostName);
 }
 var hostsText = hosts.length == 1 ? Em.I18n.t('common.host') : 
Em.I18n.t('common.hosts');
@@ -2342,8 +2343,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* trigger showItemsShouldBeRestarted popup with components that requires 
resetart
* @method showComponentsShouldBeRestarted
*/
-  showComponentsShouldBeRestarted: function () {
-var rhc = this.get('content.restartRequiredHostsAndComponents');
+  showComponentsShouldBeRestarted: function 
(restartRequiredHostsAndComponents) {
+var rhc = this.get('content.restartRequiredHostsAndComponents') || 
restartRequiredHostsAndComponents;
 var hostsComponets = [];
 var componentsObject = {};
 for (var hostName in rhc) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index e4b455e..7a4138c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1066,6 +1066,19 @@ h1 {
   padding: 8px 0;
 }
 
+#summary-restart-bar {
+  margin-top: 20px;
+  .alert{
+.icon-refresh{
+  margin-left:10px;
+  color: #fdb82f;
+}
+  }
+  .dropdown-menu  li  a:hover {
+text-shadow: none;
+  }
+}
+
 #serviceConfig {
   margin-top: 20px;
   .alert{
@@ -5597,6 +5610,7 @@ ul.inline li {
 width:757px!important
   }
 
+
   .assign-masters {
 .host-assignments {
   margin-left: 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/1dcb9dc6/ambari-web/app/templates/main/service/info/configs.hbs
--
diff --git a/ambari-web/app/templates/main/service/info/configs.hbs 
b/ambari-web/app/templates/main/service/info/configs.hbs
index 5335bca..b4ec65c 100644
--- a/ambari-web/app/templates/main/service/info/configs.hbs
+++ b/ambari-web/app/templates/main/service/info/configs.hbs
@@ -23,7 +23,7 @@
 {{#if App.isAdmin}}
   div
 div class=alert alert-warning clearfix
-  i class=icon-refresh/i {{{view.needToRestartMessage}}} {{t 
services.service.config.restartService.needToRestart}}  a href=# {{action 
showComponentsShouldBeRestarted target=controller}}{{view.componentsCount}} 
{{pluralize view.componentsCount singular=t:common.component 
plural=t:common.components}}/a {{t on}} a href=# {{action 
showHostsShouldBeRestarted target=controller}}{{view.hostsCount}} 
{{pluralize view.hostsCount singular=t:common.host 
plural=t:common.hosts}}/a
+  i class=icon-refresh/i 

[19/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
deleted file mode 100644
index 174c92c..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
+++ /dev/null
@@ -1,78 +0,0 @@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-License); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an AS IS BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-
-
-from resource_management import *
-import status_params
-
-# server configurations
-config = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-hcat_user = config['configurations']['hive-env']['hcat_user']
-webhcat_user = config['configurations']['hive-env']['webhcat_user']
-webhcat_env_sh_template = config['configurations']['webhcat-env']['content']
-
-config_dir = '/etc/hcatalog/conf'
-
-templeton_log_dir = config['configurations']['hive-env']['hcat_log_dir']
-templeton_pid_dir = status_params.templeton_pid_dir
-
-pid_file = status_params.pid_file
-
-hadoop_conf_dir = 
config['configurations']['webhcat-site']['templeton.hadoop.conf.dir']
-templeton_jar = config['configurations']['webhcat-site']['templeton.jar']
-
-hadoop_home = '/usr'
-user_group = config['configurations']['cluster-env']['user_group']
-
-webhcat_server_host = config['clusterHostInfo']['webhcat_server_host']
-
-webhcat_apps_dir = /apps/webhcat
-smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
-smokeuser = config['configurations']['cluster-env']['smokeuser']
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, 
/usr/sbin])
-
-#hdfs directories
-webhcat_apps_dir = /apps/webhcat
-hcat_hdfs_user_dir = format(/user/{hcat_user})
-hcat_hdfs_user_mode = 0755
-webhcat_hdfs_user_dir = format(/user/{webhcat_user})
-webhcat_hdfs_user_mode = 0755
-#for create_hdfs_directory
-hostname = config[hostname]
-security_param = true if security_enabled else false
-hadoop_conf_dir = /etc/hadoop/conf
-hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
-hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
-hdfs_principal_name = 
config['configurations']['hadoop-env']['hdfs_principal_name']
-kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, 
/usr/sbin])
-import functools
-#create partial functions with common arguments for every HdfsDirectory call
-#to create hdfs directory we need to call params.HdfsDirectory in code
-HdfsDirectory = functools.partial(
-  HdfsDirectory,
-  conf_dir=hadoop_conf_dir,
-  hdfs_user=hdfs_user,
-  security_enabled = security_enabled,
-  keytab = hdfs_user_keytab,
-  kinit_path_local = kinit_path_local
-)

http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
deleted file mode 100644
index b6101ac..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
+++ /dev/null
@@ -1,44 +0,0 @@
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-License); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an AS IS BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 

[17/27] AMBARI-7296. HCatalog and WebHCat services should not be managed as separate service (should be part of Hive service) (jaimin)

2014-09-16 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/601014ed/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py 
b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
new file mode 100644
index 000..75496c2
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_webhcat_server.py
@@ -0,0 +1,258 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+License); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an AS IS BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+from mock.mock import MagicMock, patch
+from stacks.utils.RMFTestCase import *
+
+class TestWebHCatServer(RMFTestCase):
+
+  def test_configure_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = configure,
+   config_file=default.json
+)
+self.assert_configure_default()
+self.assertNoMoreResources()
+
+  def test_start_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = start,
+   config_file=default.json
+)
+
+self.assert_configure_default()
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh start',
+  not_if = 'ls /var/run/webhcat/webhcat.pid 
/dev/null 21  ps `cat /var/run/webhcat/webhcat.pid` /dev/null 21',
+  user = 'hcat'
+)
+self.assertNoMoreResources()
+
+  def test_stop_default(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = stop,
+   config_file=default.json
+)
+
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh stop',
+  user = 'hcat',
+  )
+self.assertResourceCalled('Execute', 'rm -f /var/run/webhcat/webhcat.pid')
+self.assertNoMoreResources()
+
+def test_configure_secured(self):
+  
self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+ classname = WebHCatServer,
+ command = configure,
+ config_file=secured.json
+  )
+
+  self.assert_configure_secured()
+  self.assertNoMoreResources()
+
+  def test_start_secured(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = start,
+   config_file=secured.json
+)
+
+self.assert_configure_secured()
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh start',
+  not_if = 'ls /var/run/webhcat/webhcat.pid 
/dev/null 21  ps `cat /var/run/webhcat/webhcat.pid` /dev/null 21',
+  user = 'hcat'
+)
+self.assertNoMoreResources()
+
+  def test_stop_secured(self):
+self.executeScript(1.3.2/services/HIVE/package/scripts/webhcat_server.py,
+   classname = WebHCatServer,
+   command = stop,
+   config_file=secured.json
+)
+
+self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr 
/usr/lib/hcatalog/sbin/webhcat_server.sh stop',
+  user = 'hcat',
+  )
+self.assertResourceCalled('Execute', 'rm -f /var/run/webhcat/webhcat.pid')
+self.assertNoMoreResources()
+
+  def assert_configure_default(self):
+self.assertResourceCalled('HdfsDirectory', '/user/hcat',
+  security_enabled = False,
+  keytab = UnknownConfigurationMock(),
+  conf_dir = '/etc/hadoop/conf',
+  hdfs_user = 'hdfs',
+  kinit_path_local = /usr/bin/kinit,
+  

git commit: AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed (jonathanhurley)

2014-09-16 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 17b8e7990 - b7ae2d74a


AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed 
(jonathanhurley)


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

Branch: refs/heads/branch-alerts-dev
Commit: b7ae2d74adcd07759b2308bc2a7b0f8115480a7e
Parents: 17b8e79
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Sep 16 12:26:36 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Sep 16 12:26:36 2014 -0400

--
 .../server/controller/ControllerModule.java |   2 +
 .../apache/ambari/server/events/AlertEvent.java |   2 +-
 .../ambari/server/events/AmbariEvent.java   |  75 ++
 .../ambari/server/events/ServiceEvent.java  |  75 ++
 .../server/events/ServiceInstalledEvent.java|  52 +++
 .../events/listeners/AlertReceivedListener.java |   4 +-
 .../listeners/AlertServiceStateListener.java| 147 +++
 .../listeners/AlertStateChangedListener.java|   2 +
 .../events/publishers/AlertEventPublisher.java  |   8 +-
 .../events/publishers/AmbariEventPublisher.java |  66 +
 .../apache/ambari/server/state/ServiceImpl.java |  49 ++-
 .../state/alerts/AlertEventPublisherTest.java   | 132 +
 12 files changed, 572 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 8413762..349e465 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -52,6 +52,7 @@ import 
org.apache.ambari.server.controller.internal.MemberResourceProvider;
 import org.apache.ambari.server.controller.internal.ServiceResourceProvider;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.events.listeners.AlertReceivedListener;
+import org.apache.ambari.server.events.listeners.AlertServiceStateListener;
 import org.apache.ambari.server.events.listeners.AlertStateChangedListener;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.DBAccessorImpl;
@@ -313,5 +314,6 @@ public class ControllerModule extends AbstractModule {
 // them as eager singletons to have them register with the eventbus
 bind(AlertReceivedListener.class).asEagerSingleton();
 bind(AlertStateChangedListener.class).asEagerSingleton();
+bind(AlertServiceStateListener.class).asEagerSingleton();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
index a75477d..767cb6b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java
@@ -20,7 +20,7 @@ package org.apache.ambari.server.events;
 import org.apache.ambari.server.state.Alert;
 
 /**
- * The {@link AlertEvent} class the base for all events related to alerts.
+ * The {@link AlertEvent} class is the base for all events related to alerts.
  */
 public abstract class AlertEvent {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
new file mode 100644
index 000..dda18c7
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file

[01/29] git commit: AMBARI-7331. HDFS check fails with mkdir: /tmp: File exists(vbrodetskyi)

2014-09-17 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev b7ae2d74a - a4e97aaa2


AMBARI-7331. HDFS check fails with mkdir: /tmp: File exists(vbrodetskyi)


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

Branch: refs/heads/branch-alerts-dev
Commit: f8aa99b34ae66fd3f06705b6b92edffcd28dfc9c
Parents: bd04a28
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Tue Sep 16 16:38:06 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Tue Sep 16 16:38:06 2014 +0300

--
 .../HDP/1.3.2/services/HDFS/package/scripts/service_check.py   | 2 +-
 .../HDP/2.0.6/services/HDFS/package/scripts/service_check.py   | 2 +-
 .../src/test/python/stacks/1.3.2/HDFS/test_service_check.py| 2 +-
 .../src/test/python/stacks/2.0.6/HDFS/test_service_check.py| 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
index 58da7ec..e04d68c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/package/scripts/service_check.py
@@ -32,7 +32,7 @@ class HdfsServiceCheck(Script):
 safemode_command = dfsadmin -safemode get | grep OFF
 
 create_dir_cmd = format(fs -mkdir {dir} ; hadoop fs -chmod 777 {dir})
-test_dir_exists = format(hadoop fs -test -e {dir})
+test_dir_exists = format(su - {smoke_user} -c 'hadoop fs -test -e {dir}')
 cleanup_cmd = format(fs -rm {tmp_file})
 #cleanup put below to handle retries; if retrying there wil be a stale file
 #that needs cleanup; exit code is fn of second command

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
index 18f58bd..ef9a361 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/service_check.py
@@ -33,7 +33,7 @@ class HdfsServiceCheck(Script):
 
 create_dir_cmd = format(fs -mkdir {dir})
 chmod_command = format(fs -chmod 777 {dir})
-test_dir_exists = format(hadoop --config {hadoop_conf_dir} fs -test -e 
{dir})
+test_dir_exists = format(su - {smoke_user} -c 'hadoop --config 
{hadoop_conf_dir} fs -test -e {dir}')
 cleanup_cmd = format(fs -rm {tmp_file})
 #cleanup put below to handle retries; if retrying there wil be a stale file
 #that needs cleanup; exit code is fn of second command

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py 
b/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
index beed46a..629406f 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/HDFS/test_service_check.py
@@ -57,7 +57,7 @@ class TestServiceCheck(RMFTestCase):
 conf_dir = '/etc/hadoop/conf',
 bin_dir = '/usr/bin',
 logoutput = True,
-not_if = 'hadoop --config /etc/hadoop/conf fs -test -e /tmp',
+not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs 
-test -e /tmp\'',
 try_sleep = 3,
 tries = 5,
 user = 'ambari-qa',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f8aa99b3/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
index 57abab3..01f96c7 100644
--- 

[28/29] git commit: AMBARI-7359. Move Wizard should be disabled for single node cluster. (akovalenko)

2014-09-17 Thread jonathanhurley
AMBARI-7359. Move Wizard should be disabled for single node cluster. 
(akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 24f0b47e5220a8e696233658fd99a08b8cdc399c
Parents: 0fb11d2
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Wed Sep 17 15:19:08 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Wed Sep 17 15:19:08 2014 +0300

--
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/routes/reassign_master_routes.js | 96 +++-
 2 files changed, 52 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/24f0b47e/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index f158f8d..7379220 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1459,6 +1459,7 @@ Em.I18n.translations = {
   'services.service.config_groups.switchGroupTextFull':'Switch to \'{0}\' host 
config group',
   'services.service.config_groups.switchGroupTextShort':'Switch to \'{0}\'',
   'services.reassign.closePopup':'Move {0} wizard is in progress. You must 
allow the wizard to complete for Ambari to be in usable state. If you choose to 
quit, you must follow manual instructions to complete or revert move {0} wizard 
as documented in the Ambari User Guide. Are you sure you want to exit the 
wizard?',
+  'services.reassign.error.fewHosts':'You must have at least 2 hosts in your 
cluster to run Move Wizard.',
 
   'services.reassign.step1.header':'Get Started',
   'services.reassign.step1.message1': 'This wizard will walk you through 
moving {0}.br/',

http://git-wip-us.apache.org/repos/asf/ambari/blob/24f0b47e/ambari-web/app/routes/reassign_master_routes.js
--
diff --git a/ambari-web/app/routes/reassign_master_routes.js 
b/ambari-web/app/routes/reassign_master_routes.js
index 85f91aa..f28083a 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/ambari-web/app/routes/reassign_master_routes.js
@@ -34,56 +34,62 @@ module.exports = App.WizardRoute.extend({
 
   enter: function (router) {
 console.log('in /service/reassign:enter');
-var context = this;
-Em.run.next(function () {
-  var reassignMasterController = router.get('reassignMasterController');
-  App.router.get('updateController').set('isWorking', false);
-  var popup = App.ModalPopup.show({
-classNames: ['full-width-modal'],
-header: Em.I18n.t('services.reassign.header'),
-bodyClass: App.ReassignMasterView.extend({
-  controller: reassignMasterController
-}),
-primary: Em.I18n.t('form.cancel'),
-showFooter: false,
-secondary: null,
+if (App.router.get('mainHostController.hostsCountMap.TOTAL')  1) {
+  var context = this;
+  Em.run.next(function () {
+var reassignMasterController = router.get('reassignMasterController');
+App.router.get('updateController').set('isWorking', false);
+var popup = App.ModalPopup.show({
+  classNames: ['full-width-modal'],
+  header: Em.I18n.t('services.reassign.header'),
+  bodyClass: App.ReassignMasterView.extend({
+controller: reassignMasterController
+  }),
+  primary: Em.I18n.t('form.cancel'),
+  showFooter: false,
+  secondary: null,
 
-onPrimary: function () {
-  this.hide();
-  App.router.get('updateController').set('isWorking', true);
-  App.router.transitionTo('main.services.index');
-},
-onClose: function () {
-  var reassignMasterController = 
router.get('reassignMasterController');
-  var currStep = reassignMasterController.get('currentStep');
+  onPrimary: function () {
+this.hide();
+App.router.get('updateController').set('isWorking', true);
+App.router.transitionTo('main.services.index');
+  },
+  onClose: function () {
+var reassignMasterController = 
router.get('reassignMasterController');
+var currStep = reassignMasterController.get('currentStep');
 
-  if (parseInt(currStep)  3) {
-var self = this;
-App.showConfirmationPopup(function(){
-  router.get('reassignMasterWizardStep' + currStep + 
'Controller').removeObserver('tasks.@each.status', this, 'onTaskStatusChange');
-  context.leaveWizard(router,self);
-}, 

[22/29] git commit: AMBARI-7347. Cannot view slider instance in API due to exception (srimanth)

2014-09-17 Thread jonathanhurley
AMBARI-7347. Cannot view slider instance in API due to exception (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: e83ab259c582cbe7ab2e9a9cf7505e6d4f364afb
Parents: fe890e9
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Sep 16 15:12:50 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Sep 16 15:12:57 2014 -0700

--
 contrib/views/slider/pom.xml|  2 +-
 .../slider/SliderAppTypesResourceProvider.java  |  6 +++--
 .../slider/SliderAppsViewControllerImpl.java| 28 +++-
 .../ui/app/controllers/slider_controller.js |  1 -
 .../src/main/resources/ui/app/helpers/ajax.js   |  6 -
 5 files changed, 32 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e83ab259/contrib/views/slider/pom.xml
--
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index 82d27bb..8c33c93 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -551,7 +551,7 @@
/resource
resource
targetPathWEB-INF/lib/targetPath
-   filteringtrue/filtering
+   filteringfalse/filtering
directorylib/directory
includes
includeslider-agent.tar.gz/include

http://git-wip-us.apache.org/repos/asf/ambari/blob/e83ab259/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppTypesResourceProvider.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppTypesResourceProvider.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppTypesResourceProvider.java
index e696016..725c18a 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppTypesResourceProvider.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppTypesResourceProvider.java
@@ -75,8 +75,10 @@ public class SliderAppTypesResourceProvider implements
SetSliderAppType appSet = new HashSetSliderAppType();
ListSliderAppType sliderAppTypes = 
sliderController.getSliderAppTypes(request
.getPropertyIds());
-   for (SliderAppType app : sliderAppTypes)
-   appSet.add(app);
+if (sliderAppTypes != null) {
+  for (SliderAppType app : sliderAppTypes)
+appSet.add(app);
+}
return appSet;
}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e83ab259/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index 04533ee..f3c3087 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -26,6 +26,8 @@ import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -447,9 +449,20 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
 return yarnConfig;
   }
 
+  private boolean areViewParametersSet() {
+String hdfsPath = viewContext.getProperties().get(PROPERTY_HDFS_ADDRESS);
+String rmAddress = 
viewContext.getProperties().get(PROPERTY_YARN_RM_ADDRESS);
+String rmSchedulerAddress = 
viewContext.getProperties().get(PROPERTY_YARN_RM_SCHEDULER_ADDRESS);
+String zkQuorum = viewContext.getProperties().get(PROPERTY_ZK_QUOROM);
+return hdfsPath!=null  rmAddress!=null  rmSchedulerAddress!=null  
zkQuorum!=null;
+  }
+
   @Override
   public ListSliderApp getSliderApps(final SetString properties)
   throws YarnException, IOException, InterruptedException {
+if (!areViewParametersSet()) {
+  return 

[17/29] git commit: AMBARI-7225 deploy of 2.1.GlusterFS stack errors with: org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Configuration with tag 'versi

2014-09-17 Thread jonathanhurley
AMBARI-7225 deploy of 2.1.GlusterFS stack errors with:  
org.apache.ambari.server.controller.spi.SystemException: An internal system 
exception occurred: Configuration with tag 'version1' exists for 'core-site'
(Scott Creeley via eboyd)


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

Branch: refs/heads/branch-alerts-dev
Commit: b1336f395a93549b8e0591ff1e67a924aef6cfba
Parents: ceee5bf
Author: Erin A Boyd eb...@redhat.com
Authored: Tue Sep 16 14:42:35 2014 -0400
Committer: root r...@ambari.rhs
Committed: Tue Sep 16 14:43:40 2014 -0400

--
 .../GLUSTERFS/configuration/hadoop-env.xml  |  2 ++
 .../services/YARN/configuration/core-site.xml   | 20 
 2 files changed, 2 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1336f39/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
index 6b00199..6c6d4c1 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/GLUSTERFS/configuration/hadoop-env.xml
@@ -81,11 +81,13 @@
 valuehdfs/value
 descriptionUser to run HDFS as/description
   /property
+  !--
   property
 nameuser_group/name
 valuehadoop/value
 descriptionProxy user group./description
   /property
+  --
 !-- hadoop-env.sh --
   property
 namecontent/name

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1336f39/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
deleted file mode 100644
index 60f01ad..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/configuration/core-site.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-?xml version=1.0?
-?xml-stylesheet type=text/xsl href=configuration.xsl?
-!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the License); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an AS IS BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
---
-configuration supports_final=true
-/configuration



[19/29] git commit: AMBARI-7327. After NameNode HA is enabled UI doesn't load (aonishuk)

2014-09-17 Thread jonathanhurley
AMBARI-7327. After NameNode HA is enabled UI doesn't load (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: ceee5bfedd4a861594f74002ba7228e60803c7a6
Parents: db62322
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 22:10:40 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 22:10:40 2014 +0300

--
 .../server/api/util/StackExtensionHelper.java   |   31 +-
 .../api/util/StackExtensionHelperTest.java  |   20 +
 .../stacks/HDP/2.0.7/services/HDFS/metrics.json | 7840 --
 3 files changed, 44 insertions(+), 7847 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ceee5bfe/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 d5d816e..a63be38 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
@@ -220,12 +220,16 @@ public class StackExtensionHelper {
 mergedServiceInfo.setCustomCommands(mergedCustomCommands);
 
 // metrics
-if (null == childService.getMetricsFile()  null != 
parentService.getMetricsFile())
+if (null != childService.getMetricsFile())
+  mergedServiceInfo.setMetricsFile(childService.getMetricsFile());
+else if (null != parentService.getMetricsFile())
   mergedServiceInfo.setMetricsFile(parentService.getMetricsFile());
 
 // alerts
-if (null == childService.getAlertsFile()  null != 
parentService.getAlertsFile())
-  mergedServiceInfo.setAlertsFile(parentService.getAlertsFile());
+if (null != childService.getAlertsFile())
+  mergedServiceInfo.setAlertsFile(childService.getAlertsFile());
+else if (null != parentService.getAlertsFile())
+  mergedServiceInfo.setAlertsFile(parentService.getAlertsFile());
 
 populateComponents(mergedServiceInfo, parentService, childService);
 
@@ -425,12 +429,24 @@ public class StackExtensionHelper {
 // Map services with unique names
 MapString, ServiceInfo serviceInfoMap = new HashMapString,
   ServiceInfo();
+ListServiceInfo serviceInfoList = null;
 // Iterate with oldest parent first - all stacks are populated
+StackInfo parentStack = null;
 while(lt.hasPrevious()) {
-  StackInfo parentStack = lt.previous();
-  ListServiceInfo serviceInfoList = parentStack.getServices();
+  if (parentStack == null) {
+parentStack = lt.previous();
+serviceInfoList = parentStack.getServices();
+for (ServiceInfo service : serviceInfoList){
+  if (!service.isDeleted()) {
+serviceInfoMap.put(service.getName(), service);
+  }
+}
+continue;
+  }
+  StackInfo currentStackInfo = lt.previous();
+  serviceInfoList = currentStackInfo.getServices();
   
-  mergeStacks(parentStack, stackInfo);
+  mergeStacks(parentStack, currentStackInfo);
   
   for (ServiceInfo service : serviceInfoList) {
 ServiceInfo existingService = serviceInfoMap.get(service.getName());
@@ -439,7 +455,7 @@ public class StackExtensionHelper {
   continue;
 }
 
-if (existingService == null) {
+if (existingService == null  !service.isDeleted()) {
   serviceInfoMap.put(service.getName(), service);
 } else {
   // Redefined service - merge with parent
@@ -467,6 +483,7 @@ public class StackExtensionHelper {
 }
 
   }
+  parentStack = currentStackInfo;
 }
 return new ArrayListServiceInfo(serviceInfoMap.values());
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ceee5bfe/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
index 346202e..2219b6f 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java
@@ -649,6 +649,26 @@ public class 

[23/29] git commit: AMBARI-7345 - Views : Exception from ambari-server startup, extract views

2014-09-17 Thread jonathanhurley
AMBARI-7345 - Views : Exception from ambari-server startup, extract views


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

Branch: refs/heads/branch-alerts-dev
Commit: 19533465d6ccc4c57d00ed8c9af7815f32b2cead
Parents: e83ab25
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Tue Sep 16 17:41:13 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Tue Sep 16 19:06:18 2014 -0400

--
 .../apache/ambari/server/view/ViewRegistry.java | 67 +--
 ambari-server/src/main/python/ambari-server.py  | 42 +++--
 .../ambari/server/view/ViewRegistryTest.java| 90 
 .../view/configuration/ViewConfigTest.java  |  1 +
 4 files changed, 186 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/19533465/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 8f6774e..5e652a1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -28,7 +28,6 @@ import 
org.apache.ambari.server.api.resources.ViewExternalSubResourceDefinition;
 import org.apache.ambari.server.api.services.ViewExternalSubResourceService;
 import org.apache.ambari.server.api.services.ViewSubResourceService;
 import org.apache.ambari.server.configuration.Configuration;
-import org.apache.ambari.server.controller.ControllerModule;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.dao.MemberDAO;
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
@@ -101,6 +100,7 @@ public class ViewRegistry {
* Constants
*/
   private static final String EXTRACTED_ARCHIVES_DIR = work;
+  private static final String EXTRACT_COMMAND = extract;
 
   /**
* Thread pool
@@ -219,15 +219,31 @@ public class ViewRegistry {
* Registry main method.
*
* @param args  the command line arguments
-   *
-   * @throws Exception if the registry command can not be completed
*/
-  public static void main(String[] args) throws Exception {
+  public static void main(String[] args) {
+
+if (args.length = 2) {
+  String archivePath = args[1];
+
+  try {
+Injector injector = Guice.createInjector();
 
-Injector injector = Guice.createInjector(new ControllerModule());
-initInstance(injector.getInstance(ViewRegistry.class));
+ViewExtractor  extractor  = 
injector.getInstance(ViewExtractor.class);
+ViewArchiveUtility archiveUtility = 
injector.getInstance(ViewArchiveUtility.class);
+Configuration  configuration  = 
injector.getInstance(Configuration.class);
 
-singleton.readViewArchives(true, false);
+if (args[0].equals(EXTRACT_COMMAND)) {
+  if (extractViewArchive(archivePath, extractor, archiveUtility, 
configuration, true)) {
+System.exit(0);
+  }
+}
+  } catch (Exception e) {
+String msg = Caught exception extracting view archive  + archivePath 
+ .;
+LOG.error(msg, e);
+System.exit(2);
+  }
+}
+System.exit(1);
   }
 
   /**
@@ -1229,6 +1245,43 @@ public class ViewRegistry {
 }
   }
 
+  // extract the view archive for the given path.
+  protected static boolean extractViewArchive(String archivePath,
+ViewExtractor extractor,
+ViewArchiveUtility archiveUtility,
+Configuration configuration,
+boolean systemOnly ) throws 
Exception {
+
+File viewDir = configuration.getViewsDir();
+
+String extractedArchivesPath = viewDir.getAbsolutePath() +
+File.separator + EXTRACTED_ARCHIVES_DIR;
+
+if (extractor.ensureExtractedArchiveDirectory(extractedArchivesPath)) {
+
+  File archiveFile = archiveUtility.getFile(archivePath);
+
+  ViewConfig viewConfig = 
archiveUtility.getViewConfigFromArchive(archiveFile);
+
+  String commonName = viewConfig.getName();
+  String version= viewConfig.getVersion();
+  String viewName   = ViewEntity.getViewName(commonName, version);
+
+  String extractedArchiveDirPath = extractedArchivesPath + File.separator 
+ viewName;
+  File   extractedArchiveDirFile = 
archiveUtility.getFile(extractedArchiveDirPath);
+
+  if 

[14/29] git commit: AMBARI-7308 Configs: changes to host config group are not saving notes. (ababiichuk)

2014-09-17 Thread jonathanhurley
AMBARI-7308 Configs: changes to host config group are not saving notes. 
(ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: f53e654513c7c0be09b62f748599c804bd18385e
Parents: 4770717
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Mon Sep 15 17:16:26 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Tue Sep 16 20:49:01 2014 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/f53e6545/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 e7ee933..9fcdaaa 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1282,6 +1282,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   tag: selectedConfigGroup.get('service.id'),
   description: selectedConfigGroup.get('description'),
   hosts: groupHosts,
+  service_config_version_note: this.get('serviceConfigVersionNote'),
   desired_configs: this.buildGroupDesiredConfigs(overridenConfigs)
 }
   }, true);



[29/29] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-17 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev


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

Branch: refs/heads/branch-alerts-dev
Commit: a4e97aaa2df20b7434676dbdcc8afa9f28bdc84d
Parents: b7ae2d7 24f0b47
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Wed Sep 17 08:33:22 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Wed Sep 17 08:33:22 2014 -0400

--
 .../app/scripts/controllers/mainCtrl.js |   13 +-
 .../resources/ui/admin-web/app/styles/main.css  |   42 +-
 .../resources/ui/admin-web/app/views/main.html  |   41 +-
 .../src/main/python/ambari_jinja2/ext/jinja.el  |  213 -
 .../server/actionmanager/ActionScheduler.java   |   26 +-
 .../ambari/server/actionmanager/Request.java|   23 +-
 .../server/api/util/StackExtensionHelper.java   |   35 +-
 .../server/controller/ExecuteActionRequest.java |   20 +-
 .../controller/MaintenanceStateHelper.java  |2 +-
 .../internal/ConfigGroupResourceProvider.java   |   20 +-
 .../internal/RequestResourceProvider.java   |   12 +-
 .../server/orm/entities/RequestEntity.java  |   12 +
 .../server/upgrade/UpgradeCatalog170.java   |4 +
 .../apache/ambari/server/view/ViewRegistry.java |   67 +-
 ambari-server/src/main/python/ambari-server.py  |   42 +-
 .../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 +-
 .../src/main/resources/properties.json  |1 +
 .../HDFS/package/scripts/service_check.py   |2 +-
 .../services/HIVE/configuration/hive-site.xml   |   19 +
 .../HDFS/package/scripts/service_check.py   |2 +-
 .../services/HIVE/configuration/hive-site.xml   |   19 +
 .../stacks/HDP/2.0/role_command_order.json  |2 +-
 .../stacks/HDP/2.0/services/HBASE/metainfo.xml  |3 -
 .../stacks/HDP/2.0/services/HDFS/metainfo.xml   |1 -
 .../stacks/HDP/2.0/services/HIVE/metainfo.xml   |6 -
 .../stacks/HDP/2.0/services/OOZIE/metainfo.xml  |3 -
 .../stacks/HDP/2.0/services/PIG/metainfo.xml|1 -
 .../stacks/HDP/2.0/services/SQOOP/metainfo.xml  |3 -
 .../HDP/2.0/services/WEBHCAT/metainfo.xml   |   27 -
 .../stacks/HDP/2.0/services/YARN/metainfo.xml   |2 -
 .../HDP/2.0/services/ZOOKEEPER/metainfo.xml |1 -
 .../GLUSTERFS/configuration/hadoop-env.xml  |2 +
 .../services/HIVE/configuration/hive-site.xml   |   19 +
 .../services/YARN/configuration/core-site.xml   |   20 -
 .../stacks/HDP/2.1/services/FLUME/metainfo.xml  |3 +-
 .../stacks/HDP/2.1/services/HBASE/metainfo.xml  |3 -
 .../stacks/HDP/2.1/services/HDFS/metainfo.xml   |1 -
 .../services/HIVE/configuration/hive-site.xml   |   19 +
 .../stacks/HDP/2.1/services/HIVE/metainfo.xml   |1 -
 .../stacks/HDP/2.1/services/NAGIOS/metainfo.xml |1 -
 .../stacks/HDP/2.1/services/OOZIE/metainfo.xml  |2 -
 .../stacks/HDP/2.1/services/PIG/metainfo.xml|1 -
 .../stacks/HDP/2.1/services/SQOOP/metainfo.xml  |3 -
 .../stacks/HDP/2.1/services/YARN/metainfo.xml   |1 -
 .../HDP/2.1/services/ZOOKEEPER/metainfo.xml |2 -
 .../stacks/HDP/2.2.1/repos/repoinfo.xml |2 +-
 .../stacks/HDP/2.2.1/services/HDFS/metainfo.xml |1 -
 .../stacks/HDP/2.2.1/services/HIVE/metainfo.xml |1 -
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |1 -
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |1 -
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |3 -
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |1 -
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |1 -
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |2 -
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|1 -
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |3 -
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  |1 -
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|1 -
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   |1 -
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |2 -
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |1 -
 .../actionmanager/TestActionDBAccessorImpl.java |2 +-
 .../actionmanager/TestActionScheduler.java  |  264 +-
 .../api/util/StackExtensionHelperTest.java  |   20 +
 .../AmbariCustomCommandExecutionHelperTest.java |2 +-
 .../AmbariManagementControllerTest.java |   86 +-
 .../BackgroundCustomCommandExecutionTest.java   |2 +-
 .../ambari/server/view/ViewRegistryTest.java|   90 +
 .../view/configuration/ViewConfigTest.java  |1 +
 .../stacks/1.3.2/HDFS/test_service_check.py |2 +-
 .../stacks/2.0.6/HDFS/test_service_check.py |2 +-
 

[06/29] git commit: AMBARI-7334. Slider View: Show view name along with hover of view properties. (onechiporenko)

2014-09-17 Thread jonathanhurley
AMBARI-7334. Slider View: Show view name along with hover of view properties. 
(onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 42a5a33497e432f3d7f258f7070eeeaf20beb2a8
Parents: 460ae9e
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Sep 16 18:01:26 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Sep 16 18:01:26 2014 +0300

--
 .../ui/app/controllers/slider_controller.js | 104 +
 .../src/main/resources/ui/app/initialize.js |  31 +++--
 .../ui/app/mappers/application_status.js| 115 ---
 .../resources/ui/app/styles/application.less|   8 ++
 .../resources/ui/app/templates/application.hbs  |   4 +-
 .../ui/app/templates/slider_title_tooltip.hbs   |  27 +
 .../src/main/resources/ui/app/translations.js   |   2 +-
 .../resources/ui/app/views/application_view.js  |  64 +++
 8 files changed, 207 insertions(+), 148 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/42a5a334/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 8283de1..a5eec96 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -29,29 +29,36 @@
  * If Slider-properties exists:
  *  - Load cluster name
  *  - Load hostNames
+ * After whole data has been loaded set codeApp.sliderConfigs/code and 
enable/disable Slider
  * @type {Ember.Controller}
  */
-App.SliderController = Ember.Controller.extend({
+App.SliderController = Ember.Controller.extend(App.RunPeriodically, {
 
   /**
-   *  Load resources on controller initialization
-   * @method initResources
+   * Map for Slider-errors
+   * If some config is empty, service isn't installed
+   * @type {object}
*/
-  initResources: function () {
-this.getParametersFromViewProperties();
+  serviceConfigMap: {
+HDFS: 'hdfsAddress',
+YARN: 'yarnResourceManager',
+ZOOKEEPER: 'zookeeperQuorum'
   },
 
   /**
* List of Slider-properties mapped from Ambari-configs
+   * Key-names used in Slider-Title-Popup, so don't change it pls
* @type {Em.Object}
*/
   initialValuesToLoad: Em.Object.create({
 ambariAddress: null,
 clusterName: null,
 hdfsAddress: null,
-yarnRMAddress: null,
-yarnRMSchedulerAddress: null,
-zookeeperQuorum: null
+yarnResourceManager: null,
+yarnResourceManagerScheduler: null,
+zookeeperQuorum: null,
+gangliaServer: null,
+gangliaClusters: null
   }),
 
   /**
@@ -61,6 +68,14 @@ App.SliderController = Ember.Controller.extend({
   zookeeperHosts: [],
 
   /**
+   *  Load resources on controller initialization
+   * @method initResources
+   */
+  initResources: function () {
+this.getParametersFromViewProperties();
+  },
+
+  /**
* Get Slider properties from View-parameters (set in the Ambari Admin View)
* If parameters can't be found, use Ambari-configs to populate Slider 
properties
* @returns {$.ajax}
@@ -71,20 +86,44 @@ App.SliderController = Ember.Controller.extend({
   name: 'slider.getViewParams',
   sender: this,
   success: 'getParametersFromViewPropertiesSuccessCallback',
-  error: 'getClusterName'
+  error: 'getParametersFromViewPropertiesErrorCallback'
 });
   },
 
   /**
* Check if Slider-properties exist
+   * If exist - set Slider properties using view-configs
* If not - get Ambari configs to populate Slider properties
* @param {object} data
* @method getParametersFromViewPropertiesSuccessCallback
*/
   getParametersFromViewPropertiesSuccessCallback: function(data) {
 var properties = Em.get(data, 'ViewInstanceInfo.properties'),
-  loadConfigs = Em.isNone(properties);
-  this.getClusterName(loadConfigs);
+  initialValuesToLoad = this.get('initialValuesToLoad');
+if (Em.isEmpty(properties)) {
+  this.getClusterName();
+}
+else {
+  initialValuesToLoad.setProperties({
+ambariAddress: location.protocol + // + document.location.host,
+hdfsAddress: properties['hdfs.address'],
+yarnResourceManager: properties['yarn.resourcemanager.address'],
+yarnResourceManagerScheduler: 
properties['yarn.resourcemanager.scheduler.address'],
+

[16/29] git commit: AMBARI-7340. Webhcat and hcat services are shown in 2.0 stack as separate (aonishuk)

2014-09-17 Thread jonathanhurley
AMBARI-7340. Webhcat and hcat services are shown in 2.0 stack as separate 
(aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: db62322f4b16be65ea59577e43a3740c5b408199
Parents: 246ae72
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 21:39:20 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 21:39:20 2014 +0300

--
 .../stacks/HDP/2.0/role_command_order.json  |  2 +-
 .../stacks/HDP/2.0/services/HIVE/metainfo.xml   |  4 ---
 .../HDP/2.0/services/WEBHCAT/metainfo.xml   | 26 
 3 files changed, 1 insertion(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
index e90617e..9c5db5c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0/role_command_order.json
@@ -23,7 +23,7 @@
 OOZIE_SERVICE_CHECK-SERVICE_CHECK: [OOZIE_SERVER-START, 
MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK],
 WEBHCAT_SERVICE_CHECK-SERVICE_CHECK: [WEBHCAT_SERVER-START],
 HBASE_SERVICE_CHECK-SERVICE_CHECK: [HBASE_MASTER-START, 
HBASE_REGIONSERVER-START],
-HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START],
+HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START, WEBHCAT_SERVER-START],
 HCAT_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START],
 PIG_SERVICE_CHECK-SERVICE_CHECK: [RESOURCEMANAGER-START, 
NODEMANAGER-START],
 SQOOP_SERVICE_CHECK-SERVICE_CHECK: [RESOURCEMANAGER-START, 
NODEMANAGER-START],

http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
index bed0ee4..b24dada 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0/services/HIVE/metainfo.xml
@@ -22,9 +22,5 @@
   nameHIVE/name
   version0.12.0.2.0/version
 /service
-service
-  nameHCATALOG/name
-  version0.12.0.2.0/version
-/service
   /services
 /metainfo

http://git-wip-us.apache.org/repos/asf/ambari/blob/db62322f/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
deleted file mode 100644
index 89c52c0..000
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0/services/WEBHCAT/metainfo.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-?xml version=1.0?
-!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the License); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an AS IS BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
---
-metainfo
-  schemaVersion2.0/schemaVersion
-  services
-service
-  nameWEBHCAT/name
-  version0.12.0.2.0/version
-/service
-  /services
-/metainfo



[09/29] git commit: AMBARI-7335. Remove ambari-common/src/main/python/ambari_jinja2/ext/jinja.el from Ambari. (aonishuk)

2014-09-17 Thread jonathanhurley
AMBARI-7335. Remove ambari-common/src/main/python/ambari_jinja2/ext/jinja.el 
from Ambari. (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: ef6ecf86c4fe7ca6246a567f6390cb189ae733ed
Parents: 2ab5bad
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 18:56:06 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 18:56:06 2014 +0300

--
 .../src/main/python/ambari_jinja2/ext/jinja.el  | 213 ---
 1 file changed, 213 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef6ecf86/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
--
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el 
b/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
deleted file mode 100644
index da4800a..000
--- a/ambari-common/src/main/python/ambari_jinja2/ext/jinja.el
+++ /dev/null
@@ -1,213 +0,0 @@
-;;; jinja.el --- Jinja mode highlighting
-;;
-;; Author: Georg Brandl
-;; Copyright: (c) 2009 by the Jinja Team
-;; Last modified: 2008-05-22 23:04 by gbr
-;;
-;;
-;;
-;;; Commentary:
-;;
-;; Mostly ripped off django-mode by Lennart Borgman.
-;;
-;;
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;
-;;
-;;; Code:
-
-(defconst jinja-font-lock-keywords
-  (list
-;   (cons (rx {% comment %} (submatch (0+ anything))
-; {% endcomment %}) (list 1 font-lock-comment-face))
-   '({# ?\\(.*?\\) ?#} . (1 font-lock-comment-face))
-   '({%-?\\|-?%}\\|{{\\|}} . font-lock-preprocessor-face)
-   '({#\\|#} . font-lock-comment-delimiter-face)
-   ;; first word in a block is a command
-   '({%-?[ \t\n]*\\([a-zA-Z_]+\\) . (1 font-lock-keyword-face))
-   ;; variables
-   '(\\({{ ?\\)\\([^|]*?\\)\\(|.*?\\)? ?}} . (1 
font-lock-variable-name-face))
-   ;; keywords and builtins
-   (cons (rx word-start
- (or in as recursive not and or if else
- import with without context)
- word-end)
- font-lock-keyword-face)
-   (cons (rx word-start
- (or true false none loop self super)
- word-end)
- font-lock-builtin-face)
-   ;; tests
-   '(\\(is\\)[ \t]*\\(not\\)[ \t]*\\([a-zA-Z_]+\\)
- (1 font-lock-keyword-face) (2 font-lock-keyword-face)
- (3 font-lock-function-name-face))
-   ;; builtin filters
-   (cons (rx
-  | (* space)
-  (submatch
-   (or abs batch capitalize capture center count default
-   dformat dictsort e escape filesizeformat first
-   float format getattribute getitem groupby indent
-   int join jsonencode last length lower markdown
-   pprint random replace reverse round rst slice
-   sort string striptags sum textile title trim
-   truncate upper urlencode urlize wordcount wordwrap
-   xmlattr)))
- (list 1 font-lock-builtin-face))
-   )
-   Minimal highlighting expressions for Jinja mode)
-
-(define-derived-mode jinja-mode nil Jinja
-  Simple Jinja mode for use with `mumamo-mode'.
-This mode only provides syntax highlighting.
-  ;;(set (make-local-variable 'comment-start) {#)
-  ;;(set (make-local-variable 'comment-end)   #})
-  (setq font-lock-defaults '(jinja-font-lock-keywords)))
-
-;; mumamo stuff
-
-(when (require 'mumamo nil t)
-
-  (defun mumamo-chunk-jinja3(pos min max)
-Find {# ... #}.  Return range and `jinja-mode'.
-See `mumamo-find-possible-chunk' for POS, MIN and MAX.
-(mumamo-find-possible-chunk pos min max
-'mumamo-search-bw-exc-start-jinja3
-'mumamo-search-bw-exc-end-jinja3
-  

[20/29] git commit: AMBARI-7342. Slider View: Action dialogs do not look the same as Ambari dialogs (alexantonenko)

2014-09-17 Thread jonathanhurley
AMBARI-7342. Slider View: Action dialogs do not look the same as Ambari dialogs 
(alexantonenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: e24eb5bc1c08b156fad8e3c202520dd5ca11b390
Parents: b1336f3
Author: Alex Antonenko hiv...@gmail.com
Authored: Tue Sep 16 21:49:20 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Tue Sep 16 22:15:58 2014 +0300

--
 .../ui/app/controllers/slider_app_controller.js | 15 ++-
 .../resources/ui/app/styles/application.less| 99 
 2 files changed, 109 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index e78a1b3..6558e87 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -319,12 +319,17 @@ App.SliderAppController = Ember.ObjectController.extend({
 openModal: function(option) {
   this.set('currentAction', option.action);
   if (option.confirm) {
-Bootstrap.ModalManager.confirm(
-  this,
+Bootstrap.ModalManager.open(
+  confirm-modal,
   Ember.I18n.t('common.confirmation'),
-  Ember.I18n.t('question.sure'),
-  Ember.I18n.t('yes'),
-  Ember.I18n.t('no')
+  Ember.View.extend({
+template: Ember.Handlebars.compile('{{t question.sure}}')
+  }),
+  [
+Ember.Object.create({title: Em.I18n.t('common.cancel'), 
clicked:modalCanceled, dismiss: 'modal'}),
+Ember.Object.create({title: Em.I18n.t('ok'), 
clicked:modalConfirmed, type:'success'})
+  ],
+  this
 );
   }
   else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 241a52d..90f10d7 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -753,4 +753,103 @@ a {
   .row {
 .table-row();
   }
+}
+
+.modal-header {
+  padding: 9px 15px;
+  border-bottom: 1px solid #eee;
+}
+.modal-title {
+  line-height: 30px;
+  font-size: 24px;
+  font-family: inherit;
+  font-weight: bold;
+  color: inherit;
+  text-rendering: optimizelegibility;
+}
+.modal-body{
+  padding: 15px;
+}
+.modal-footer {
+  margin-top: 0px;
+  padding: 14px 15px 15px;
+  margin-bottom: 0;
+  text-align: right;
+  background-color: #f5f5f5;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+  -moz-border-radius: 0 0 6px 6px;
+  border-radius: 0 0 6px 6px;
+  -webkit-box-shadow: inset 0 1px 0 #ff;
+  -moz-box-shadow: inset 0 1px 0 #ff;
+  box-shadow: inset 0 1px 0 #ff;
+
+  .btn{
+display: inline-block;
+padding: 4px 14px;
+margin-bottom: 0;
+font-size: 14px;
+line-height: 20px;
+color: #33;
+text-align: center;
+text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+vertical-align: middle;
+cursor: pointer;
+background-color: #f5f5f5;
+background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff), 
to(#e6e6e6));
+background-image: -webkit-linear-gradient(top, #ff, #e6e6e6);
+background-image: -o-linear-gradient(top, #ff, #e6e6e6);
+background-image: linear-gradient(to bottom, #ff, #e6e6e6);
+background-image: -moz-linear-gradient(top, #ff, #e6e6e6);
+background-repeat: repeat-x;
+border: 1px solid #bb;
+border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+border-bottom-color: #a2a2a2;
+-webkit-border-radius: 4px;
+-moz-border-radius: 4px;
+border-radius: 4px;
+filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px 
rgba(0, 0, 0, 0.05);
+-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 
0, 0, 0.05);
+

[02/29] git commit: AMBARI-7330. Add HiveServer2 dynamic service discovery configs to Ambari (aonishuk)

2014-09-17 Thread jonathanhurley
AMBARI-7330. Add HiveServer2 dynamic service discovery configs to Ambari 
(aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: a8fb52f33c3137313b8651590b828e1cad3da7ff
Parents: f8aa99b
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Tue Sep 16 16:48:03 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Tue Sep 16 16:48:03 2014 +0300

--
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 .../services/HIVE/configuration/hive-site.xml| 19 +++
 ambari-web/app/data/HDP2/site_properties.js  |  9 +
 ambari-web/app/data/site_properties.js   |  9 +
 6 files changed, 94 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
index 8206a6a..524a27b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
@@ -257,4 +257,23 @@ limitations under the License.
 /description
   /property
 
+  property
+namehive.server2.support.dynamic.service.discovery/name
+valuefalse/value
+descriptionWhether HiveServer2 supports dynamic service discovery for its
+  clients. To support this, each instance of HiveServer2 currently uses
+  ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
+  should use the ZooKeeper ensemble: hive.zookeeper.quorum in their
+  connection string.
+/description
+  /property
+
+  property
+namehive.server2.zookeeper.namespace/name
+valuehiveserver2/value
+descriptionThe parent node in ZooKeeper used by HiveServer2 when
+  supporting dynamic service discovery.
+/description
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
index 9057fbe..e64e6a0 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
@@ -309,4 +309,23 @@ limitations under the License.
 /description
   /property
 
+  property
+namehive.server2.support.dynamic.service.discovery/name
+valuefalse/value
+descriptionWhether HiveServer2 supports dynamic service discovery for its
+  clients. To support this, each instance of HiveServer2 currently uses
+  ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
+  should use the ZooKeeper ensemble: hive.zookeeper.quorum in their
+  connection string.
+/description
+  /property
+
+  property
+namehive.server2.zookeeper.namespace/name
+valuehiveserver2/value
+descriptionThe parent node in ZooKeeper used by HiveServer2 when
+  supporting dynamic service discovery.
+/description
+  /property
+
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/a8fb52f3/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
index 8b4f065..ad1df07 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/HIVE/configuration/hive-site.xml
@@ -480,4 +480,23 @@ limitations under the License.
 /description
   /property
 
+  property
+namehive.server2.support.dynamic.service.discovery/name

[24/29] git commit: AMBARI-7351. Slider View: Flex API call throws 400-Bad Request (srimanth)

2014-09-17 Thread jonathanhurley
AMBARI-7351. Slider View: Flex API call throws 400-Bad Request (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: cae2fc4d5bdf2ea1234191e9e9cdd8d4eb299825
Parents: 1953346
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Sep 16 19:41:47 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Sep 16 19:41:54 2014 -0700

--
 .../view/slider/SliderAppsViewController.java   |  4 ++
 .../slider/SliderAppsViewControllerImpl.java| 44 +---
 .../view/slider/rest/SliderAppsResource.java| 21 +-
 .../ambari/view/slider/rest/client/Metric.java  |  9 +++-
 4 files changed, 69 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cae2fc4d/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
index 93c63f2..64ab78c 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
@@ -20,6 +20,7 @@ package org.apache.ambari.view.slider;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.hadoop.yarn.exceptions.YarnException;
@@ -90,4 +91,7 @@ public interface SliderAppsViewController {
 
   public void thawApp(String appId) throws YarnException, IOException,
   InterruptedException;
+
+  public void flexApp(String appId, MapString, Integer componentsMap)
+  throws YarnException, IOException, InterruptedException;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cae2fc4d/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index f3c3087..5d6c368 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -26,7 +26,6 @@ import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -44,7 +43,6 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.filefilter.RegexFileFilter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.HdfsConfiguration;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
@@ -58,6 +56,7 @@ import org.apache.slider.api.ClusterDescription;
 import org.apache.slider.client.SliderClient;
 import org.apache.slider.common.SliderKeys;
 import org.apache.slider.common.params.ActionCreateArgs;
+import org.apache.slider.common.params.ActionFlexArgs;
 import org.apache.slider.common.params.ActionFreezeArgs;
 import org.apache.slider.common.params.ActionInstallPackageArgs;
 import org.apache.slider.common.params.ActionThawArgs;
@@ -250,10 +249,12 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
 ListSliderAppType appTypes = getSliderAppTypes(null);
 if (appTypes != null  appTypes.size()  0) {
   for (SliderAppType appType : appTypes) {
-logger.info(TYPE:  + appType.getTypeName() +
-+ app.getType());
-logger.info(VERSION:  + appType.getTypeVersion() +
-+ app.getAppVersion());
+if (logger.isDebugEnabled()) {
+  logger.debug(TYPE:  + appType.getTypeName() +
+  + app.getType());
+  logger.debug(VERSION:  + appType.getTypeVersion() +   
 
+  + app.getAppVersion());
+}
 if ((appType.getTypeName() != null  

[21/29] git commit: AMBARI-7343. Slider View: Flex app action should not have a confirmation dialog (alexantonenko)

2014-09-17 Thread jonathanhurley
AMBARI-7343. Slider View: Flex app action should not have a confirmation dialog 
(alexantonenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: fe890e9a98d3a2899ede69e07b61592b006a1503
Parents: e24eb5b
Author: Alex Antonenko hiv...@gmail.com
Authored: Tue Sep 16 22:14:35 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Tue Sep 16 22:16:00 2014 +0300

--
 .../src/main/resources/ui/app/controllers/slider_app_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe890e9a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 6558e87..2779a57 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -46,7 +46,7 @@ App.SliderAppController = Ember.ObjectController.extend({
   actions.push({
 title: 'Flex',
 action: 'flex',
-confirm: true
+confirm: false
   });
 }
 if ('FROZEN' === status) {



[07/29] git commit: AMBARI-7306. Can't save notes for config groups. (mpapirkovskyy)

2014-09-17 Thread jonathanhurley
AMBARI-7306. Can't save notes for config groups. (mpapirkovskyy)


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

Branch: refs/heads/branch-alerts-dev
Commit: 56e022e554f6775c2bce683cb28d28b5744eec07
Parents: 6457726
Author: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Authored: Mon Sep 15 19:33:02 2014 +0300
Committer: Myroslav Papirkovskyy mpapyrkovs...@hortonworks.com
Committed: Tue Sep 16 18:07:16 2014 +0300

--
 .../internal/ConfigGroupResourceProvider.java   | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/56e022e5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index 6e13d9c..46e9016 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -211,6 +211,20 @@ public class ConfigGroupResourceProvider extends
 return getRequestStatus(null);
   }
 
+  @Override
+  public SetString checkPropertyIds(SetString propertyIds) {
+//allow providing service_config_version_note, but we should not return it 
for config group
+SetString unsupportedPropertyIds = super.checkPropertyIds(propertyIds);
+for (IteratorString iterator = unsupportedPropertyIds.iterator(); 
iterator.hasNext(); ) {
+  String next = iterator.next();
+  next = PropertyHelper.getPropertyName(next);
+  if (next.equals(service_config_version_note) || 
next.equals(/service_config_version_note)) {
+iterator.remove();
+  }
+}
+return unsupportedPropertyIds;
+  }
+
   /**
* Create configuration group resources based on set of config group 
requests.
*
@@ -477,7 +491,8 @@ public class ConfigGroupResourceProvider extends
   configGroup.persist();
   cluster.addConfigGroup(configGroup);
   if (serviceName != null) {
-cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(), null, configGroup);
+cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(),
+  request.getServiceConfigVersionNote(), configGroup);
   } else {
 LOG.warn(Could not determine service name for config group {}, 
service config version not created,
 configGroup.getId());
@@ -569,7 +584,8 @@ public class ConfigGroupResourceProvider extends
 
   configGroup.persist();
   if (serviceName != null) {
-cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(), null, configGroup);
+cluster.createServiceConfigVersion(serviceName, 
getManagementController().getAuthName(),
+  request.getServiceConfigVersionNote(), configGroup);
   } else {
 LOG.warn(Could not determine service name for config group {}, 
service config version not created,
 configGroup.getId());



[05/29] git commit: AMBARI-7281. Slider View: App summary details shown differently than Ambari service summary. (onechiporenko)

2014-09-17 Thread jonathanhurley
AMBARI-7281. Slider View: App summary details shown differently than Ambari 
service summary. (onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 460ae9ed3026b0a6c9ec1ce0cb42394afe028087
Parents: 6457726
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Tue Sep 16 13:10:14 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Tue Sep 16 17:37:40 2014 +0300

--
 .../resources/ui/app/models/slider_app_component.js | 10 +-
 .../src/main/resources/ui/app/styles/application.less   | 12 
 .../resources/ui/app/templates/slider_app/summary.hbs   |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
index 8f4f584..2e999c1 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_app_component.js
@@ -36,7 +36,15 @@ App.SliderAppComponent = DS.Model.extend({
   /**
* @type {App.SliderApp}
*/
-  appId: DS.belongsTo('sliderApp')
+  appId: DS.belongsTo('sliderApp'),
+
+  /**
+   * Is component running (used in the templates)
+   * @type {bool}
+   */
+  isRunning: function() {
+return this.get('status') === 'Running';
+  }.property('status')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index b934a20..33f 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -555,6 +555,18 @@ a {
   text-align: right;
 }
   }
+  .panel-components {
+.status {
+  display: inline-block;
+  width: 25px;
+}
+.icon-ok-sign {
+  color: #5ab400;
+}
+.icon-warning-sign {
+  color: #ff;
+}
+  }
   .panel-link {
 margin-top: -5px;
 margin-right: -7px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/460ae9ed/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
index 5cb2cd1..68d47b4 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/summary.hbs
@@ -58,7 +58,7 @@
 tbody
   {{#each controller.model.components}}
   tr
-td{{componentName}}/td
+tdspan {{bind-attr 
class=isRunning:icon-ok-sign:icon-warning-sign :status}}/span 
{{componentName}}/td
 td{{host}}/td
   /tr
   {{/each}}



[13/29] git commit: AMBARI-7309 UI should issue separate requests for starting service and disabling MM. (ababiichuk)

2014-09-17 Thread jonathanhurley
AMBARI-7309 UI should issue separate requests for starting service and 
disabling MM. (ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 34ffd774c4c05ce98881f920e4b40af9b89a887f
Parents: f53e654
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Mon Sep 15 17:18:40 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Tue Sep 16 20:49:01 2014 +0300

--
 ambari-web/app/controllers/main/service/item.js | 36 +---
 .../app/utils/batch_scheduled_requests.js   |  2 +-
 2 files changed, 25 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34ffd774/ambari-web/app/controllers/main/service/item.js
--
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index edb524c..84d833f 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -157,20 +157,34 @@ App.MainServiceItemController = Em.Controller.extend({
 
 return App.showConfirmationFeedBackPopup(function(query, runMmOperation) {
   self.set('isPending', true);
-  self.startStopPopupPrimary(serviceHealth, query, runMmOperation);
+  self.startStopWithMmode(serviceHealth, query, runMmOperation);
 }, bodyMessage);
   },
 
-  startStopPopupPrimary: function (serviceHealth, query, runMmOperation) {
-var requestInfo = ;
-var turnOnMM = ON;
-if (serviceHealth == STARTED) {
-  turnOnMM = OFF;
-  requestInfo = 
App.BackgroundOperationsController.CommandContexts.START_SERVICE.format(this.get('content.serviceName'));
+
+  startStopWithMmode: function(serviceHealth, query, runMmOperation) {
+var self = this;
+if (runMmOperation) {
+  if (serviceHealth == STARTED) {
+this.startStopPopupPrimary(serviceHealth, query).complete(function() {
+  batchUtils.turnOnOffPassiveRequest(OFF, 
Em.I18n.t('passiveState.turnOff'), 
self.get('content.serviceName').toUpperCase());
+});
+  } else {
+batchUtils.turnOnOffPassiveRequest(ON, 
Em.I18n.t('passiveState.turnOn'), 
this.get('content.serviceName').toUpperCase()).complete(function() {
+  self.startStopPopupPrimary(serviceHealth, query);
+})
+  }
 } else {
-  requestInfo = 
App.BackgroundOperationsController.CommandContexts.STOP_SERVICE.format(this.get('content.serviceName'));
+  this.startStopPopupPrimary(serviceHealth, query);
 }
 
+  },
+
+  startStopPopupPrimary: function (serviceHealth, query) {
+var requestInfo = (serviceHealth == STARTED)
+? 
App.BackgroundOperationsController.CommandContexts.START_SERVICE.format(this.get('content.serviceName'))
+: 
App.BackgroundOperationsController.CommandContexts.STOP_SERVICE.format(this.get('content.serviceName'));
+
 var data = {
   'context': requestInfo,
   'serviceName': this.get('content.serviceName').toUpperCase(),
@@ -179,10 +193,8 @@ App.MainServiceItemController = Em.Controller.extend({
   },
   'query': query
 };
-if (runMmOperation) {
-  data.ServiceInfo.maintenance_state = turnOnMM;
-}
-App.ajax.send({
+
+return App.ajax.send({
   'name': 'common.service.update',
   'sender': this,
   'success': 'startStopPopupSuccessCallback',

http://git-wip-us.apache.org/repos/asf/ambari/blob/34ffd774/ambari-web/app/utils/batch_scheduled_requests.js
--
diff --git a/ambari-web/app/utils/batch_scheduled_requests.js 
b/ambari-web/app/utils/batch_scheduled_requests.js
index 1ee7c70..52bf0d8 100644
--- a/ambari-web/app/utils/batch_scheduled_requests.js
+++ b/ambari-web/app/utils/batch_scheduled_requests.js
@@ -266,7 +266,7 @@ module.exports = {
   },
 
   turnOnOffPassiveRequest: function(state, message, serviceName, callback) {
-App.ajax.send({
+return App.ajax.send({
   'name': 'common.service.passive',
   'sender': {
 'successCallback': callback || defaultSuccessCallback,



[27/29] git commit: AMBARI-7358 Configs: compare between host config group versions shows other props. (atkach)

2014-09-17 Thread jonathanhurley
AMBARI-7358 Configs: compare between host config group versions shows other 
props. (atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 0fb11d23e7c312aa34140ab7ecf3db5826a5e7ab
Parents: f63dd8a
Author: atkach atk...@hortonworks.com
Authored: Wed Sep 17 15:10:27 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Wed Sep 17 15:10:27 2014 +0300

--
 .../controllers/main/service/info/configs.js| 237 +--
 ambari-web/app/models/service_config.js |   1 +
 .../common/configs/compare_property.hbs |  30 +--
 .../common/configs/service_config_category.hbs  |   6 +-
 4 files changed, 192 insertions(+), 82 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0fb11d23/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 9fcdaaa..4411667 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -185,7 +185,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* @return {Boolean}
*/
   isVersionDefault: function(version) {
-return version  version.get('groupId') == -1;
+return (App.ServiceConfigVersion.find(this.get('content.serviceName') + 
_ + version).get('groupId') == -1);
   },
 
   /**
@@ -324,12 +324,11 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 var self = this;
 this.set('versionLoaded', false);
 version = version || this.get('currentDefaultVersion');
-var versionRecord = 
App.ServiceConfigVersion.find(this.get('content.serviceName') + _ + version);
 //version of non-default group require properties from current version of 
default group to correctly display page
-var versions = (this.isVersionDefault(versionRecord)) ? [version] : 
[this.get('currentDefaultVersion'), version];
+var versions = (this.isVersionDefault(version)) ? [version] : 
[this.get('currentDefaultVersion'), version];
 
 //if version from default group selected then switch to default group
-if (self.get('dataIsLoaded')  this.isVersionDefault(versionRecord)) {
+if (self.get('dataIsLoaded')  this.isVersionDefault(version)) {
   this.set('selectedConfigGroup', 
this.get('configGroups').findProperty('isDefault'));
 }
 
@@ -569,10 +568,16 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   loadCompareVersionConfigs: function (allConfigs) {
 var dfd = $.Deferred();
 var self = this;
-var compareServiceVersion = this.get('compareServiceVersion');
+var compareServiceVersions = [];
 
-if (compareServiceVersion) {
-  this.getCompareVersionConfigs(compareServiceVersion).done(function 
(json) {
+if (this.get('compareServiceVersion')) {
+  if 
(!this.isVersionDefault(this.get('compareServiceVersion').get('version'))) {
+compareServiceVersions = 
[this.get('compareServiceVersion').get('version'), this.get('selectedVersion')];
+  } else {
+compareServiceVersions = 
[this.get('compareServiceVersion').get('version')];
+  }
+
+  this.getCompareVersionConfigs(compareServiceVersions).done(function 
(json) {
 self.initCompareConfig(allConfigs, json);
 self.set('compareServiceVersion', null);
 self.set('isCompareMode', true);
@@ -597,76 +602,173 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   initCompareConfig: function(allConfigs, json) {
 var serviceVersionMap = {};
 var configNamesMap = {};
-var serviceName = json.items[0].service_name;
-var compareServiceVersion = this.get('compareServiceVersion');
+var serviceName = this.get('content.serviceName');
+var compareVersionNumber = 
this.get('compareServiceVersion').get('version');
+//indicate whether compared versions are from non-default group
+var compareNonDefaultVersions = (json.items.length  1);
 
+serviceVersionMap[compareVersionNumber] = {};
+if (compareNonDefaultVersions) {
+  serviceVersionMap[this.get('selectedVersion')] = {};
+}
 allConfigs.mapProperty('name').forEach(function(name) {
   configNamesMap[name] = true;
 });
 
-json.items[0].configurations.forEach(function (configuration) {
-  if (serviceName == 'YARN'  configuration.type == 'capacity-scheduler') 
{
-// put all properties in a single 

[12/29] git commit: AMBARI-7322. Admin View: update landing page content.(xiwang)

2014-09-17 Thread jonathanhurley
AMBARI-7322. Admin View: update landing page content.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 4770717db7e11d904aa59c7acbdaead2060720d4
Parents: f92c28e
Author: Xi Wang xiw...@apache.org
Authored: Mon Sep 15 18:18:55 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Tue Sep 16 10:43:02 2014 -0700

--
 .../app/scripts/controllers/mainCtrl.js | 13 +-
 .../resources/ui/admin-web/app/styles/main.css  | 42 +++-
 .../resources/ui/admin-web/app/views/main.html  | 41 ++-
 3 files changed, 92 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/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 6f68831..797ecb2 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
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('MainCtrl',['$scope', 'Auth', 'uiAlert', '$modal', 
function($scope, Auth, uiAlert, $modal) {
+.controller('MainCtrl',['$scope', 'Auth', 'uiAlert', '$modal', 'Cluster', 
function($scope, Auth, uiAlert, $modal, Cluster) {
   $scope.signOut = function() {
 Auth.signout().then(function() {
  window.location.pathname = ''; // Change location hard, because Angular 
works only with relative urls
@@ -39,4 +39,15 @@ angular.module('ambariAdminConsole')
   };
 
   $scope.currentUser = Auth.getCurrentUser();
+
+  $scope.cluster = null;
+  $scope.isLoaded = null;
+
+  Cluster.getStatus().then(function(cluster) {
+$scope.cluster = cluster;
+$scope.isLoaded = true;
+  }).catch(function(data) {
+  uiAlert.danger(data.status, data.message);
+  });
+
 }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 3d5628a..9b41f63 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -211,12 +211,49 @@
 }
 .mainpage .panel-body{
   padding: 20px;
-  height: 560px;
+  height: 620px;
 }
 .mainpage h1{
   font-size: 24px;
   margin-top: 10px;
 }
+.mainpage .panel-body #main-operations-boxes {
+  padding: 10px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail{
+  display: block;
+  height: 230px;
+  padding: 8px;
+  background-color: #ee;
+  margin-bottom: 20px;
+  margin-left: 20px;
+  margin-right: 10px;
+  border: none;
+  border-radius: 0px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .title,
+.mainpage .panel-body #main-operations-boxes .thumbnail .description,
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons {
+  text-align: center;
+  line-height: 1.5;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons .btn{
+  width: 200px;
+  margin: 5px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons 
.btn.userslist-button,
+.mainpage .panel-body #main-operations-boxes .thumbnail .buttons 
.btn.groupslist-button {
+  width: 100px;
+}
+.mainpage .panel-body #main-operations-boxes .thumbnail .glyphicon {
+  font-size: 50px;
+  text-align: center;
+  display: block;
+  line-height: 1.5;
+}
+.mainpage .panel-body #main-operations-boxes .col-sm-5 {
+  width: 43.5%;
+}
 
 .views-list-table .panel{
   border-radius: 0;
@@ -488,6 +525,9 @@
   .container{
 width: 1170px;
   }
+  .mainpage .panel-body #main-operations-boxes .col-sm-5 {
+width: 44%;
+  }
 }
 
 ul.nav li  a{

http://git-wip-us.apache.org/repos/asf/ambari/blob/4770717d/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
index a66eaf4..7785d2f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
@@ -18,7 +18,44 @@
 div 

[26/29] git commit: AMBARI-7356.When the user completes Install Wizard, mark Clusters.provisioning_state as INSTALLED. (akovalenko)

2014-09-17 Thread jonathanhurley
AMBARI-7356.When the user completes Install Wizard, mark 
Clusters.provisioning_state as INSTALLED. (akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: f63dd8a6eea79defd93837dbfc3011f42692ae91
Parents: e033815
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Wed Sep 17 14:06:44 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Wed Sep 17 14:06:44 2014 +0300

--
 ambari-web/app/controllers/installer.js | 15 +
 ambari-web/app/models/cluster_states.js |  1 -
 ambari-web/app/router.js| 84 
 ambari-web/app/routes/installer.js  | 12 ++--
 ambari-web/app/utils/ajax/ajax.js   | 17 +-
 5 files changed, 84 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f63dd8a6/ambari-web/app/controllers/installer.js
--
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index e45eaee..d933e9a 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -745,6 +745,21 @@ App.InstallerController = App.WizardController.extend({
 App.router.get('applicationController').postUserPref(persists, true);
   },
 
+  /**
+   * Save cluster provisioning state to the server
+   * @param state cluster provisioning state
+   * @param callback is called after request completes
+   */
+  setClusterProvisioningState: function (state, callback) {
+App.ajax.send({
+  name: 'cluster.save_provisioning_state',
+  sender: this,
+  data: {
+state: state
+  }
+}).complete(callback());
+  },
+
   setStepsEnable: function () {
 for (var i = 0; i = this.totalSteps; i++) {
   var step = this.get('isStepDisabled').findProperty('step', i);

http://git-wip-us.apache.org/repos/asf/ambari/blob/f63dd8a6/ambari-web/app/models/cluster_states.js
--
diff --git a/ambari-web/app/models/cluster_states.js 
b/ambari-web/app/models/cluster_states.js
index 49760d6..95c1444 100644
--- a/ambari-web/app/models/cluster_states.js
+++ b/ambari-web/app/models/cluster_states.js
@@ -108,7 +108,6 @@ App.clusterStatus = Em.Object.create(App.UserPref, {
* @method updateFromServer
*/
   updateFromServer: function (overrideLocaldb) {
-// if overrideLocaldb is undefined, set it to true
 this.set('additionalData', {
   user: App.db.getUser(),
   login: App.db.getLoginName(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/f63dd8a6/ambari-web/app/router.js
--
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 18203f2..bbc06dd 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -29,6 +29,12 @@ App.Router = Em.Router.extend({
   enableLogging: true,
   isFwdNavigation: true,
   backBtnForHigherStep: false,
+
+  /**
+   * Is true, if cluster.provisioning_state is equal to 'INSTALLED'
+   * @type {Boolean}
+   */
+  clusterInstallCompleted: false,
   /**
* user prefered path to route
*/
@@ -119,6 +125,9 @@ App.Router = Em.Router.extend({
 
   onAuthenticationSuccess: function (data) {
 this.set('loggedIn', true);
+if (data.items.length) {
+  this.set('clusterInstallCompleted', 
data.items[0].Clusters.provisioning_state === 'INSTALLED');
+}
   },
 
   onAuthenticationError: function (data) {
@@ -265,7 +274,7 @@ App.Router = Em.Router.extend({
   App.usersMapper.map({items: [loginData]});
   router.setUserLoggedIn(params.loginName);
   var permissionList = 
privileges.items.mapProperty('PrivilegeInfo.permission_name');
-  var isAdmin = permissionList.indexOf('AMBARI.ADMIN')  -1;
+  var isAdmin = permissionList.contains('AMBARI.ADMIN');
   var transitionToApp = false;
   if (isAdmin) {
 App.set('isAdmin', true);
@@ -277,14 +286,15 @@ App.Router = Em.Router.extend({
 }
   } else {
 if (clustersData.items.length) {
+  this.set('clusterInstallCompleted', 
clustersData.items[0].Clusters.provisioning_state === 'INSTALLED');
   //TODO: Iterate over clusters
   var clusterName = clustersData.items[0].Clusters.cluster_name;
   var clusterPermissions = 
privileges.items.filterProperty('PrivilegeInfo.cluster_name', 
clusterName).mapProperty('PrivilegeInfo.permission_name');
-  if (clusterPermissions.indexOf('CLUSTER.OPERATE')  -1) {
+  if 

[25/29] git commit: AMBARI-7334. Slider View: Show view name along with hover of view properties - fixes (srimanth)

2014-09-17 Thread jonathanhurley
AMBARI-7334. Slider View: Show view name along with hover of view properties - 
fixes (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: e033815cc723900ef52884439634e5732f7eabc0
Parents: cae2fc4
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Tue Sep 16 22:28:24 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Tue Sep 16 22:28:24 2014 -0700

--
 .../main/resources/ui/app/controllers/slider_controller.js   | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e033815c/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 51fd057..5eb323d 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -100,10 +100,12 @@ App.SliderController = 
Ember.Controller.extend(App.RunPeriodically, {
   getParametersFromViewPropertiesSuccessCallback: function(data) {
 var properties = Em.get(data, 'ViewInstanceInfo.properties'),
   initialValuesToLoad = this.get('initialValuesToLoad');
-if (Em.isEmpty(properties)) {
+if (properties == null || properties['hdfs.address'] == null
+|| properties['yarn.resourcemanager.address'] == null
+|| properties['yarn.resourcemanager.scheduler.address'] == null
+|| properties['zookeeper.quorum'] == null) {
   this.getClusterName();
-}
-else {
+} else {
   initialValuesToLoad.setProperties({
 ambariAddress: location.protocol + // + document.location.host,
 hdfsAddress: properties['hdfs.address'],



[04/34] git commit: AMBARI-7363 Recommendations: ui changes for usability. (ababiichuk)

2014-09-18 Thread jonathanhurley
AMBARI-7363 Recommendations: ui changes for usability. (ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 4bcf111f1f8539df666fbe3d9c41609547d4e5b3
Parents: c46d491
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Sep 17 17:33:03 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Sep 17 17:56:20 2014 +0300

--
 .../controllers/main/service/info/configs.js|  5 +++
 .../app/controllers/wizard/step7_controller.js  |  5 +++
 ambari-web/app/messages.js  |  3 +-
 ambari-web/app/mixins/common/serverValidator.js |  1 +
 ambari-web/app/styles/application.less  |  5 +++
 .../configs/config_recommendation_popup.hbs | 35 ++--
 .../wizard/step6/step6_issues_popup.hbs | 44 ++--
 7 files changed, 73 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4bcf111f/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 4411667..32343ff 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -146,6 +146,11 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   attributeName: 'isValid',
   attributeValue: false,
   caption: 'common.combobox.dropdown.issues'
+},
+{
+  attributeName: 'warn',
+  attributeValue: true,
+  caption: 'common.combobox.dropdown.warnings'
 }
   ],
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4bcf111f/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 8afc87d..55c83ff 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -220,6 +220,11 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, {
   attributeName: 'isValid',
   attributeValue: false,
   caption: 'common.combobox.dropdown.issues'
+},
+{
+  attributeName: 'warn',
+  attributeValue: true,
+  caption: 'common.combobox.dropdown.warnings'
 }
   ],
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4bcf111f/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 7379220..d1f7afd 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -658,7 +658,7 @@ Em.I18n.translations = {
   'installer.step7.popup.validation.request.failed.body': 'Config validaition 
failed.',
   'installer.step7.popup.validation.warning.header': 'Configurations',
   'installer.step7.popup.validation.warning.body': 'Some service 
configurations are not configured properly. We recommend you review and change 
the highlighted configuration values. Are you sure you want to proceed without 
correcting configurations?',
-
+  'installer.step7.popup.validation.warning.errorDescription': ' value is less 
than the recommended default of ',
   'installer.step7.oozie.database.new': 'New Derby Database',
   'installer.step7.hive.database.new': 'New MySQL Database',
 
@@ -2263,6 +2263,7 @@ Em.I18n.translations = {
   'common.combobox.dropdown.final': 'Final properties',
   'common.combobox.dropdown.changed': 'Changed properties',
   'common.combobox.dropdown.issues': 'Show property issues',
+  'common.combobox.dropdown.warnings': 'Show property warnings',
 
   'quick.links.error.label': 'Hostname is undefined',
   'quick.links.publicHostName': '{0} ({1})',

http://git-wip-us.apache.org/repos/asf/ambari/blob/4bcf111f/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 bea7bd7..8d551f8 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -274,6 +274,7 @@ App.ServerValidatorMixin = Em.Mixin.create({
   // Motivation: for server-side validation warnings and EVEN errors allow 
user to continue wizard
   return App.ModalPopup.show({
 header: Em. 

[31/34] git commit: AMBARI-7388 Configs: no hover on SCV when viewing non-current version. (ababiichuk)

2014-09-18 Thread jonathanhurley
AMBARI-7388 Configs: no hover on SCV when viewing non-current version. 
(ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 4c69d631e9c90805405b17da97c787725325bdef
Parents: 8b682da
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Sep 18 17:09:17 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Sep 18 17:09:17 2014 +0300

--
 ambari-web/app/styles/application.less  |  2 +-
 .../common/configs/config_history_flow.hbs  | 36 +
 .../common/configs/service_version_box.hbs  | 53 
 .../views/common/configs/config_history_flow.js | 22 
 4 files changed, 77 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4c69d631/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 235dbc1..0420804 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4996,7 +4996,7 @@ ul.inline li {
 margin: 5px 0;
 .flow-element {
   width: 18.5%;
-  height: 100%;
+  height: 58px;
   .version-box {
 position: relative;
 height: 90%;

http://git-wip-us.apache.org/repos/asf/ambari/blob/4c69d631/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 efc452f..6904615 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -22,41 +22,7 @@
 div {{bindAttr class=:icon-chevron-box :pull-left 
view.showLeftArrow::hide}} {{action shiftBack target=view}} 
data-toggle=arrow-tooltip
   {{translateAttr 
data-original-title=services.service.config.configHistory.leftArrow.tooltip}}i
 class=icon-chevron-left icon-3x/i/div
 {{#each serviceVersion in view.visibleServiceVersion}}
-  div {{bindAttr class=:flow-element :pull-left 
serviceVersion.first:first}}
-div class=arrow-box pull-lefti class=icon-arrow-right 
icon-3x/i/div
-div class=version-box
-  div {{bindAttr class=:version-info :box :pull-right 
serviceVersion.isDisplayed:displayed serviceVersion.isDisabled:grayedOut}} 
{{action switchVersion serviceVersion target=view}}
-div class=top-label
-  span class=label 
label-info{{serviceVersion.versionText}}/span
-  span class=author pull-right{{serviceVersion.author}}/span
-/div
-div class=content{{serviceVersion.timeSinceCreated}}/div
-{{#if serviceVersion.isCurrent}}
-  div class=current-label
-span class=label label-success
-  {{t common.current}}
-  i {{bindAttr class=:icon-refresh :restart-required-service 
serviceVersion.isRestartRequired::hidden}}/i
-/span
-  /div
-{{/if}}
-  /div
-
-  div class=version-popover
-div class=content 
strong{{serviceVersion.displayName}}/strong span class=label 
label-info{{serviceVersion.versionText}}/span nbsp;
-  strong{{t 
services.service.config.configHistory.configGroup}}:{{serviceVersion.configGroupName}}/strong
-  div class=date{{serviceVersion.createdDate}}/div
-  div class=notes{{serviceVersion.notes}}/div
-/div
-div class=version-operations-buttons
-button {{bindAttr 
disabled=serviceVersion.disabledActionAttr.view class=:btn 
serviceVersion.isDisplayed:not-allowed-cursor 
title=serviceVersion.disabledActionMessages.view}} {{action switchVersion 
serviceVersion target=view}}i class=icon-search/inbsp;{{t 
common.view}}/button
-{{#if App.isManager}}
-button {{bindAttr 
disabled=serviceVersion.disabledActionAttr.compare class=:btn 
serviceVersion.isDisplayed:not-allowed-cursor 
title=serviceVersion.disabledActionMessages.compare}} {{action compare 
serviceVersion target=view}}i class=icon-copy/inbsp;{{t 
common.compare}}/button
-button {{bindAttr 
disabled=serviceVersion.disabledActionAttr.revert class=:btn 
serviceVersion.isCurrent:not-allowed-cursor 
title=serviceVersion.disabledActionMessages.revert}} {{action revert 
serviceVersion target=view}}{{t 

[30/34] git commit: AMBARI-7387. on 2.2.* Stack hive service check fails, because webhcat is not yet started (aonishuk)

2014-09-18 Thread jonathanhurley
AMBARI-7387. on 2.2.* Stack hive service check fails, because webhcat is not 
yet started (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 8b682da4b80ea7ae1ca1913c979e4f3983ded807
Parents: fd0b582
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Sep 18 16:46:25 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Sep 18 16:46:25 2014 +0300

--
 .../src/main/resources/stacks/HDP/2.2.1/role_command_order.json| 2 +-
 .../src/main/resources/stacks/HDP/2.2/role_command_order.json  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8b682da4/ambari-server/src/main/resources/stacks/HDP/2.2.1/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2.1/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.2.1/role_command_order.json
index b97a31a..06eb527 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2.1/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2.1/role_command_order.json
@@ -28,7 +28,7 @@
 OOZIE_SERVICE_CHECK-SERVICE_CHECK: [OOZIE_SERVER-START],
 WEBHCAT_SERVICE_CHECK-SERVICE_CHECK: [WEBHCAT_SERVER-START],
 HBASE_SERVICE_CHECK-SERVICE_CHECK: [HBASE_MASTER-START, 
HBASE_REGIONSERVER-START],
-HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START],
+HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START, WEBHCAT_SERVER-START],
 HCAT_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START],
 PIG_SERVICE_CHECK-SERVICE_CHECK: [NODEMANAGER-START, 
RESOURCEMANAGER-START],
 SQOOP_SERVICE_CHECK-SERVICE_CHECK: [NODEMANAGER-START, 
RESOURCEMANAGER-START],

http://git-wip-us.apache.org/repos/asf/ambari/blob/8b682da4/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json
index a6f3e07..4144361 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json
@@ -29,7 +29,7 @@
 OOZIE_SERVICE_CHECK-SERVICE_CHECK: [OOZIE_SERVER-START],
 WEBHCAT_SERVICE_CHECK-SERVICE_CHECK: [WEBHCAT_SERVER-START],
 HBASE_SERVICE_CHECK-SERVICE_CHECK: [HBASE_MASTER-START, 
HBASE_REGIONSERVER-START],
-HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START],
+HIVE_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START, 
HIVE_METASTORE-START, WEBHCAT_SERVER-START],
 HCAT_SERVICE_CHECK-SERVICE_CHECK: [HIVE_SERVER-START],
 PIG_SERVICE_CHECK-SERVICE_CHECK: [NODEMANAGER-START, 
RESOURCEMANAGER-START],
 SQOOP_SERVICE_CHECK-SERVICE_CHECK: [NODEMANAGER-START, 
RESOURCEMANAGER-START],



[20/34] git commit: AMBARI-7378. Completely hide System Views from all of UI (Admin View, Ambari Web). (yusaku)

2014-09-18 Thread jonathanhurley
AMBARI-7378. Completely hide System Views from all of UI (Admin View, Ambari 
Web). (yusaku)


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

Branch: refs/heads/branch-alerts-dev
Commit: 7a087b1860ab80bbce5d3574e08068042b63d530
Parents: 0cec52d
Author: Yusaku Sako yus...@hortonworks.com
Authored: Wed Sep 17 17:21:49 2014 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Wed Sep 17 17:21:49 2014 -0700

--
 .../src/main/resources/ui/admin-web/app/scripts/services/View.js  | 3 ++-
 ambari-web/app/utils/ajax/ajax.js | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a087b18/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
index 960ac87..e30dcf3 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
@@ -245,7 +245,8 @@ angular.module('ambariAdminConsole')
   method: 'GET',
   url: Settings.baseUrl + '/views',
   params:{
-'fields': fields.join(',')
+'fields': fields.join(','),
+'versions/ViewVersionInfo/system': false
   }
 }).success(function(data) {
   var views = [];

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a087b18/ambari-web/app/utils/ajax/ajax.js
--
diff --git a/ambari-web/app/utils/ajax/ajax.js 
b/ambari-web/app/utils/ajax/ajax.js
index 4342195..c2a971d 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1728,7 +1728,7 @@ var urls = {
* Get all instances of all views across versions
*/
   'views.instances': {
-'real': 
'/views?fields=versions/instances/ViewInstanceInfo,versions/ViewVersionInfo/label',
+'real': 
'/views?fields=versions/instances/ViewInstanceInfo,versions/ViewVersionInfo/labelversions/ViewVersionInfo/system=false',
 'mock': '/data/views/instances.json'
   },
   'host.host_component.flume.metrics': {



[15/34] git commit: AMBARI-7371. Admin View : Set systemtrue/system in view.xml. (jaimin)

2014-09-18 Thread jonathanhurley
AMBARI-7371. Admin View : Set systemtrue/system in view.xml. (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: 372514d904d935a8220dfbdc261c1825c1431ead
Parents: 9efa63d
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Wed Sep 17 13:57:18 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Wed Sep 17 13:57:18 2014 -0700

--
 ambari-admin/src/main/resources/view.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/372514d9/ambari-admin/src/main/resources/view.xml
--
diff --git a/ambari-admin/src/main/resources/view.xml 
b/ambari-admin/src/main/resources/view.xml
index c618a8a..9bb4d8e 100644
--- a/ambari-admin/src/main/resources/view.xml
+++ b/ambari-admin/src/main/resources/view.xml
@@ -18,6 +18,7 @@ limitations under the License. Kerberos, LDAP, Custom. 
Binary/Htt
   nameADMIN_VIEW/name
   labelAmbari Admin View/label
   version1.0.0/version
+  systemtrue/system
   instance
 nameINSTANCE/name
 visiblefalse/visible



[16/34] git commit: AMBARI-7374. Slider View: BE - Provide alerts in view API

2014-09-18 Thread jonathanhurley
AMBARI-7374. Slider View: BE - Provide alerts in view API


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

Branch: refs/heads/branch-alerts-dev
Commit: 2a5759c5d39fbb70db2b4549bb6cee49601c86d9
Parents: 372514d
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Wed Sep 17 15:01:59 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Wed Sep 17 15:01:59 2014 -0700

--
 .../apache/ambari/view/slider/AlertField.java   |  62 ++
 .../apache/ambari/view/slider/AlertState.java   |  40 +++
 .../apache/ambari/view/slider/SliderApp.java|   9 ++
 .../ambari/view/slider/SliderAppsAlerts.java| 120 +++
 .../slider/SliderAppsViewControllerImpl.java|   9 +-
 .../rest/client/SliderAppMasterClient.java  |  38 +++---
 6 files changed, 257 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5759c5/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertField.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertField.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertField.java
new file mode 100644
index 000..40fd97f
--- /dev/null
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertField.java
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.view.slider;
+
+public enum AlertField {
+  /**
+   * Description of a service
+   */
+  description,
+  /**
+   * Host name where to which service belongs
+   */
+  host_name,
+  /**
+   * Last status
+   */
+  last_status,
+  /**
+   * Time when last status was checked
+   */
+  last_status_time,
+  /**
+   * Service
+   */
+  service_name,
+  /**
+   * Component name
+   */
+  component_name,
+  /**
+   * Same, as actual_status and last_status
+   */
+  status,
+  /**
+   * Time when status was checked
+   */
+  status_time,
+  /**
+   * Not yet used, for future purpose
+   */
+  output,
+  /**
+   * Same, as status and last_status
+   */
+  actual_status
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5759c5/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertState.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertState.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertState.java
new file mode 100644
index 000..d239394
--- /dev/null
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/AlertState.java
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.view.slider;
+
+
+public enum AlertState {
+  /**
+   * Alert does not need to be distributed.  Normal Operation.
+   */
+  OK,
+  /**
+   * Alert indicates there may be an issue.  The component may be operating
+   * normally but may be in danger of becoming codeCRITICAL/code.
+   */
+  WARNING,
+  /**
+   * Indicates there 

[34/34] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-18 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev

Conflicts:

ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java


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

Branch: refs/heads/branch-alerts-dev
Commit: f1018b176a64451c2d62fcd3e2f5238e4587ab02
Parents: a4e97aa 5fc5828
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu Sep 18 10:43:23 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu Sep 18 10:43:23 2014 -0400

--
 .../ui/admin-web/app/scripts/services/View.js   |  19 +--
 .../resources/ui/admin-web/app/styles/main.css  |  87 ++
 .../app/views/ambariViews/listTable.html|  19 ++-
 ambari-admin/src/main/resources/view.xml|   1 +
 .../resource_management/TestCopyFromLocal.py|   8 +-
 .../ambari/groovy/client/AmbariClient.groovy|   7 +-
 .../libraries/providers/copy_from_local.py  |  12 +-
 .../libraries/resources/copy_from_local.py  |   3 +-
 .../server/api/util/StackExtensionHelper.java   |   9 +-
 .../internal/ClientConfigResourceProvider.java  |  35 +++-
 .../server/orm/entities/AlertNoticeEntity.java  |  51 --
 .../ambari/server/state/ConfigHelper.java   |  21 ++-
 .../server/state/cluster/ClusterImpl.java   |   3 +-
 .../server/upgrade/UpgradeCatalog161.java   |   1 -
 .../server/upgrade/UpgradeCatalog170.java   |  28 +++-
 .../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 |   7 +-
 .../services/HDFS/configuration/hadoop-env.xml  |   2 +-
 .../GANGLIA/configuration/ganglia-env.xml   |   5 +
 .../GANGLIA/package/scripts/ganglia_monitor.py  |   4 +-
 .../services/GANGLIA/package/scripts/params.py  |  24 +--
 .../HIVE/package/scripts/install_jars.py|  28 ++--
 .../services/HIVE/package/scripts/params.py |  11 +-
 .../services/NAGIOS/package/files/sys_logger.py |  30 ++--
 .../stacks/HDP/2.2.1/role_command_order.json|   2 +-
 .../services/TEZ/configuration/tez-site.xml |  29 
 .../stacks/HDP/2.2/role_command_order.json  |   3 +-
 .../SLIDER/configuration/slider-client.xml  |  56 +++
 .../SLIDER/configuration/slider-log4j.xml   |  89 ++
 .../stacks/HDP/2.2/services/SLIDER/metainfo.xml |  72 
 .../SLIDER/package/files/hbaseSmokeVerify.sh|  34 
 .../services/SLIDER/package/scripts/__init__.py |  19 +++
 .../services/SLIDER/package/scripts/params.py   |  45 +
 .../SLIDER/package/scripts/service_check.py |  45 +
 .../services/SLIDER/package/scripts/slider.py   |  68 
 .../SLIDER/package/scripts/slider_client.py |  43 +
 .../SLIDER/package/templates/slider-wrapper.j2  |  42 +
 .../2.2/services/TEZ/configuration/tez-site.xml |  29 
 .../ClientConfigResourceProviderTest.java   |  24 ++-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |   1 +
 .../server/upgrade/UpgradeCatalog161Test.java   |   4 -
 .../server/upgrade/UpgradeCatalog170Test.java   | 114 ++---
 .../stacks/2.0.6/HIVE/test_hive_server.py   |   3 +-
 .../stacks/2.2/SLIDER/test_slider_client.py | 109 +
 .../test/python/stacks/2.2/configs/default.json | 115 +
 .../test/python/stacks/2.2/configs/secured.json |  79 +
 ambari-shell/ambari-groovy-shell/pom.xml|  11 ++
 .../ambari/shell/commands/ConfigCommands.java   | 163 +++
 .../shell/completion/AbstractCompletion.java|  34 
 .../ambari/shell/completion/Blueprint.java  |   9 +-
 .../ambari/shell/completion/ConfigType.java |  29 
 .../apache/ambari/shell/completion/Host.java|   9 +-
 .../apache/ambari/shell/completion/Service.java |  12 +-
 .../configuration/ConverterConfiguration.java   |   6 +
 .../shell/converter/AbstractConverter.java  |  63 +++
 .../shell/converter/BlueprintConverter.java |  21 +--
 .../shell/converter/ConfigTypeConverter.java|  45 +
 .../ambari/shell/converter/HostConverter.java   |  21 +--
 .../shell/converter/ServiceConverter.java   |  24 +--
 .../shell/commands/ConfigCommandsTest.java  |  98 +++
 .../src/test/resources/core-site.xml|  13 ++
 ambari-web/app/controllers/application.js   |   8 +-
 ambari-web/app/controllers/main.js  |   1 -
 .../resourceManager/wizard_controller.js|   1 -
 ambari-web/app/controllers/main/host/details.js |   9 +-
 .../controllers/main/service/info/configs.js|  42 +++--
 .../main/service/reassign/step2_controller.js   |   1 +
 .../app/controllers/main/views_controller.js|   6 +-
 

[11/34] git commit: AMBARI-7367 Config History filter by date custom throws JS. (ababiichuk)

2014-09-18 Thread jonathanhurley
AMBARI-7367 Config History filter by date custom throws JS. (ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: b4e1aed4a7e3b67e48eb330e518786c3a24a07d8
Parents: 117b455
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Wed Sep 17 19:26:46 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Wed Sep 17 19:26:46 2014 +0300

--
 .../app/templates/common/custom_date_popup.hbs  | 39 
 ambari-web/app/views.js |  1 +
 .../app/views/common/select_custom_date_view.js | 36 ++
 3 files changed, 76 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4e1aed4/ambari-web/app/templates/common/custom_date_popup.hbs
--
diff --git a/ambari-web/app/templates/common/custom_date_popup.hbs 
b/ambari-web/app/templates/common/custom_date_popup.hbs
new file mode 100644
index 000..04c4560
--- /dev/null
+++ b/ambari-web/app/templates/common/custom_date_popup.hbs
@@ -0,0 +1,39 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* License); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+div class=jobs-custom-dates
+  div
+label{{t jobs.customDateFilter.startTime}}/label
+{{view Ember.TextField 
valueBinding=controller.customDateFormFields.startDate class=input-small 
datepicker}}
+{{view Ember.Select contentBinding=view.hourOptions 
selectionBinding=controller.customDateFormFields.hoursForStart 
class=input-mini}}
+{{view Ember.Select contentBinding=view.minuteOptions 
selectionBinding=controller.customDateFormFields.minutesForStart 
class=input-mini}}
+{{view Ember.Select contentBinding=view.middayPeriodOptions 
selectionBinding=controller.customDateFormFields.middayPeriodForStart 
class=input-mini}}
+span 
class=help-inline{{controller.filterObject.errorMessages.startDate}}/span
+  /div
+  div
+
+  /div
+  div
+label{{t jobs.customDateFilter.endTime}}/label
+{{view Ember.TextField 
valueBinding=controller.customDateFormFields.endDate class=input-small 
datepicker}}
+{{view Ember.Select contentBinding=view.hourOptions 
selectionBinding=controller.customDateFormFields.hoursForEnd 
class=input-mini}}
+{{view Ember.Select contentBinding=view.minuteOptions 
selectionBinding=controller.customDateFormFields.minutesForEnd 
class=input-mini}}
+{{view Ember.Select contentBinding=view.middayPeriodOptions 
selectionBinding=controller.customDateFormFields.middayPeriodForEnd 
class=input-mini}}
+span 
class=help-inline{{controller.filterObject.errorMessages.endDate}}/span
+  /div
+/div

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4e1aed4/ambari-web/app/views.js
--
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index baaee39..12b2683 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -26,6 +26,7 @@ require('views/common/chart/linear');
 require('views/common/chart/linear_time');
 require('views/common/modal_popup');
 require('views/common/rolling_restart_view');
+require('views/common/select_custom_date_view');
 require('views/common/metric');
 require('views/common/time_range');
 require('views/common/form/field');

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4e1aed4/ambari-web/app/views/common/select_custom_date_view.js
--
diff --git a/ambari-web/app/views/common/select_custom_date_view.js 
b/ambari-web/app/views/common/select_custom_date_view.js
new file mode 100644
index 000..55da7fd
--- /dev/null
+++ b/ambari-web/app/views/common/select_custom_date_view.js
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for 

[09/34] git commit: AMBARI-7333. Tez deployment changes for Champlain (aonishuk)

2014-09-18 Thread jonathanhurley
AMBARI-7333. Tez deployment changes for Champlain (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 0449d22238aedc5c6fe5489b40e58d01f0a9caf1
Parents: 6952fa4
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Wed Sep 17 18:49:09 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Wed Sep 17 18:49:09 2014 +0300

--
 .../stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0449d222/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
index fd8945f..ab86ff7 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
@@ -222,7 +222,8 @@ if System.get_instance().os_family == ubuntu:
   mysql_configname = '/etc/mysql/my.cnf'
 else:
   mysql_configname = '/etc/my.cnf'
-  
+
+tez_tar_file = /usr/lib/tez/tez*.tar.gz
 
 # Hive security
 hive_authorization_enabled = 
config['configurations']['hive-site']['hive.security.authorization.enabled']



[33/34] git commit: AMBARI-7389 - Alerts: Add UUID Column for AlertNotice (jonathanhurley)

2014-09-18 Thread jonathanhurley
AMBARI-7389 - Alerts: Add UUID Column for AlertNotice (jonathanhurley)


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

Branch: refs/heads/branch-alerts-dev
Commit: 5fc58284f1f286c5b5eaa8d5d40ac240ec0f8aa3
Parents: bf0f4a9
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu Sep 18 10:21:17 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu Sep 18 10:42:39 2014 -0400

--
 .../server/orm/entities/AlertNoticeEntity.java  |  51 +++--
 .../server/upgrade/UpgradeCatalog170.java   |  96 +---
 .../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/orm/dao/AlertDefinitionDAOTest.java  |   9 +-
 .../server/upgrade/UpgradeCatalog170Test.java   | 110 +++
 8 files changed, 215 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5fc58284/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
index af541cd..c9470ce 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java
@@ -17,6 +17,7 @@
  */
 package org.apache.ambari.server.orm.entities;
 
+import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EnumType;
@@ -38,7 +39,7 @@ import org.apache.ambari.server.state.NotificationState;
  * notification to an {@link AlertTargetEntity}. There are three
  * {@link NotificationState}s that a single notice can exist in. These 
instances
  * are persisted indefinitely for historical reference.
- * 
+ *
  */
 @Entity
 @Table(name = alert_notice)
@@ -57,6 +58,10 @@ public class AlertNoticeEntity {
   @Column(name = notify_state, nullable = false, length = 255)
   private NotificationState notifyState;
 
+  @Basic
+  @Column(nullable = false, length = 64)
+  private String uuid;
+
   /**
* Bi-directional many-to-one association to {@link AlertHistoryEntity}.
*/
@@ -79,7 +84,7 @@ public class AlertNoticeEntity {
 
   /**
* Gets the unique ID for this alert notice.
-   * 
+   *
* @return the ID (never {@code null}).
*/
   public Long getNotificationId() {
@@ -88,7 +93,7 @@ public class AlertNoticeEntity {
 
   /**
* Sets the unique ID for this alert notice.
-   * 
+   *
* @param notificationId
*  the ID (not {@code null}).
*/
@@ -100,7 +105,7 @@ public class AlertNoticeEntity {
* Gets the notification state for this alert notice. Alert notices are
* pending until they are processed, after which they will either be
* successful or failed.
-   * 
+   *
* @return the notification state (never {@code null}).
*/
   public NotificationState getNotifyState() {
@@ -109,7 +114,7 @@ public class AlertNoticeEntity {
 
   /**
* Sets the notification state for this alert notice.
-   * 
+   *
* @param notifyState
*  the notification state (not {@code null}).
*/
@@ -118,8 +123,27 @@ public class AlertNoticeEntity {
   }
 
   /**
+   * Gets the unique ID for this alert notice.
+   *
+   * @return the unique ID (never {@code null}).
+   */
+  public String getUuid() {
+return uuid;
+  }
+
+  /**
+   * Sets the unique ID for this alert notice.
+   *
+   * @param uuid
+   *  the unique ID (not {@code null}).
+   */
+  public void setUuid(String uuid) {
+this.uuid = uuid;
+  }
+
+  /**
* Gets the associated alert history entry for this alert notice.
-   * 
+   *
* @return the historical event that traiggered this notice's creation (never
* {@code null}).
*/
@@ -129,7 +153,7 @@ public class AlertNoticeEntity {
 
   /**
* Sets the associated alert history entry for this alert notice.
-   * 
+   *
* @param alertHistory
*  the historical event that traiggered this notice's creation (not
*  {@code null}).
@@ -140,7 +164,7 @@ public class AlertNoticeEntity {
 
   /**
* Gets the intended audience for the notification.
-   * 
+   *
* @return the recipient of this notification (never {@code null}).
*/
   public AlertTargetEntity getAlertTarget() {
@@ -149,7

[02/34] git commit: AMBARI-7318. ClusterHostInfo host indexes should be hostnames in download client configs (dlysnichenko)

2014-09-18 Thread jonathanhurley
AMBARI-7318. ClusterHostInfo host indexes should be hostnames in download 
client configs (dlysnichenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: d6a4a68d0fbf0d076b201e4b4d635330dab530b8
Parents: ac290e2
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Wed Sep 17 16:54:31 2014 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Wed Sep 17 16:54:31 2014 +0300

--
 .../internal/ClientConfigResourceProvider.java  | 35 ++--
 .../ClientConfigResourceProviderTest.java   | 24 ++
 2 files changed, 49 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6a4a68d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 366b5e1..34f4d6f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -18,7 +18,6 @@
 package org.apache.ambari.server.controller.internal;
 
 import com.google.gson.Gson;
-import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
 import com.google.inject.assistedinject.AssistedInject;
 import com.google.inject.persist.Transactional;
@@ -213,6 +212,7 @@ public class ClientConfigResourceProvider extends 
AbstractControllerResourceProv
   clusterHostInfo = 
StageUtils.getClusterHostInfo(managementController.getClusters().getHostsForCluster(cluster.getClusterName()),
 cluster);
   serviceInfo = 
managementController.getAmbariMetaInfo().getServiceInfo(stackId.getStackName(),
   stackId.getStackVersion(), serviceName);
+  clusterHostInfo = substituteHostIndexes(clusterHostInfo);
   osFamily = clusters.getHost(hostName).getOsFamily();
 
   TreeMapString, String hostLevelParams = new TreeMapString, String();
@@ -248,11 +248,11 @@ public class ClientConfigResourceProvider extends 
AbstractControllerResourceProv
   }
   String packageList = gson.toJson(packages);
   hostLevelParams.put(PACKAGE_LIST, packageList);
-  
+
   SetString userSet = 
configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.USER, 
cluster);
   String userList = gson.toJson(userSet);
   hostLevelParams.put(USER_LIST, userList);
-  
+
   SetString groupSet = 
configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.GROUP, 
cluster);
   String groupList = gson.toJson(groupSet);
   hostLevelParams.put(GROUP_LIST, groupList);
@@ -324,6 +324,35 @@ public class ClientConfigResourceProvider extends 
AbstractControllerResourceProv
 return resources;
   }
 
+  private static MapString, SetString substituteHostIndexes(MapString, 
SetString clusterHostInfo) throws SystemException {
+SetString keysToSkip = new HashSetString(Arrays.asList(all_hosts, 
all_ping_ports,
+ambari_server_host));
+String[] allHosts = {};
+if (clusterHostInfo.get(all_hosts) != null) {
+  allHosts = clusterHostInfo.get(all_hosts).toArray(new 
String[clusterHostInfo.get(all_hosts).size()]);
+}
+SetString keys = clusterHostInfo.keySet();
+for (String key : keys) {
+  if (keysToSkip.contains(key)) {
+continue;
+  }
+  SetString hosts = new HashSetString();
+  SetString currentHostsIndexes = clusterHostInfo.get(key);
+  if (currentHostsIndexes == null) {
+continue;
+  }
+  for (String hostIndex : currentHostsIndexes) {
+try {
+  hosts.add(allHosts[Integer.parseInt(hostIndex)]);
+} catch (ArrayIndexOutOfBoundsException ex) {
+  throw new SystemException(Failed to fill cluster host info  , ex);
+}
+  }
+  clusterHostInfo.put(key, hosts);
+}
+return clusterHostInfo;
+  }
+
   @Override
   public RequestStatus updateResources(final Request request, Predicate 
predicate)
   throws SystemException, UnsupportedPropertyException, 
NoSuchResourceException, NoSuchParentResourceException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6a4a68d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java

[19/34] git commit: AMBARI-7376. Admin View: need to show deploying when view is still extracting. (yusaku)

2014-09-18 Thread jonathanhurley
AMBARI-7376. Admin View: need to show deploying when view is still 
extracting. (yusaku)


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

Branch: refs/heads/branch-alerts-dev
Commit: 0cec52d5f0bd9ce83af62f7050d7ec1d8a7bd74e
Parents: 856ac44
Author: Yusaku Sako yus...@hortonworks.com
Authored: Wed Sep 17 16:40:52 2014 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Wed Sep 17 16:40:52 2014 -0700

--
 .../ui/admin-web/app/scripts/services/View.js   | 16 ++--
 .../resources/ui/admin-web/app/styles/main.css  | 87 
 .../app/views/ambariViews/listTable.html| 19 -
 3 files changed, 111 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cec52d5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
index 8f3b376..960ac87 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/View.js
@@ -55,9 +55,13 @@ angular.module('ambariAdminConsole')
 self.view_name = item.ViewInfo.view_name;
 self.versions = '';
 self.instances = [];
+self.canCreateInstance = false;
 var versions = {};
 angular.forEach(item.versions, function(version) {
-  versions[version.ViewVersionInfo.version] = version.instances.length;
+  versions[version.ViewVersionInfo.version] = {count: 
version.instances.length, status: version.ViewVersionInfo.status};
+  if(version.ViewVersionInfo.status === 'DEPLOYED'){ // if atelast one 
version is deployed
+self.canCreateInstance = true;
+  }
   
   angular.forEach(version.instances, function(instance) {
 instance.label = instance.ViewInstanceInfo.label || 
version.ViewVersionInfo.label || instance.ViewInstanceInfo.view_name;
@@ -65,14 +69,8 @@ angular.module('ambariAdminConsole')
 
   self.instances = self.instances.concat(version.instances);
 });
+self.versions = versions;
 
-for(var ver in versions){
-  if(versions.hasOwnProperty(ver)){
-self.versions += (self.versions ? ', ' : '') + ver +' 
('+versions[ver]+')';
-  }
-}
-
-// self.isOpened = !self.instances.length;
 self.versionsList = item.versions;
   }
 
@@ -145,7 +143,7 @@ angular.module('ambariAdminConsole')
 
 $http({
   method: 'GET',
-  url: Settings.baseUrl + '/views/'+viewName
+  url: Settings.baseUrl + '/views/'+viewName + 
'?versions/ViewVersionInfo/status=DEPLOYED'
 }).success(function(data) {
   var versions = [];
   angular.forEach(data.versions, function(version) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0cec52d5/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css 
b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 9b41f63..d6237db 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1011,3 +1011,90 @@ button.btn.btn-xs{
   -o-transition: none!important;
   transition: none!important;
 }
+
+
+.viewstatus{
+  display: inline-block;
+}
+.viewstatus.pending{
+  width: 12px;
+  height: 12px;
+  border: 2px solid black;
+  border-radius: 50%;
+  vertical-align: middle;
+  position: relative;
+  border-radius: 50%;
+}
+
+.viewstatus.pending:before, .viewstatus.pending:after{
+  content: '';
+  position: absolute;
+  left: 4px;
+  top: 3px;
+  width: 5px;
+  height: 2px;
+  background: black;
+}
+.viewstatus.pending:after{
+  top: -3px;
+  left: 3px;
+  width: 2px;
+  height: 2px;
+  border-radius: 100%;
+}
+.viewstatus.pending:before{
+  -webkit-transform-origin: 0% 50%;
+  -moz-transform-origin: 0% 50%;
+  -ms-transform-origin: 0% 50%;
+  -o-transform-origin: 0% 50%;
+  transform-origin: 0% 50%;
+
+  animation: rotate 2.0s infinite linear;
+  -webkit-animation: rotate 2.0s infinite linear;
+}
+
+@-webkit-keyframes rotate { 100% { -webkit-transform: rotate(360deg) }}
+@keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: 
rotate(360deg) }}
+
+
+.viewstatus.deploying{
+  width: 17px;
+  height: 12px;
+  text-align: center;
+  vertical-align: middle;
+}
+.viewstatus.deploying  div{
+  background: black;
+  height: 100%;
+  

[10/34] git commit: AMBARI-7333. Tez deployment changes for Champlain (aonishuk)

2014-09-18 Thread jonathanhurley
AMBARI-7333. Tez deployment changes for Champlain (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 117b4558c347a80ac4d26db295f12c37237a3b8b
Parents: 0449d22
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Wed Sep 17 18:55:23 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Wed Sep 17 18:55:23 2014 +0300

--
 .../src/test/python/resource_management/TestCopyFromLocal.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/117b4558/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py 
b/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
index 90397ae..6862db3 100644
--- a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
+++ b/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
@@ -36,9 +36,9 @@ class TestCopyFromLocal(TestCase):
   call_arg_list = execute_hadoop_mock.call_args_list
   self.assertEqual('fs -copyFromLocal /user/testdir/*.files /apps/test/',
call_arg_list[0][0][0].command)
-  self.assertEquals({'not_if': su - user1 -c ' hadoop fs -ls 
/apps/test/*.files' /dev/null 21, 'user': 'user1', 'conf_dir': 
'/etc/hadoop/conf'},
+  self.assertEquals({'not_if': su - user1 -c ' hadoop fs -ls 
/apps/test//*.files' /dev/null 21, 'user': 'user1', 'conf_dir': 
'/etc/hadoop/conf'},
 call_arg_list[0][0][0].arguments)
-  self.assertEquals('fs -chown user1 /apps/test/*.files', 
call_arg_list[1][0][0].command)
+  self.assertEquals('fs -chown user1 /apps/test//*.files', 
call_arg_list[1][0][0].command)
   self.assertEquals({'user': 'hdfs', 'conf_dir': '/etc/hadoop/conf'}, 
call_arg_list[1][0][0].arguments)
 
 
@@ -57,9 +57,9 @@ class TestCopyFromLocal(TestCase):
   call_arg_list = execute_hadoop_mock.call_args_list
   self.assertEqual('fs -copyFromLocal /user/testdir/*.files /apps/test/',
call_arg_list[0][0][0].command)
-  self.assertEquals({'not_if': su - user1 -c ' hadoop fs -ls 
/apps/test/*.files' /dev/null 21, 'user': 'user1', 'conf_dir': 
'/etc/hadoop/conf'},
+  self.assertEquals({'not_if': su - user1 -c ' hadoop fs -ls 
/apps/test//*.files' /dev/null 21, 'user': 'user1', 'conf_dir': 
'/etc/hadoop/conf'},
 call_arg_list[0][0][0].arguments)
-  self.assertEquals('fs -chown user1:hdfs /apps/test/*.files', 
call_arg_list[1][0][0].command)
+  self.assertEquals('fs -chown user1:hdfs /apps/test//*.files', 
call_arg_list[1][0][0].command)
   self.assertEquals({'user': 'hdfs', 'conf_dir': '/etc/hadoop/conf'}, 
call_arg_list[1][0][0].arguments)
 
 



[27/34] git commit: AMBARI-7384 Broken dashboard loaded when there's no cluster installed. (Max Shepel via ababiichuk)

2014-09-18 Thread jonathanhurley
AMBARI-7384 Broken dashboard loaded when there's no cluster installed. (Max 
Shepel via ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 19bf2a6a8f81e6a336cbf2617326065c36dc9dbd
Parents: 38a1812
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Sep 18 15:53:08 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Sep 18 15:53:08 2014 +0300

--
 ambari-web/app/controllers/application.js |  8 
 ambari-web/app/routes/installer.js|  1 +
 ambari-web/app/templates/application.hbs  | 27 +++---
 3 files changed, 16 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/19bf2a6a/ambari-web/app/controllers/application.js
--
diff --git a/ambari-web/app/controllers/application.js 
b/ambari-web/app/controllers/application.js
index ed5e3c8..8706fff 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -23,10 +23,6 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 
   name: 'applicationController',
 
-  clusterExists: function() {
-return !Em.isNone(App.router.get('clusterController.clusterName'));
-  }.property('App.router.clusterController.clusterName'),
-
   clusterName: function () {
 return (App.router.get('clusterController.clusterName') || 'My Cluster');
   }.property('App.router.clusterController.clusterName'),
@@ -47,6 +43,10 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 return App.router.get('clusterController.isLoaded')  
App.router.get('loggedIn');
   }.property('App.router.clusterController.isLoaded','App.router.loggedIn'),
 
+  isExistingClusterDataLoaded: function () {
+return !Em.isNone(App.router.get('clusterController.clusterName'))  
this.get('isClusterDataLoaded');
+  }.property('App.router.clusterController.clusterName', 
'isClusterDataLoaded'),
+
   init: function(){
 this._super();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/19bf2a6a/ambari-web/app/routes/installer.js
--
diff --git a/ambari-web/app/routes/installer.js 
b/ambari-web/app/routes/installer.js
index a414ff4..2a081ea 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -439,6 +439,7 @@ module.exports = Em.Route.extend({
   controller.setClusterProvisioningState('INSTALLED', function () {
 // We need to do recovery based on whether we are in Add Host or 
Installer wizard
 controller.saveClusterState('DEFAULT');
+App.router.set('clusterController.isLoaded', false);
 router.transitionTo('main.dashboard.index');
   });
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/19bf2a6a/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index 6401500..3e1b303 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -21,29 +21,24 @@
 div class=navbar navbar-static-top
   div class=navbar-inner
 div class=container main-container
-  {{#if isClusterDataLoaded}}
+  {{#if isExistingClusterDataLoaded}}
 a {{translateAttr href=topnav.logo.href}} class=logoimg 
src=/img/logo-white.png alt=Apache Ambari title=Apache Ambari/a
 a class=brand {{translateAttr href=topnav.logo.href}} 
title=Apache Ambari{{t app.name}}/a
+a class=brand cluster-name href=javascript:void(null); 
{{bindAttr title=clusterName}}
+  span {{action showPopup 
target=App.router.backgroundOperationsController}} {{clusterDisplayName}} 
/span
+  {{#with App.router.backgroundOperationsController}}
+{{#if allOperationsCount}}
+  i class=icon-caret-left ops-count/ispan class=label 
operations-count {{action showPopup 
target=App.router.backgroundOperationsController}} {{allOperationsCount}} 
{{t ops}}/span
+{{else}}
+  i class=icon-caret-left/ispan class=label {{action 
showPopup 
target=App.router.backgroundOperationsController}}{{allOperationsCount}} {{t 
ops}}/span
+{{/if}}
+  {{/with}}
+/a
   {{else}}
 a class=logoimg src=/img/logo-white.png alt=Apache Ambari 
title=Apache Ambari/a
 a class=brand title=Apache 

[24/34] git commit: AMBARI-7284 - (Apache AMBARI-7284) Hadoop cluster alerts need updates for Hadoop 2.4 and 2.5

2014-09-18 Thread jonathanhurley
AMBARI-7284 - (Apache AMBARI-7284) Hadoop cluster alerts need updates for 
Hadoop 2.4 and 2.5


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

Branch: refs/heads/branch-alerts-dev
Commit: a14ca23882a76c1daa27038c8e00a20d231ce55f
Parents: 3f932cf
Author: Artem Baranchuk abaranc...@hortonworks.com
Authored: Mon Sep 15 19:50:29 2014 +0300
Committer: Artem Baranchuk abaranc...@hortonworks.com
Committed: Thu Sep 18 13:47:48 2014 +0300

--
 .../services/NAGIOS/package/files/sys_logger.py | 30 +---
 .../test/nagios/plugins/test_sys_logger.py  | 77 ++--
 2 files changed, 91 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a14ca238/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/sys_logger.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/sys_logger.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/sys_logger.py
index 8f0a415..e86a8fb 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/sys_logger.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/sys_logger.py
@@ -114,14 +114,24 @@ msg_ids = {'Host::Ping':'host_down',
'GANGLIA::Ganglia Monitor process for 
ResourceManager':'ganglia_monitor_process',
'GANGLIA::Ganglia Monitor process for 
HistoryServer':'ganglia_monitor_process',
'HBASEMASTER::HBase Master process':'hbase_master_process',
+   'HBASE::Percent RegionServers live':'regionservers_down',
'REGIONSERVER::RegionServer process':'regionserver_process',
'NAGIOS::Nagios status log freshness':'nagios_process',
'FLUME::Flume Agent process':'flume_agent_process',
'OOZIE::Oozie Server status':'oozie_server_process',
'HIVE-METASTORE::Hive Metastore status':'hive_metastore_process',
-   'WEBHCAT::WebHCat Server status':'webhcat_server_process',
-   'RESOURCEMANAGER::ResourceManager 
process':'resourcemanager_process',
-   'NODEMANAGER::NodeManager process':'nodemanager_process',
+   'WEBHCAT::WebHCat Server status':'webhcat_down',
+   'RESOURCEMANAGER::ResourceManager 
process':'resourcemanager_process_down',
+   'RESOURCEMANAGER::ResourceManager RPC 
latency':'resourcemanager_rpc_latency',
+   'RESOURCEMANAGER::ResourceManager CPU 
utilization':'resourcemanager_cpu_utilization',
+   'RESOURCEMANAGER::ResourceManager Web UI':'recourcemanager_ui',
+   'NODEMANAGER::NodeManager process':'nodemanager_process_down',
+   'NODEMANAGER::NodeManager health':'nodemanager_health',
+   'NODEMANAGER::Percent NodeManagers live':'nodemanagers_down',
+   'APP_TIMELINE_SERVER::App Timeline Server 
process':'timelineserver_process',
+   'JOBHISTORY::HistoryServer RPC latency':'historyserver_rpc_latency',
+   'JOBHISTORY::HistoryServer CPU 
utilization':'historyserver_cpu_utilization',
+   'JOBHISTORY::HistoryServer Web UI':'historyserver_ui',
'JOBHISTORY::HistoryServer process':'historyserver_process'}
 
 # Determine the severity of the TVI alert based on the Nagios alert state.
@@ -142,13 +152,13 @@ def determine_severity(state, service):
 # Determine the msg id for the TVI alert from based on the service which 
generates the Nagios alert.
 # The msg id is used to correlate a log msg to a TVI rule.
 def determine_msg_id(service, severity):
-if msg_ids.has_key(service):
-msg_id = msg_ids[service]
-if severity == 'OK':
-msg_id = '{0}_ok'.format(msg_id)
-
-return msg_id
-else: return 'HADOOP_UNKNOWN_MSG'
+  for k, v in msg_ids.iteritems():
+if(k in service):
+  msg_id = v
+  if severity == 'OK':
+msg_id = '{0}_ok'.format(msg_id)
+  return msg_id
+  return 'HADOOP_UNKNOWN_MSG'
 
 
 # Determine the domain.  Currently the domain is always 'Hadoop'.

http://git-wip-us.apache.org/repos/asf/ambari/blob/a14ca238/contrib/addons/test/nagios/plugins/test_sys_logger.py
--
diff --git a/contrib/addons/test/nagios/plugins/test_sys_logger.py 
b/contrib/addons/test/nagios/plugins/test_sys_logger.py
index eb7a8fe..49c5de8 100644
--- a/contrib/addons/test/nagios/plugins/test_sys_logger.py
+++ b/contrib/addons/test/nagios/plugins/test_sys_logger.py
@@ -259,6 +259,13 @@ test('Hadoop_RegionServer_Down:OK',
 'OK: 

[05/34] git commit: AMBARI-7333. Tez deployment changes for Champlain (aonishuk)

2014-09-18 Thread jonathanhurley
AMBARI-7333. Tez deployment changes for Champlain (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: c09edb729fce602f0943b048df7810353ecd4975
Parents: 4bcf111
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Wed Sep 17 18:11:06 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Wed Sep 17 18:11:06 2014 +0300

--
 .../libraries/providers/copy_from_local.py   | 12 +---
 .../libraries/resources/copy_from_local.py   |  3 ++-
 .../HIVE/package/scripts/install_jars.py | 19 +++
 .../2.1/services/TEZ/configuration/tez-site.xml  |  2 +-
 .../python/stacks/2.0.6/HIVE/test_hive_server.py | 10 ++
 5 files changed, 37 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c09edb72/ambari-common/src/main/python/resource_management/libraries/providers/copy_from_local.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/copy_from_local.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/copy_from_local.py
index 9031a77..79d3e35 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/copy_from_local.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/copy_from_local.py
@@ -27,6 +27,7 @@ class CopyFromLocalProvider(Provider):
   def action_run(self):
 path = self.resource.path
 dest_dir = self.resource.dest_dir
+dest_file = self.resource.dest_file
 kinnit_if_needed = self.resource.kinnit_if_needed
 owner = self.resource.owner
 group = self.resource.group
@@ -34,9 +35,14 @@ class CopyFromLocalProvider(Provider):
 hdfs_usr=self.resource.hdfs_user
 hadoop_conf_path = self.resource.hadoop_conf_dir
 
-copy_cmd = format(fs -copyFromLocal {path} {dest_dir})
-dest_file_name = os.path.split(path)[1]
-dest_path = dest_dir + dest_file_name if dest_dir.endswith(os.sep) else 
dest_dir + os.sep + dest_file_name
+
+if dest_file:
+  copy_cmd = format(fs -copyFromLocal {path} {dest_dir}/{dest_file})
+  dest_path = dest_dir + dest_file if dest_dir.endswith(os.sep) else 
dest_dir + os.sep + dest_file
+else:
+  dest_file_name = os.path.split(path)[1]
+  copy_cmd = format(fs -copyFromLocal {path} {dest_dir})
+  dest_path = dest_dir + os.sep + dest_file_name
 # Need to run unless as resource user
 su_cmd = 'su - {0} -c'.format(owner)
 unless_cmd = format({su_cmd} '{kinnit_if_needed} hadoop fs -ls 
{dest_path}' /dev/null 21)

http://git-wip-us.apache.org/repos/asf/ambari/blob/c09edb72/ambari-common/src/main/python/resource_management/libraries/resources/copy_from_local.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/resources/copy_from_local.py
 
b/ambari-common/src/main/python/resource_management/libraries/resources/copy_from_local.py
index 328d9c2..eaaeab5 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/resources/copy_from_local.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/resources/copy_from_local.py
@@ -28,6 +28,7 @@ class CopyFromLocal(Resource):
 
   path = ResourceArgument(default=lambda obj: obj.name)
   dest_dir = ResourceArgument(required=True)
+  dest_file = ResourceArgument()
   owner = ResourceArgument(required=True)
   group = ResourceArgument()
   mode = ResourceArgument()
@@ -35,4 +36,4 @@ class CopyFromLocal(Resource):
   hadoop_conf_dir = ResourceArgument(default='/etc/hadoop/conf')
   hdfs_user = ResourceArgument(default='hdfs')
 
-  actions = Resource.actions + [run]
\ No newline at end of file
+  actions = Resource.actions + [run]

http://git-wip-us.apache.org/repos/asf/ambari/blob/c09edb72/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py
index 3548de7..0045fee 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/install_jars.py
@@ -72,6 +72,16 @@ def install_tez_jars():
 hdfs_user=params.hdfs_user,
 

[23/34] git commit: AMBARI-7363 Recommendations: ui changes for usability 2. (ababiichuk)

2014-09-18 Thread jonathanhurley
AMBARI-7363 Recommendations: ui changes for usability 2. (ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 3f932cfeefb780530a05d3c328418635836a9b0b
Parents: 0058924
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Thu Sep 18 12:39:59 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Thu Sep 18 12:39:59 2014 +0300

--
 ambari-web/app/messages.js   |  1 -
 ambari-web/app/styles/application.less   | 15 +++
 .../common/configs/config_recommendation_popup.hbs   | 13 +
 3 files changed, 24 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f932cfe/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 5c330b4..1052d9b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -658,7 +658,6 @@ Em.I18n.translations = {
   'installer.step7.popup.validation.request.failed.body': 'Config validaition 
failed.',
   'installer.step7.popup.validation.warning.header': 'Configurations',
   'installer.step7.popup.validation.warning.body': 'Some service 
configurations are not configured properly. We recommend you review and change 
the highlighted configuration values. Are you sure you want to proceed without 
correcting configurations?',
-  'installer.step7.popup.validation.warning.errorDescription': ' value is less 
than the recommended default of ',
   'installer.step7.oozie.database.new': 'New Derby Database',
   'installer.step7.hive.database.new': 'New MySQL Database',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f932cfe/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 8385916..235dbc1 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -7005,3 +7005,18 @@ i.icon-asterisks {
 .table td.no-borders { border-top: none; }
 .table td.error { background-color: #f2dede; }
 .table td.warning { background-color: #fcf8e3; }
+
+#config-validation-warnings {
+  table {
+tbody{
+  tr {
+background:#fcf8e3;
+border:1px solid #c09853;
+border-right:none;
+td {
+  min-width: 150px;
+}
+  }
+}
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f932cfe/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs 
b/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
index 4efc312..0a3e231 100644
--- a/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
+++ b/ambari-web/app/templates/common/configs/config_recommendation_popup.hbs
@@ -28,6 +28,9 @@
 {{t common.property}}
   /th
   th
+{{t common.value}}
+  /th
+  th
 {{t common.description}}
   /th
 /tr
@@ -41,12 +44,14 @@
   {{property.serviceName}}
 /td
 td
-  {{property.displayName}}
+  {{property.name}}
+/td
+td
+  {{property.value}}
 /td
 td
-  strong{{property.description}}:/strongbr/
-  strong{{property.value}}/strong{{t 
installer.step7.popup.validation.warning.errorDescription}}
-  strong{{property.defaultValue}}/strong
+  {{property.description}}br/
+  strong{{property.warnMessage}}/strong
 /td
   /tr
 {{/if}}



[01/34] git commit: AMBARI-7360. Deploying Ambari with custom users fails (aonishuk)

2014-09-18 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev a4e97aaa2 - f1018b176


AMBARI-7360. Deploying Ambari with custom users fails (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: ac290e25937baf6f4ccefde823a6ef84a5288aed
Parents: 24f0b47
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Wed Sep 17 16:44:11 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Wed Sep 17 16:44:11 2014 +0300

--
 .../server/api/util/StackExtensionHelper.java   |  9 +++--
 .../ambari/server/state/ConfigHelper.java   | 21 
 .../server/state/cluster/ClusterImpl.java   |  3 +--
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 4 files changed, 18 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ac290e25/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 a63be38..3e211fe 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
@@ -749,8 +749,7 @@ public class StackExtensionHelper {
 ConfigurationXml configuration = unmarshal(ConfigurationXml.class, 
configFile);
 String fileName = configFile.getName();
 stackInfo.getProperties().addAll(getProperties(configuration, fileName));
-int extIndex = 
fileName.indexOf(AmbariMetaInfo.SERVICE_CONFIG_FILE_NAME_POSTFIX);
-String configType = fileName.substring(0, extIndex);
+String configType = ConfigHelper.fileNameToConfigType(fileName);
 
 addConfigType(stackInfo.getConfigTypes(), configType);
 setConfigTypeAttributes(stackInfo.getConfigTypes(), configuration, 
configType);
@@ -797,8 +796,7 @@ public class StackExtensionHelper {
 ConfigurationXml configuration = unmarshal(ConfigurationXml.class, 
configFile);
 String fileName = configFile.getName();
 serviceInfo.getProperties().addAll(getProperties(configuration, fileName));
-int extIndex = 
fileName.indexOf(AmbariMetaInfo.SERVICE_CONFIG_FILE_NAME_POSTFIX);
-String configType = fileName.substring(0, extIndex);
+String configType = ConfigHelper.fileNameToConfigType(fileName);
 
 addConfigType(serviceInfo.getConfigTypes(), configType);
 setConfigTypeAttributes(serviceInfo.getConfigTypes(), configuration, 
configType);
@@ -836,8 +834,7 @@ public class StackExtensionHelper {
 if (configurations != null) {
   MapString, MapString, MapString, String configTypes = new 
HashMapString, MapString, MapString, String();
   for (PropertyInfo configuration : configurations) {
-int extIndex = 
configuration.getFilename().indexOf(AmbariMetaInfo.SERVICE_CONFIG_FILE_NAME_POSTFIX);
-String configType = configuration.getFilename().substring(0, extIndex);
+String configType = 
ConfigHelper.fileNameToConfigType(configuration.getFilename());
 
 if (!configTypes.containsKey(configType)) {
   MapString, MapString, String properties = new HashMapString, 
MapString, String();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac290e25/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 790c177..191549b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -78,7 +78,7 @@ public class ConfigHelper {
 staleConfigsCache = CacheBuilder.newBuilder().
   expireAfterWrite(STALE_CONFIGS_CACHE_EXPIRATION_TIME, 
TimeUnit.SECONDS).build();
   }
-  
+
   /**
* Gets the desired tags for a cluster and host
* @param cluster the cluster
@@ -428,8 +428,7 @@ public class ConfigHelper {
   
   for (PropertyInfo stackProperty : stackProperties) {
 if(stackProperty.getName().equals(propertyName)) {
-  int extIndex = 
stackProperty.getFilename().indexOf(AmbariMetaInfo.SERVICE_CONFIG_FILE_NAME_POSTFIX);
-  String configType = stackProperty.getFilename().substring(0, 

[21/34] git commit: AMBARI-7377. Slider View: Add support for custom users to login into Ambari and submit application as themselves (srimanth)

2014-09-18 Thread jonathanhurley
AMBARI-7377. Slider View: Add support for custom users to login into Ambari and 
submit application as themselves (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: c7651de83d16e2d9de16ca99399aaa9ad3c595cd
Parents: 7a087b1
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Wed Sep 17 17:08:47 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Wed Sep 17 17:37:39 2014 -0700

--
 .../ambari/view/slider/SliderAppsViewControllerImpl.java  | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7651de8/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index 3626cbe..027f824 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -133,7 +133,7 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
 ClassLoader currentClassLoader = 
Thread.currentThread().getContextClassLoader();
 Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
 try {
-  T value = UserGroupInformation.getBestUGI(null, yarn).doAs(
+  T value = UserGroupInformation.getBestUGI(null, 
viewContext.getUsername()).doAs(
   new PrivilegedExceptionActionT() {
 @Override
 public T run() throws Exception {
@@ -274,7 +274,6 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
   app.setConfigs(configs);
 } else if (components.equals(property.toLowerCase())) {
   try {
-System.setProperty(SliderKeys.HADOOP_USER_NAME, yarn);
 ClusterDescription description = sliderClient
 .getClusterDescription(yarnApp.getName());
 if (description != null  description.status != null
@@ -368,7 +367,7 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
 SliderClient client = new SliderClient() {
   @Override
   public String getUsername() throws IOException {
-return yarn;
+return viewContext.getUsername();
   }
 
   @Override
@@ -377,7 +376,7 @@ public class SliderAppsViewControllerImpl implements 
SliderAppsViewController {
 // Override the default FS client to the calling user
 try {
   FileSystem fs = FileSystem.get(FileSystem.getDefaultUri(getConfig()),
-  getConfig(), yarn);
+  getConfig(), viewContext.getUsername());
   SliderFileSystem fileSystem = new SliderFileSystem(fs, getConfig());
   Field fsField = SliderClient.class
   .getDeclaredField(sliderFileSystem);



[06/29] git commit: AMBARI-7394. Recommend properties were changed after cluster install (srimanth)

2014-09-19 Thread jonathanhurley
AMBARI-7394. Recommend properties were changed after cluster install (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: bf5f1c6da72ed46844298a152906fdd77c1fba28
Parents: 1498061
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Sep 18 14:47:58 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Sep 18 14:48:03 2014 -0700

--
 ambari-web/app/mixins/common/serverValidator.js | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf5f1c6d/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 8d551f8..2a31a4f 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -201,13 +201,22 @@ App.ServerValidatorMixin = Em.Mixin.create({
 var self = this;
 var recommendations = this.get('hostGroups');
 recommendations.blueprint.configurations = 
blueprintUtils.buildConfisJSON(this.get('services'), this.get('stepConfigs'));
+
+var serviceNames = this.get('serviceNames');
+if (!self.get('isInstaller')) {
+  // When editing a service we validate only that service's configs.
+  // However, we should pass the IDs of services installed, or else,
+  // default value calculations will alter.
+  serviceNames = App.Service.find().mapProperty('serviceName');
+}
+
 return App.ajax.send({
   name: 'config.validations',
   sender: this,
   data: {
 stackVersionUrl: App.get('stackVersionURL'),
 hosts: this.get('hostNames'),
-services: this.get('serviceNames'),
+services: serviceNames,
 validate: 'configurations',
 recommendations: recommendations
   },



[16/29] git commit: AMBARI-7399. Slider View: Firefox has Create action inside the table header. (Max Shepel via akovalenko)

2014-09-19 Thread jonathanhurley
AMBARI-7399. Slider View: Firefox has Create action inside the table header. 
(Max Shepel via akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 6eda8c66a44189320c2e2270be0f74a33c0a6f68
Parents: d62147e
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Fri Sep 19 13:14:22 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Fri Sep 19 13:19:24 2014 +0300

--
 .../src/main/resources/ui/app/styles/application.less  | 13 +
 .../main/resources/ui/app/templates/application.hbs| 13 +++--
 .../main/resources/ui/app/templates/slider_apps.hbs|  7 ---
 .../main/resources/ui/app/views/application_view.js|  5 +
 4 files changed, 25 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 44c6487..7497b6e 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -44,11 +44,16 @@ a {
   cursor: pointer;
 }
 
-#slider-apps-table  {
-  .create-app {
-margin-bottom: 20px;
+.slider-header {
+  overflow: hidden;
+  .box-header {
+padding-top: 20px;
   }
-#slider-table {
+}
+
+#slider-apps-table  {
+
+  #slider-table {
 margin-top: 10px;
 margin-bottom: 10px;
 font-size: 13px\9;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index da828bf..f62 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -16,9 +16,18 @@
 * limitations under the License.
 }}
 
-div
+div class=slider-header
   {{#view view.SliderTitleView}}
-h1{{t slider.apps.title}} - span class=slider-app-title 
{{bs-bind-popover view.popover}}{{App.instance}}/span/h1
+h1 class=pull-left{{t slider.apps.title}} - span 
class=slider-app-title {{bs-bind-popover 
view.popover}}{{App.instance}}/span/h1
+{{#if view.isIndexPage}}
+  div class=box-header pull-right
+div class=create-app
+  a href=# class=btn btn-primary {{action createApp}}
+i class=icon-plus/ispannbsp;{{t 
slider.apps.create}}/span
+  /a
+/div
+  /div
+{{/if}}
   {{/view}}
   {{outlet bs-tooltip-box}}
 /div

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index aecfb30..ef72291 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -17,13 +17,6 @@
 }}
 
 div id=slider-apps-table
-  div class=box-header
-div class=pull-right create-app
-  a href=# class=btn btn-primary {{action createApp}}
-i class=icon-plus/ispannbsp;{{t slider.apps.create}}/span
-  /a
-/div
-  /div
 
   table class=datatable table table-bordered table-striped 
id=slider-table
 thead

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eda8c66/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js 
b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
index 1860944..7471f04 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/application_view.js
@@ -33,6 +33,11 @@ App.ApplicationView = Ember.View.extend({
   placement: 'bottom'
 }),
 
+isIndexPage: function () {
+  var currentPath = this.get('controller.currentPath');
+  return currentPath  

[28/29] git commit: AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)

2014-09-19 Thread jonathanhurley
AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: d7ed4316202b6af7e6157ec97f9f137b43ad4eb0
Parents: 5da5019
Author: Dmytro Sen d...@hortonworks.com
Authored: Fri Sep 19 19:12:06 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Fri Sep 19 19:12:06 2014 +0300

--
 .../resource_management/TestCopyFromLocal.py|  8 +--
 .../TestExecuteHadoopResource.py| 12 ++--
 .../resource_management/TestExecuteResource.py  |  3 +-
 .../core/providers/system.py| 12 ++--
 .../python/resource_management/core/shell.py| 24 ---
 .../libraries/providers/copy_from_local.py  |  4 ++
 .../libraries/providers/execute_hadoop.py   |  6 +-
 .../libraries/providers/hdfs_directory.py   |  6 +-
 .../libraries/resources/copy_from_local.py  |  1 +
 .../2.0.6/hooks/after-INSTALL/scripts/params.py | 11 ++-
 .../scripts/shared_initialization.py|  4 ++
 .../2.0.6/hooks/before-START/scripts/params.py  | 13 ++--
 .../services/FLUME/package/scripts/flume.py |  2 +-
 .../services/FLUME/package/scripts/params.py|  6 +-
 .../services/HBASE/package/scripts/params.py| 16 ++---
 .../services/HDFS/package/scripts/params.py | 18 +++--
 .../HDFS/package/scripts/service_check.py   |  2 +-
 .../2.0.6/services/HIVE/package/scripts/hcat.py |  2 +
 .../HIVE/package/scripts/hcat_service_check.py  | 10 ++-
 .../HIVE/package/scripts/install_jars.py|  2 +
 .../services/HIVE/package/scripts/params.py | 70 
 .../services/HIVE/package/scripts/webhcat.py|  4 ++
 .../services/PIG/package/scripts/params.py  | 12 ++--
 .../2.0.6/services/PIG/package/scripts/pig.py   |  1 +
 .../services/SQOOP/package/scripts/params.py| 11 ++-
 .../package/scripts/mapred_service_check.py |  4 ++
 .../services/YARN/package/scripts/params.py | 24 +++
 .../YARN/package/scripts/service_check.py   |  2 +-
 .../ZOOKEEPER/package/scripts/params.py |  7 +-
 .../services/FALCON/package/scripts/params.py   | 12 ++--
 .../services/STORM/package/scripts/params.py| 11 ++-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |  2 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |  2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |  2 +-
 .../services/HDFS/configuration/hdfs-site.xml   | 34 --
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |  4 +-
 .../HIVE/configuration/webhcat-site.xml | 14 ++--
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |  6 +-
 .../services/OOZIE/configuration/oozie-site.xml | 13 
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |  6 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|  2 +-
 .../services/SLIDER/package/scripts/params.py   |  4 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |  2 +-
 .../services/STORM/configuration/storm-env.xml  | 29 
 .../services/STORM/configuration/storm-site.xml |  6 +-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  |  2 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml|  2 +-
 .../HDP/2.2/services/WEBHCAT/metainfo.xml   | 43 
 .../YARN/configuration-mapred/mapred-site.xml   | 11 ++-
 .../services/YARN/configuration/yarn-site.xml   | 11 +--
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |  6 +-
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml |  2 +-
 .../stacks/1.3.2/HDFS/test_service_check.py |  2 +-
 .../python/stacks/2.0.6/FLUME/test_flume.py |  4 +-
 .../stacks/2.0.6/HDFS/test_service_check.py |  2 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   |  4 ++
 .../stacks/2.0.6/HIVE/test_hive_metastore.py|  9 ++-
 .../stacks/2.0.6/HIVE/test_hive_server.py   | 12 ++--
 .../2.0.6/HIVE/test_hive_service_check.py   | 17 ++---
 .../stacks/2.0.6/HIVE/test_webhcat_server.py|  8 +++
 .../python/stacks/2.0.6/PIG/test_pig_client.py  |  2 +
 .../2.0.6/YARN/test_mapreduce2_service_check.py |  8 +++
 .../2.0.6/YARN/test_yarn_service_check.py   |  4 +-
 .../stacks/2.1/HIVE/test_hive_metastore.py  |  8 +--
 65 files changed, 249 insertions(+), 356 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
--
diff --git 
a/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py 
b/ambari-agent/src/test/python/resource_management/TestCopyFromLocal.py
index 6862db3..3991bae 100644
--- 

[24/29] git commit: AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of words. (Max Shepel via atkach)

2014-09-19 Thread jonathanhurley
AMBARI-7409 Slider View: Config keys should be wrapped even in the middle of 
words. (Max Shepel via atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 69e8e9cc44bb55dc14c6625e740b0dc8e39b69fe
Parents: 0255e5d
Author: atkach atk...@hortonworks.com
Authored: Fri Sep 19 17:26:02 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Fri Sep 19 17:26:02 2014 +0300

--
 .../slider/src/main/resources/ui/app/styles/application.less  | 3 +++
 .../src/main/resources/ui/app/templates/slider_app/configs.hbs| 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 2ea4ed8..f0d0bab 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -731,6 +731,9 @@ select {
   cursor: not-allowed;
   background-color: #ee;
 }
+.property-name {
+  word-wrap: break-word;
+}
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e8e9cc/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
index 6eddc8d..f073a8d 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
+++ 
b/contrib/views/slider/src/main/resources/ui/app/templates/slider_app/configs.hbs
@@ -23,7 +23,7 @@
 div class=container-fluid
   {{#each configCategory.configs}}
 div class=row
-  div class=col-md-3{{formatWordBreak key devider=.}}/div
+  div class=col-md-3 property-name{{formatWordBreak key 
devider=.}}/div
   div
 {{#if isMultiline}}
   {{textarea disabled=true value=value classNames=col-md-6}}



[04/29] git commit: AMBARI-7005. ambari trunk commit build fails due to unresolvable eclipselink plugin when the first time mvn build. (Jun Aoki via vgogate)

2014-09-19 Thread jonathanhurley
AMBARI-7005. ambari trunk commit build fails due to unresolvable eclipselink 
plugin when the first time mvn build. (Jun Aoki via vgogate)


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

Branch: refs/heads/branch-alerts-dev
Commit: 5c24d29ad21848707eabd4a3ae3fdedeb7044fca
Parents: 742b718
Author: Vitthal(Suhas) Gogate vgog...@apache.org
Authored: Thu Sep 18 14:33:49 2014 +
Committer: root r...@c6401.ambari.apache.org
Committed: Thu Sep 18 19:02:44 2014 +

--
 ambari-server/pom.xml | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5c24d29a/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index b07afbf..bbf21fe 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1422,4 +1422,12 @@
   !--reporting plugins plugin groupIdorg.codehaus.mojo/groupId
 artifactIdfindbugs-maven-plugin/artifactId version2.5.2/version 
/plugin
 /plugins /reporting --
+
+  pluginRepositories
+pluginRepository
+  idEclipseLink/id
+  urlhttp://download.eclipse.org/rt/eclipselink/maven.repo/url
+/pluginRepository
+  /pluginRepositories
+
 /project



[10/29] git commit: AMBARI-7396. After saving empty property become required only for Custom Properties.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7396. After saving empty property become required only for Custom 
Properties.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 01ff6a79b6d6d4bb4f3d3dc36a0642db350e1b3a
Parents: 6446499
Author: Xi Wang xiw...@apache.org
Authored: Thu Sep 18 17:57:05 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Sep 18 18:03:54 2014 -0700

--
 ambari-web/app/utils/config.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/01ff6a79/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 8226811..52f918d 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -350,7 +350,7 @@ App.config = Em.Object.create({
   filename: filename,
   isUserProperty: false,
   isOverridable: true,
-  isRequired: true,
+  isRequired: advancedConfigs.someProperty('name', index),
   isFinal: finalAttributes[index] === true,
   defaultIsFinal: finalAttributes[index] === true,
   showLabel: true,



[21/29] git commit: AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)

2014-09-19 Thread jonathanhurley
AMBARI-7405 Slider View: Error when creating new app not shown to user. (atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 0f7dee0b4582e277604ab8866dcc9711f3b8643a
Parents: 05f0b40
Author: atkach atk...@hortonworks.com
Authored: Fri Sep 19 15:59:18 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Fri Sep 19 15:59:18 2014 +0300

--
 .../createAppWizard/step4_controller.js | 10 +--
 .../ui/app/controllers/slider_app_controller.js |  2 +-
 .../src/main/resources/ui/app/helpers/ajax.js   | 14 +++-
 .../ui/app/mixins/ajax_error_handler.js | 84 
 .../resources/ui/app/styles/application.less|  6 ++
 .../ui/app/templates/common/ajax_error.hbs  | 24 ++
 .../src/main/resources/ui/app/translations.js   |  9 ++-
 7 files changed, 137 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
index e703c27..6454938 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step4_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.CreateAppWizardStep4Controller = Ember.ObjectController.extend({
+App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   needs: createAppWizard,
 
@@ -95,15 +95,15 @@ App.CreateAppWizardStep4Controller = 
Ember.ObjectController.extend({
   typeConfigs: app.get('configs')
 }
   },
-  complete: 'sendAppDataToServerCompleteCallback'
+  success: 'sendAppDataToServerSuccessCallback'
 });
   },
 
   /**
-   * Complete-callback for create new app-request
-   * @method sendAppDataToServerCompleteCallback
+   * Success-callback for create new app-request
+   * @method sendAppDataToServerSuccessCallback
*/
-  sendAppDataToServerCompleteCallback: function() {
+  sendAppDataToServerSuccessCallback: function() {
 this.get('appWizardController').hidePopup();
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index d1bfccf..b2effa0 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.SliderAppController = Ember.ObjectController.extend({
+App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, {
 
   /**
* List of Slider App tabs

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f7dee0b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js 
b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ba7fbce..ea01d82 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -132,7 +132,8 @@ var urls = {
 format: function (data) {
   return {
 type: 'POST',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -142,7 +143,8 @@ var urls = {
 mock: '',
 format: function () {
   return {
-method: 'DELETE'
+method: 'DELETE',
+showErrorPopup: true
   }
 }
   },
@@ -156,7 +158,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+showErrorPopup: true
   }
 }
   },
@@ -169,7 +172,8 @@ var urls = {
 format: function (data) {
   return {
 method: 'PUT',
-data: JSON.stringify(data.data)
+

[26/29] git commit: AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)

2014-09-19 Thread jonathanhurley
AMBARI-7412. Slider View: Alerts keep jumping in a Slider App (alexantonenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 5da5019a81323dbb3ef2a5699afac28679b138ea
Parents: 843579e
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Sep 19 18:47:41 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Sep 19 18:48:08 2014 +0300

--
 .../slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5da5019a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 7312f86..ebff57c 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -59,6 +59,7 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   lastCheck: alert.last_status_time
 });
   });
+  alerts = alerts.sortBy('title');
   App.SliderApp.store.pushMany('sliderAppAlert', alerts);
 }
 return alerts.mapProperty('id');



[01/29] git commit: AMBARI-7311 Incorrect name for turning on/off Maintenance Mode in Background operations window (dsen)

2014-09-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 179290e0f - e2e79668e


AMBARI-7311 Incorrect name for turning on/off Maintenance Mode in Background 
operations window (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: 31a410662cb626b04ec551495120b9bf2109cad1
Parents: 5fc5828
Author: Dmytro Sen d...@hortonworks.com
Authored: Thu Sep 18 18:29:53 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Thu Sep 18 18:29:53 2014 +0300

--
 .../apache/ambari/server/controller/MaintenanceStateHelper.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/31a41066/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
index f24..459f01f 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/MaintenanceStateHelper.java
@@ -50,7 +50,7 @@ public class MaintenanceStateHelper {
   private static final String NAGIOS_COMPONENT = NAGIOS_SERVER;
   private static final String NAGIOS_ACTION_NAME = nagios_update_ignore;
   private static final Logger LOG = 
LoggerFactory.getLogger(MaintenanceStateHelper.class);
-  public static final String UPDATE_NAGIOS_REQUEST_NAME = Update Nagios 
configuration;
+  public static final String UPDATE_NAGIOS_REQUEST_NAME = Adjusting ignored 
alerts for Services/Hosts Maintenance Mode;
 
   @Inject
   private Clusters clusters;



[07/29] git commit: AMBARI-7373. Admin View: Landing page should say the same thing on INSTALL/CREATE buttons.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7373. Admin View: Landing page should say the same thing on 
INSTALL/CREATE buttons.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 84133c222408788a15b35310c7194dc36d7fe4e3
Parents: e0215f5
Author: Xi Wang xiw...@apache.org
Authored: Wed Sep 17 14:35:26 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Sep 18 16:26:58 2014 -0700

--
 .../src/main/resources/ui/admin-web/app/views/leftNavbar.html | 3 +--
 ambari-admin/src/main/resources/ui/admin-web/app/views/main.html  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/84133c22/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index 8fd8c6a..0aa9340 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -63,8 +63,7 @@
 
   div ng-hide=cluster
 a href=/#/installer/step0 class=btn btn-primary btn-block 
createcluster-btn
-  span class=glyphicon glyphicon-plus/span
-  Create a Cluster
+  Launch Install Wizard
 /a
   /div
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/84133c22/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
index a542b4f..126f4f0 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
@@ -36,7 +36,7 @@
 h4 class=titleCreate a Cluster/h4
 div class=descriptionUse the Install Wizard to select services and 
configure your cluster/div
 div class=glyphicon glyphicon-cloud/div
-div class=buttons a href=/#/installer/step0 class=btn 
btn-primary create-cluster-buttonInstall Cluster/a/div
+div class=buttons a href=/#/installer/step0 class=btn 
btn-primary create-cluster-buttonLaunch Install Wizard/a/div
   /div
 
 !--Manage Users and groups--



[12/29] git commit: AMBARI-7347. Fixes for Ambari view to work aftsrimanth)

2014-09-19 Thread jonathanhurley
AMBARI-7347. Fixes for Ambari view to work aftsrimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 44fbccef840e07899b4ba18eac1007f8e15336aa
Parents: 7270881
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Thu Sep 18 19:58:17 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Sep 18 19:58:22 2014 -0700

--
 .../ui/app/controllers/slider_controller.js |  3 +
 .../ui/app/mappers/slider_apps_mapper.js| 33 +++--
 .../main/resources/ui/app/models/slider_app.js  |  5 ++
 .../views/slider_app/metrics/app_metric_view.js | 71 
 .../ui/app/views/slider_app/summary_view.js | 71 +++-
 5 files changed, 174 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 5eb323d..eb2762e 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -106,6 +106,9 @@ App.SliderController = 
Ember.Controller.extend(App.RunPeriodically, {
 || properties['zookeeper.quorum'] == null) {
   this.getClusterName();
 } else {
+  // TODO remove below line as it is a temporary hack 
+  this.getClusterName();
+
   initialValuesToLoad.setProperties({
 ambariAddress: location.protocol + // + document.location.host,
 hdfsAddress: properties['hdfs.address'],

http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 013c65c..a8ebbff 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -113,25 +113,38 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
* @param {object} data received from server data
* @method parse
*/
-  parseQuickLinks: function (data) {
+  parseQuickLinks : function(data) {
 var quickLinks = [],
-  appId = data.id;
+appId = data.id;
+var yarnAppId = appId;
+var index = appId.lastIndexOf('_');
+if (index  0) {
+  yarnAppId = appId.substring(0, index + 1);
+  for (var k = (appId.length - index - 1); k  4; k++) {
+yarnAppId += '0';
+  }
+  yarnAppId += appId.substring(index + 1);
+}
+var yarnUI = http://+window.location.hostname+:8088;;
+if (App.viewUrls) {
+  yarnUI = App.viewUrls['yarn.resourcemanager.webapp.address'];
+}
 quickLinks.push(
   Ember.Object.create({
 id: 'YARN application',
 label: 'YARN application',
-url: http://; + window.location.hostname + :8088
+url: yarnUI + '/cluster/app/application_' + yarnAppId
   })
 );
 
-if (!data.urls) {
+if(!data.urls){
   return quickLinks.mapProperty('id');
 }
 
 Object.keys(data.urls).forEach(function (key) {
   quickLinks.push(
 Ember.Object.create({
-  id: appId + key,
+  id: appId+key,
   label: key,
   url: data.urls[key]
 })
@@ -148,6 +161,13 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
 });
   },
 
+  parseMetricNames : function(app) {
+if (app.supportedMetrics) {
+  return app.supportedMetrics.join(,);
+}
+return ;
+  },
+
   /**
* Parse loaded data
* Load codeApp.SliderApp/code model
@@ -190,7 +210,8 @@ App.SliderAppsMapper = 
App.Mapper.createWithMixins(App.RunPeriodically, {
   alerts: alerts,
   configs: configs,
   jmx: jmx,
-  runtimeProperties: app.configs
+  runtimeProperties: app.configs,
+  supportedMetricNames: metricNames
 })
   );
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/44fbccef/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js
--
diff --git 

[08/29] git commit: AMBARI-7372. Admin View: various UI.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7372. Admin View: various UI.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: e0215f5401d03ff90cf35cf9cb01b9aba843829b
Parents: bf5f1c6
Author: Xi Wang xiw...@apache.org
Authored: Wed Sep 17 14:23:48 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Sep 18 16:26:58 2014 -0700

--
 .../clusters/ClustersManageAccessCtrl.js  |  2 +-
 .../app/scripts/directives/editableList.js| 18 --
 .../resources/ui/admin-web/app/styles/main.css| 14 --
 .../app/views/directives/editableList.html|  2 +-
 .../ui/admin-web/app/views/groups/list.html   |  2 +-
 .../ui/admin-web/app/views/leftNavbar.html|  4 ++--
 .../resources/ui/admin-web/app/views/main.html|  1 +
 .../ui/admin-web/app/views/users/list.html|  2 +-
 8 files changed, 23 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
index 8999594..4cf39af 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
@@ -52,7 +52,7 @@ angular.module('ambariAdminConsole')
 PermissionSaver.saveClusterPermissions(
   $scope.permissionsEdit,
   {
-clusterId: $routeParams.id,
+clusterId: $routeParams.id
   }
 ).then(reloadClusterData)
 .catch(function(data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
index 5d72078..f157d70 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
@@ -53,7 +53,6 @@ angular.module('ambariAdminConsole')
   var elem = $editBox[0];
   var selection = window.getSelection(),
   range = document.createRange();
-
   elem.innerHTML = '\u00a0';
   range.selectNodeContents(elem);
   selection.removeAllRanges();
@@ -72,6 +71,7 @@ angular.module('ambariAdminConsole')
   case 13: // Enter
 $scope.$apply(function() {
   $scope.addItem();
+  $scope.focusOnInput();
 });
 return false;
 break;
@@ -117,6 +117,7 @@ angular.module('ambariAdminConsole')
   $scope.addItem(item);
 });
 $scope.clearInput();
+$scope.focusOnInput();
 
   } else {
 // Load typeahed items based on current input
@@ -129,30 +130,27 @@ angular.module('ambariAdminConsole')
 } else if($scope.resourceType === 'Group'){
   name = item.Groups.group_name;
 }
-
 if($scope.items.indexOf(name)  0){ // Only if item not in list
   items.push(name);
 }
-$scope.typeahead = items.slice(0, 5);
-$scope.selectedTypeahed = 0;
   });
+  $scope.typeahead = items.slice(0, 5);
+  $scope.selectedTypeahed = 0;
 });
   }
-
-
 } else {
   $scope.typeahead = [];
   $scope.selectedTypeahed = 0;
+  $scope.focusOnInput();
 }
   });
 
-  $scope.enableEditMode = function() {
+  $scope.enableEditMode = function(event) {
 if( $scope.editable  !$scope.editMode){
   $scope.editMode = true;
-  if( $scope.items.length === 0){
-$scope.focusOnInput();
-  }
+  $scope.focusOnInput();
 }
+event.stopPropagation();
   };
 
   $scope.cancel = function(event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css

[22/29] git commit: AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via akovalenko)

2014-09-19 Thread jonathanhurley
AMBARI-7406. hive database name and type showing in UI. (Denys Buzhor via 
akovalenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 52d8c27aa5f709074bbf33a2c908dd6ca739b89b
Parents: 0f7dee0
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Fri Sep 19 16:07:35 2014 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Fri Sep 19 16:15:09 2014 +0300

--
 ambari-web/app/data/HDP2/site_properties.js | 24 
 ambari-web/app/data/site_properties.js  | 24 
 2 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/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 8643095..1d2dbb4 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2638,6 +2638,30 @@ module.exports =
   filename: webhcat-env.xml,
   category: Advanced webhcat-env
 },
+{
+  id: puppet var,
+  name: hive_database_name,
+  displayName: hive_database_name,
+  defaultValue: ,
+  isReconfigurable: false,
+  isOverridable: false,
+  isVisible: true,
+  serviceName: HIVE,
+  filename: hive-env.xml,
+  category: Advanced hive-env
+},
+{
+  id: puppet var,
+  name: hive_database_type,
+  displayName: hive_database_type,
+  defaultValue: ,
+  isReconfigurable: false,
+  isOverridable: false,
+  isVisible: true,
+  serviceName: HIVE,
+  filename: hive-env.xml,
+  category: Advanced hive-env
+},
   
/**OOZIE***/
 {
   id: puppet var,

http://git-wip-us.apache.org/repos/asf/ambari/blob/52d8c27a/ambari-web/app/data/site_properties.js
--
diff --git a/ambari-web/app/data/site_properties.js 
b/ambari-web/app/data/site_properties.js
index 14c7045..06bbe09 100644
--- a/ambari-web/app/data/site_properties.js
+++ b/ambari-web/app/data/site_properties.js
@@ -1730,6 +1730,30 @@ module.exports =
   filename: hive-env.xml,
   category: Advanced hive-env
 },
+{
+  id: puppet var,
+  name: hive_database_name,
+  displayName: hive_database_name,
+  defaultValue: ,
+  isReconfigurable: false,
+  isOverridable: false,
+  isVisible: true,
+  serviceName: HIVE,
+  filename: hive-env.xml,
+  category: Advanced hive-env
+},
+{
+  id: puppet var,
+  name: hive_database_type,
+  displayName: hive_database_type,
+  defaultValue: ,
+  isReconfigurable: false,
+  isOverridable: false,
+  isVisible: true,
+  serviceName: HIVE,
+  filename: hive-env.xml,
+  category: Advanced hive-env
+},
   
/**HIVE***/
 {
   id: puppet var,



[15/29] git commit: AMBARI-7400. Slider View: Most view parameters should be made required. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7400. Slider View: Most view parameters should be made required. 
(onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: d62147ed37864f7f9f321448c3036ade0eeb681f
Parents: d7b09b6
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Sep 19 13:13:34 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Sep 19 13:13:34 2014 +0300

--
 .../app/assets/data/resource/cluster_name.json  |   12 -
 .../assets/data/resource/components_hosts.json  |   16 -
 .../ui/app/assets/data/resource/empty_json.json |1 +
 .../assets/data/resource/service_configs.json   |   38 -
 .../assets/data/resource/service_status.json|   95 --
 .../assets/data/resource/slider-properties.json |7 +-
 .../createAppWizard/step1_controller.js |   90 +-
 .../ui/app/controllers/slider_controller.js |  308 +---
 .../src/main/resources/ui/app/helpers/ajax.js   |  119 +-
 .../src/main/resources/ui/app/initialize.js |9 +-
 .../ui/app/mappers/slider_apps_mapper.js|7 +
 .../resources/ui/app/models/slider_config.js|   51 +
 .../src/main/resources/ui/app/routes/main.js|   16 +
 .../resources/ui/app/templates/application.hbs  |4 +-
 .../ui/app/templates/slider_title_tooltip.hbs   |2 +-
 .../src/main/resources/ui/app/translations.js   |7 +-
 .../resources/ui/app/views/application_view.js  |   13 +-
 .../slider/src/main/resources/ui/config.js  |1 +
 .../resources/ui/vendor/scripts/common/tv4.js   | 1605 ++
 .../views/slider/src/main/resources/view.xml|   21 +-
 20 files changed, 1815 insertions(+), 607 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
deleted file mode 100644
index f559483..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/cluster_name.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  href : http://162.216.151.215:8080/api/v1/clusters?_=1409232826826;,
-  items : [
-{
-  href : http://162.216.151.215:8080/api/v1/clusters/mycluster;,
-  Clusters : {
-cluster_name : mycluster,
-version : HDP-2.1
-  }
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
deleted file mode 100644
index eaf72b4..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/components_hosts.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  items : [
-{
-  Hosts : {
-host_name : myHost
-  },
-  host_components : [
-{
-  HostRoles : {
-component_name : 
-  }
-}
-  ]
-}
-  ]
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
new file mode 100644
index 000..0967ef4
--- /dev/null
+++ 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/empty_json.json
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d62147ed/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
deleted file mode 100644
index 24c1a31..000
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/service_configs.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  items : [
-{
-  cluster_name : cl,
-  configurations : [
-{
-  Config : {
-cluster_name : 

[05/29] git commit: AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics collection

2014-09-19 Thread jonathanhurley
AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics 
collection


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

Branch: refs/heads/branch-alerts-dev
Commit: 1498061ee682e92f60b82ce496f7e25fc5ff474b
Parents: 5c24d29
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu Sep 18 13:30:16 2014 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu Sep 18 13:30:16 2014 -0700

--
 .../HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml | 2 +-
 .../HDP/2.0.6/services/GANGLIA/package/scripts/params.py | 8 +---
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
index 3328acf..59d607a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
@@ -71,7 +71,7 @@
   property
 nameadditional_clusters/name
 value /value
-descriptionAdd additional desired Ganglia metrics cluster in the form 
name1:port1,name2:port2. Ensure that the names and ports are unique across 
all cluster and ports are available on ganglia server host. Ambari has reserved 
ports 8667-8669 within its own pool./description
+descriptionAdd additional desired Ganglia metrics cluster in the form 
name1,port1,name2,port2. Ensure that the names and ports are unique across 
all cluster and ports are available on ganglia server host. Ambari has reserved 
ports 8667-8669 within its own pool./description
   /property
 
 /configuration

http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
index bf36b93..a00f7b1 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
@@ -37,9 +37,11 @@ if gmond_add_clusters_str and 
gmond_add_clusters_str.isspace():
 
 gmond_app_strs = [] if gmond_add_clusters_str is None else 
gmond_add_clusters_str.split(',')
 gmond_apps = []
-for x in gmond_app_strs:
-  a,b = x.strip().split(':')
-  gmond_apps.append((a.strip(),b.strip()))
+
+i = 0
+while i  len(gmond_app_strs):
+  gmond_apps.append((gmond_app_strs[i].strip(), gmond_app_strs[i+1].strip()))
+  i = i + 2
 
 if System.get_instance().os_family == ubuntu:
   gmond_service_name = ganglia-monitor



[19/29] git commit: AMBARI-7403. Slider View: AppTypes should be determined only once at view load. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7403. Slider View: AppTypes should be determined only once at view load. 
(onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 201bcb3e81b172d585744c66449d76ca2f1b1d89
Parents: 0eb3937
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Sep 19 14:12:23 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Sep 19 14:12:23 2014 +0300

--
 contrib/views/slider/src/main/resources/ui/app/initialize.js   | 2 +-
 .../slider/src/main/resources/ui/app/mappers/application_type.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/initialize.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js 
b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 5428c3d..2a85588 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -112,7 +112,7 @@ App.initializer({
 
 });
 application.SliderController.proto().initResources();
-application.ApplicationTypeMapper.loop('load');
+application.ApplicationTypeMapper.load();
 application.SliderAppsMapper.loop('load');
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/201bcb3e/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js 
b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
index 938412e..e4bdd85 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/application_type.js
@@ -34,7 +34,7 @@
  * /ul
  * @type {App.Mapper}
  */
-App.ApplicationTypeMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
+App.ApplicationTypeMapper = App.Mapper.create({
 
   /**
* Map for parsing JSON received from server



[03/29] git commit: AMBARI-7353. Upgrade from ambari 1.6.0 - 1.7.0 fails, with schema upgrade failed. (jaimin)

2014-09-19 Thread jonathanhurley
AMBARI-7353. Upgrade from ambari 1.6.0 - 1.7.0 fails, with schema upgrade 
failed. (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: 742b71893633afd7ce1424239bd8937ba502a7a5
Parents: 35e
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Thu Sep 18 11:21:27 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Thu Sep 18 11:21:27 2014 -0700

--
 .../server/api/util/StackExtensionHelper.java   | 119 ++-
 .../server/upgrade/UpgradeCatalog170.java   |  43 +++
 2 files changed, 88 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/742b7189/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 3e211fe..2c5396b 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
@@ -17,6 +17,40 @@
  */
 package org.apache.ambari.server.api.util;
 
+import com.google.inject.Injector;
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.metadata.ActionMetadata;
+import org.apache.ambari.server.state.ClientConfigFileDefinition;
+import org.apache.ambari.server.state.CommandScriptDefinition;
+import org.apache.ambari.server.state.ComponentInfo;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.CustomCommandDefinition;
+import org.apache.ambari.server.state.DependencyInfo;
+import org.apache.ambari.server.state.PropertyInfo;
+import org.apache.ambari.server.state.ServiceInfo;
+import org.apache.ambari.server.state.ServiceOsSpecific;
+import org.apache.ambari.server.state.StackInfo;
+import org.apache.ambari.server.state.stack.ConfigurationXml;
+import org.apache.ambari.server.state.stack.RepositoryXml;
+import org.apache.ambari.server.state.stack.ServiceMetainfoXml;
+import org.apache.ambari.server.state.stack.StackMetainfoXml;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -31,33 +65,6 @@ import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
-import org.apache.ambari.server.metadata.ActionMetadata;
-import org.apache.ambari.server.state.*;
-import org.apache.ambari.server.state.stack.ConfigurationXml;
-import org.apache.ambari.server.state.stack.RepositoryXml;
-import org.apache.ambari.server.state.stack.ServiceMetainfoXml;
-import org.apache.ambari.server.state.stack.StackMetainfoXml;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import com.google.inject.Injector;
-
 /**
  * Helper methods for providing stack extension behavior -
  * Apache Jira: AMBARI-2819
@@ -520,8 +527,8 @@ public class StackExtensionHelper {
   }
 
   void populateServicesForStack(StackInfo stackInfo) throws
-  ParserConfigurationException, SAXException,
-  XPathExpressionException, IOException, JAXBException {
+  ParserConfigurationException, SAXException,
+  XPathExpressionException, IOException, JAXBException {
 

[29/29] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-19 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev


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

Branch: refs/heads/branch-alerts-dev
Commit: e2e79668ed94266487fe9d1d2ccba2003922e883
Parents: 179290e d7ed431
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Fri Sep 19 13:18:45 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Fri Sep 19 13:18:45 2014 -0400

--
 .../clusters/ClustersManageAccessCtrl.js|2 +-
 .../app/scripts/directives/editableList.js  |   18 +-
 .../resources/ui/admin-web/app/styles/main.css  |   14 +-
 .../app/views/directives/editableList.html  |2 +-
 .../ui/admin-web/app/views/groups/list.html |2 +-
 .../ui/admin-web/app/views/leftNavbar.html  |9 +-
 .../resources/ui/admin-web/app/views/main.html  |3 +-
 .../ui/admin-web/app/views/users/list.html  |2 +-
 .../test/python/ambari_agent/TestController.py  |4 +-
 .../TestCustomServiceOrchestrator.py|3 +-
 .../resource_management/TestCopyFromLocal.py|8 +-
 .../TestExecuteHadoopResource.py|   12 +-
 .../resource_management/TestExecuteResource.py  |3 +-
 .../core/providers/system.py|   12 +-
 .../python/resource_management/core/shell.py|   24 +-
 .../libraries/providers/copy_from_local.py  |4 +
 .../libraries/providers/execute_hadoop.py   |6 +-
 .../libraries/providers/hdfs_directory.py   |6 +-
 .../libraries/resources/copy_from_local.py  |1 +
 ambari-server/pom.xml   |8 +
 .../server/api/util/StackExtensionHelper.java   |  122 +-
 .../controller/MaintenanceStateHelper.java  |2 +-
 .../server/upgrade/UpgradeCatalog170.java   |   43 +-
 .../src/main/resources/properties.json  |1 +
 .../1.3.2/hooks/before-START/scripts/params.py  |2 +-
 .../services/HIVE/configuration/hcat-env.xml|   57 +
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml |   19 +-
 .../1.3.2/services/HIVE/package/scripts/hcat.py |   13 +-
 .../services/HIVE/package/scripts/params.py |2 +
 .../HIVE/package/templates/hcat-env.sh.j2   |   44 -
 .../configuration/capacity-scheduler.xml|2 +-
 .../2.0.6/hooks/after-INSTALL/scripts/params.py |   11 +-
 .../scripts/shared_initialization.py|4 +
 .../2.0.6/hooks/before-START/scripts/params.py  |   13 +-
 .../services/FLUME/package/scripts/flume.py |2 +-
 .../services/FLUME/package/scripts/params.py|6 +-
 .../GANGLIA/configuration/ganglia-env.xml   |2 +-
 .../services/GANGLIA/package/scripts/params.py  |8 +-
 .../services/HBASE/package/scripts/params.py|   16 +-
 .../services/HDFS/package/scripts/params.py |   18 +-
 .../HDFS/package/scripts/service_check.py   |2 +-
 .../services/HIVE/configuration/hcat-env.xml|   57 +
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml |   19 +-
 .../2.0.6/services/HIVE/package/scripts/hcat.py |   15 +-
 .../HIVE/package/scripts/hcat_service_check.py  |   10 +-
 .../HIVE/package/scripts/install_jars.py|2 +
 .../services/HIVE/package/scripts/params.py |   71 +-
 .../services/HIVE/package/scripts/webhcat.py|4 +
 .../HIVE/package/templates/hcat-env.sh.j2   |   43 -
 .../services/PIG/package/scripts/params.py  |   12 +-
 .../2.0.6/services/PIG/package/scripts/pig.py   |1 +
 .../services/SQOOP/package/scripts/params.py|   11 +-
 .../YARN/configuration/capacity-scheduler.xml   |2 +-
 .../package/scripts/mapred_service_check.py |4 +
 .../services/YARN/package/scripts/params.py |   24 +-
 .../YARN/package/scripts/service_check.py   |2 +-
 .../ZOOKEEPER/package/scripts/params.py |7 +-
 .../services/FALCON/package/scripts/params.py   |   12 +-
 .../services/STORM/package/scripts/params.py|   11 +-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |2 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |   34 -
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |4 +-
 .../HIVE/configuration/webhcat-site.xml |   14 +-
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |6 +-
 .../services/OOZIE/configuration/oozie-site.xml |   13 -
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |6 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml|2 +-
 .../services/SLIDER/package/scripts/params.py   |4 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |2 +-
 .../services/STORM/configuration/storm-env.xml  |   29 -
 

[02/29] git commit: AMBARI-7392. HCatalog config downloads Hive config files (aonishuk)

2014-09-19 Thread jonathanhurley
AMBARI-7392. HCatalog config downloads Hive config files (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 35ec804bf2a2dadff6348f1fdfa5b64295f1
Parents: 31a4106
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Sep 18 20:14:34 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Sep 18 20:14:34 2014 +0300

--
 .../1.3.2/hooks/before-START/scripts/params.py  |  2 +-
 .../services/HIVE/configuration/hcat-env.xml| 57 
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 19 +--
 .../1.3.2/services/HIVE/package/scripts/hcat.py | 13 ++---
 .../services/HIVE/package/scripts/params.py |  2 +
 .../HIVE/package/templates/hcat-env.sh.j2   | 44 ---
 .../services/HIVE/configuration/hcat-env.xml| 57 
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 19 +--
 .../2.0.6/services/HIVE/package/scripts/hcat.py | 13 ++---
 .../services/HIVE/package/scripts/params.py |  1 +
 .../HIVE/package/templates/hcat-env.sh.j2   | 43 ---
 .../stacks/1.3.2/HIVE/test_hcat_client.py   | 20 +++
 .../python/stacks/1.3.2/configs/default.json|  5 +-
 .../python/stacks/1.3.2/configs/secured.json|  5 +-
 .../stacks/2.0.6/HIVE/test_hcat_client.py   | 18 ---
 .../python/stacks/2.0.6/configs/default.json|  5 +-
 .../python/stacks/2.0.6/configs/secured.json|  5 +-
 17 files changed, 166 insertions(+), 162 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/35ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
index 51f8d61..a6aff0e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-START/scripts/params.py
@@ -94,7 +94,7 @@ ambari_db_rca_driver = 
config['hostLevelParams']['ambari_db_rca_driver']
 ambari_db_rca_username = config['hostLevelParams']['ambari_db_rca_username']
 ambari_db_rca_password = config['hostLevelParams']['ambari_db_rca_password']
 
-if has_namenode and 'rca_enabled' in config['configurations']['mapred-env']:
+if has_namenode and 'mapred-env' in config['configurations']:
   rca_enabled =  config['configurations']['mapred-env']['rca_enabled']
 else:
   rca_enabled = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/35ec/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
new file mode 100644
index 000..91b402b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hcat-env.xml
@@ -0,0 +1,57 @@
+?xml version=1.0?
+?xml-stylesheet type=text/xsl href=configuration.xsl?
+!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+--
+
+configuration
+  !-- hcat-env.sh --
+  property
+namecontent/name
+descriptionThis is the jinja template for hcat-env.sh file/description
+value
+  # Licensed to the Apache Software Foundation (ASF) under one
+  # or more contributor license agreements. See the NOTICE file
+  # distributed with this work for additional information
+  # regarding copyright ownership. The ASF licenses this file
+  # to you under the Apache License, Version 2.0 (the
+  # License); 

[09/29] git commit: AMBARI-7395. Configs: hover dismiss issues and ui cleanup.(xiwang)

2014-09-19 Thread jonathanhurley
AMBARI-7395. Configs: hover dismiss issues and ui cleanup.(xiwang)


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

Branch: refs/heads/branch-alerts-dev
Commit: 6446499d27acfa78c78608293a377a43835911e2
Parents: 84133c2
Author: Xi Wang xiw...@apache.org
Authored: Thu Sep 18 16:26:51 2014 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Sep 18 16:50:29 2014 -0700

--
 .../ui/admin-web/app/views/leftNavbar.html  |  2 -
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/models/service_config_version.js |  7 ++-
 ambari-web/app/styles/application.less  | 51 
 .../common/configs/config_history_flow.hbs  | 20 
 .../common/configs/service_version_box.hbs  | 17 +++
 .../templates/main/dashboard/config_history.hbs |  6 +--
 .../views/common/configs/config_history_flow.js | 19 +++-
 8 files changed, 63 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index 0aa9340..8119428 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -66,7 +66,6 @@
   Launch Install Wizard
 /a
   /div
-
 /div
   /div
 
@@ -98,6 +97,5 @@
 
 /div
   /div
-
 /div
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 1052d9b..67b7799 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2013,6 +2013,7 @@ Em.I18n.translations = {
   'dashboard.configHistory.table.configGroup.default' : 'default',
   'dashboard.configHistory.table.empty' : 'No history to display',
   'dashboard.configHistory.table.notes.default': 'Initial configurations for 
{0}',
+  'dashboard.configHistory.table.notes.no': 'iNo notes/i',
   'dashboard.configHistory.table.version.versionText' : 'V{0}',
   'dashboard.configHistory.table.version.prefix' : 'V',
   'dashboard.configHistory.table.current.tooltip' : 'Current config for 
{0}:{1}',

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/models/service_config_version.js
--
diff --git a/ambari-web/app/models/service_config_version.js 
b/ambari-web/app/models/service_config_version.js
index 61703ad..0f436a8 100644
--- a/ambari-web/app/models/service_config_version.js
+++ b/ambari-web/app/models/service_config_version.js
@@ -42,9 +42,12 @@ App.ServiceConfigVersion = DS.Model.extend({
   configGroupName: function () {
 return (this.get('groupName') === 'default') ? (this.get('displayName') + 
' ' + Em.I18n.t('common.default')) : this.get('groupName');
   }.property('groupName'),
-  briefNotes: function () {
-return (typeof this.get('notes') === 'string') ? 
this.get('notes').slice(0, 81) : ;
+  fullNotes: function () {
+return (typeof this.get('notes') === 'string') ? this.get('notes') || 
Em.I18n.t('dashboard.configHistory.table.notes.no') : 
Em.I18n.t('dashboard.configHistory.table.notes.no');
   }.property('notes'),
+  briefNotes: function () {
+return this.get('fullNotes').slice(0, 81);
+  }.property('fullNotes'),
   moreNotesExists: function () {
 return (typeof this.get('notes') === 'string') ?  this.get('notes').length 
 80 : false;
   }.property('notes'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/6446499d/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 0420804..e20980a 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -4995,15 +4995,15 @@ ul.inline li {
 height: 58px;
 margin: 5px 0;
 .flow-element {
-  width: 18.5%;
   height: 58px;
+  width: 15.2%;
   .version-box {
 position: relative;
 height: 90%;
   }
   .version-box .box {
 cursor: pointer;
-width: 72%;
+width: 92%;
 height: 100%;
 background-color: #ff;
 -webkit-border-radius: 4px;
@@ -5066,11 +5066,14 @@ 

[20/29] git commit: AMBARI-7404. configTypes field for stack service API should provide supports addProperty field. (aonishuk)

2014-09-19 Thread jonathanhurley
AMBARI-7404. configTypes field for stack service API should provide supports 
addProperty field. (aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 05f0b402fc8ee7d79325985ed4468809455e13ef
Parents: 201bcb3
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Fri Sep 19 15:10:30 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Fri Sep 19 15:10:30 2014 +0300

--
 .../server/api/util/StackExtensionHelper.java   |  3 +-
 .../src/main/resources/properties.json  |  1 +
 .../configuration/capacity-scheduler.xml|  2 +-
 .../YARN/configuration/capacity-scheduler.xml   |  2 +-
 .../api/util/StackExtensionHelperTest.java  | 40 ++--
 .../services/YARN/configuration/yarn-site.xml   |  2 +-
 6 files changed, 42 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/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 2c5396b..fe6c6bc 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
@@ -916,7 +916,8 @@ public class StackExtensionHelper {
*/
   protected enum Supports {
 
-FINAL(supports_final);
+FINAL(supports_final),
+ADDING_FORBIDDEN(supports_adding_forbidden);
 
 public static final String KEYWORD = supports;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/properties.json
--
diff --git a/ambari-server/src/main/resources/properties.json 
b/ambari-server/src/main/resources/properties.json
index 76797d3..b99ede5 100644
--- a/ambari-server/src/main/resources/properties.json
+++ b/ambari-server/src/main/resources/properties.json
@@ -248,6 +248,7 @@
 StackConfigurations/property_description,
 StackConfigurations/type,
 StackConfigurations/final,
+StackConfigurations/adding_forbidden,
 StackConfigurations/property_type,
 _
 ],

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
index 010a313..574d508 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/MAPREDUCE/configuration/capacity-scheduler.xml
@@ -22,7 +22,7 @@
 !-- The properties for a queue follow a naming convention,such as, --
 !-- mapred.capacity-scheduler.queue.queue-name.property-name. --
 
-configuration supports_final=true
+configuration supports_final=true supports_adding_forbidden=true
 
   property
 namemapred.capacity-scheduler.maximum-system-jobs/name

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
index 261d872..a8dc5c2 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
@@ -15,7 +15,7 @@
limitations under the License.
 --
 
-configuration supports_final=true
+configuration supports_final=true supports_adding_forbidden=true
 
   property
 nameyarn.scheduler.capacity.maximum-applications/name

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f0b402/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java

[23/29] git commit: AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. (onechiporenko)

2014-09-19 Thread jonathanhurley
AMBARI-7408. Slider View: Multiple small fixes to Create App wizard UI. 
(onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 0255e5dacf6ad02d262969d87edb9639c5bfb9ec
Parents: 52d8c27
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Fri Sep 19 16:58:39 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Fri Sep 19 17:01:10 2014 +0300

--
 .../ui-bg_flat_0_aa_40x100.png  | Bin 0 - 180 bytes
 .../ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 - 120 bytes
 .../ui-bg_glass_65_ff_1x400.png | Bin 0 - 105 bytes
 .../ui-bg_glass_75_dadada_1x400.png | Bin 0 - 111 bytes
 .../ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 - 110 bytes
 .../ui-bg_glass_75_ff_1x400.png | Bin 0 - 107 bytes
 .../ui-bg_highlight-soft_75_cc_1x100.png| Bin 0 - 101 bytes
 .../ui-bg_inset-soft_95_fef1ec_1x100.png| Bin 0 - 123 bytes
 .../ui-icons_22_256x240.png | Bin 0 - 4369 bytes
 .../ui-icons_2e83ff_256x240.png | Bin 0 - 4369 bytes
 .../ui-icons_454545_256x240.png | Bin 0 - 4369 bytes
 .../ui-icons_88_256x240.png | Bin 0 - 4369 bytes
 .../ui-icons_cd0a0a_256x240.png | Bin 0 - 4369 bytes
 .../ui-icons_f6cf3b_256x240.png | Bin 0 - 8884 bytes
 .../resources/ui/app/styles/application.less|  37 +++
 .../resources/ui/app/templates/slider_apps.hbs  |   3 +-
 .../src/main/resources/ui/app/translations.js   |   6 +--
 17 files changed, 41 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
new file mode 100644
index 000..5b5dab2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aa_40x100.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000..ad3d634
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
new file mode 100644
index 000..42ccba2
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ff_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000..5a46b47
Binary files /dev/null and 
b/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/0255e5da/contrib/views/slider/src/main/resources/ui/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
--
diff --git 

[14/14] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-20 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev

Conflicts:

ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java


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

Branch: refs/heads/branch-alerts-dev
Commit: 7f86e75c0c1e4868973340197b7cab112a319cb1
Parents: e2e7966 327accb
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Sat Sep 20 10:54:04 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Sat Sep 20 10:54:04 2014 -0400

--
 .../main/resources/ui/admin-web/app/index.html  |1 -
 .../app/scripts/controllers/NavbarCtrl.js   |   22 +-
 .../ui/admin-web/app/scripts/services/ldap.js   |   60 -
 .../resources/ui/admin-web/app/styles/main.css  |   10 +-
 .../ui/admin-web/app/views/leftNavbar.html  |9 -
 ambari-server/sbin/ambari-server|4 +
 .../LdapSyncEventResourceDefinition.java|   57 +
 .../resources/ResourceInstanceFactoryImpl.java  |4 +
 .../api/services/LdapSyncEventService.java  |  144 ++
 .../controller/AmbariManagementController.java  |   10 +-
 .../AmbariManagementControllerImpl.java |   31 +-
 .../internal/ControllerResourceProvider.java|   53 +-
 .../internal/DefaultProviderModule.java |2 +
 .../internal/LdapSyncEventResourceProvider.java |  438 ++
 .../controller/internal/URLStreamProvider.java  |4 +
 .../ambari/server/controller/spi/Resource.java  |4 +-
 .../orm/entities/LdapSyncEventEntity.java   |  284 
 .../server/orm/entities/LdapSyncSpecEntity.java |  143 ++
 .../ambari/server/proxy/ProxyService.java   |   17 +-
 .../server/security/authorization/Users.java|   17 +-
 .../security/ldap/AmbariLdapDataPopulator.java  |  268 +++-
 .../ambari/server/state/ConfigHelper.java   |   39 +
 .../server/state/stack/LatestRepoCallable.java  |   59 +-
 .../server/upgrade/AbstractUpgradeCatalog.java  |  215 ++-
 .../server/upgrade/UpgradeCatalog161.java   |2 +-
 .../server/upgrade/UpgradeCatalog170.java   |   27 +-
 .../server/view/HttpImpersonatorImpl.java   |  167 +++
 .../server/view/ImpersonatorSettingImpl.java|   63 +
 .../ambari/server/view/ViewContextImpl.java |   18 +-
 .../ambari/server/view/ViewProviderModule.java  |   26 +-
 .../apache/ambari/server/view/ViewRegistry.java |   22 +-
 ambari-server/src/main/python/ambari-server.py  |   74 +
 .../scripts/application_timeline_server.py  |2 +
 .../YARN/package/scripts/status_params.py   |1 +
 .../services/SLIDER/package/scripts/params.py   |4 +-
 .../services/SLIDER/package/scripts/slider.py   |   22 +-
 .../SLIDER/package/templates/slider-env.sh.j2   |   38 +
 .../SLIDER/package/templates/slider-wrapper.j2  |   42 -
 .../LdapSyncEventResourceDefinitionTest.java|   49 +
 .../server/api/services/AmbariMetaInfoTest.java |  205 ++-
 .../api/services/LdapSyncEventServiceTest.java  |   97 ++
 .../LdapSyncEventResourceProviderTest.java  |  114 ++
 .../orm/entities/LdapSyncEventEntityTest.java   |  166 +++
 .../orm/entities/LdapSyncSpecEntityTest.java|   95 ++
 .../ambari/server/proxy/ProxyServiceTest.java   |   14 +
 .../ldap/AmbariLdapDataPopulatorTest.java   | 1329 +-
 .../security/ldap/LdapPerformanceTest.java  |   10 +-
 .../server/upgrade/UpgradeCatalog161Test.java   |2 +-
 .../server/upgrade/UpgradeCatalog170Test.java   |   35 +-
 .../server/view/HttpImpersonatorImplTest.java   |  128 ++
 .../ambari/server/view/ViewRegistryTest.java|   20 +
 .../stacks/2.2/SLIDER/test_slider_client.py |   29 +-
 .../apache/ambari/view/HttpImpersonator.java|   53 +
 .../apache/ambari/view/ImpersonatorSetting.java |   46 +
 .../org/apache/ambari/view/ViewContext.java |   15 +
 ambari-web/app/utils/ajax/ajax.js   |   22 -
 contrib/views/jobs/pom.xml  |   15 +
 .../apache/ambari/view/jobs/ProxyServlet.java   |   68 +
 .../jobs/src/main/resources/WEB-INF/web.xml |   37 +
 .../app/scripts/controllers/jobs_controller.js  |   10 +-
 .../resources/ui/app/scripts/helpers/ajax.js|   25 +-
 .../resources/ui/app/scripts/helpers/jobs.js|   15 +-
 .../ui/app/scripts/routes/application_route.js  |8 +
 .../ui/app/controllers/slider_app_controller.js |2 +-
 .../ui/app/mappers/slider_apps_mapper.js|9 +
 .../main/resources/ui/app/models/slider_app.js  |5 +
 .../resources/ui/app/styles/application.less|6 +-
 .../ui/app/templates/slider_app/summary.hbs |2 +-
 .../resources/ui/app/templates/slider_apps.hbs  |2 +-
 69 files changed, 4458 insertions(+), 578 deletions(-)
--



[05/14] AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline ambari-server sync-ldap to call the API for syncing.

2014-09-20 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
index 906d695..93a0b46 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
@@ -18,11 +18,14 @@
 package org.apache.ambari.server.security.ldap;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import junit.framework.Assert;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
@@ -31,10 +34,10 @@ import org.apache.ambari.server.orm.entities.MemberEntity;
 import org.apache.ambari.server.orm.entities.PrincipalEntity;
 import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
+import org.apache.ambari.server.security.authorization.Group;
 import org.apache.ambari.server.security.authorization.LdapServerProperties;
 import org.apache.ambari.server.security.authorization.User;
 import org.apache.ambari.server.security.authorization.Users;
-import org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -42,76 +45,1312 @@ import org.junit.Test;
 import org.springframework.ldap.core.AttributesMapper;
 import org.springframework.ldap.core.LdapTemplate;
 
+import static junit.framework.Assert.*;
+import static org.easymock.EasyMock.*;
+
 public class AmbariLdapDataPopulatorTest {
-  private static class AmbariLdapDataPopulatorTestInstance extends 
AmbariLdapDataPopulator {
+  public static class AmbariLdapDataPopulatorTestInstance extends 
AmbariLdapDataPopulator {
 
-public AmbariLdapDataPopulatorTestInstance(Configuration configuration,
-Users users) {
+public AmbariLdapDataPopulatorTestInstance(Configuration configuration, 
Users users) {
   super(configuration, users);
-  this.ldapServerProperties = 
EasyMock.createNiceMock(LdapServerProperties.class);
 }
 
-final LdapTemplate ldapTemplate = 
EasyMock.createNiceMock(LdapTemplate.class);
+private LdapTemplate ldapTemplate;
 
 @Override
 protected LdapTemplate loadLdapTemplate() {
   return ldapTemplate;
 }
 
+public void setLdapTemplate(LdapTemplate ldapTemplate) {
+  this.ldapTemplate = ldapTemplate;
+}
+
 public LdapServerProperties getLdapServerProperties() {
   return this.ldapServerProperties;
 }
+
+public void setLdapServerProperties(LdapServerProperties 
ldapServerProperties) {
+  this.ldapServerProperties = ldapServerProperties;
+}
   }
 
   @Test
   public void testIsLdapEnabled_badConfiguration() {
-final Configuration configuration = 
EasyMock.createNiceMock(Configuration.class);
-final Users users = EasyMock.createNiceMock(Users.class);
+final Configuration configuration = createNiceMock(Configuration.class);
+final Users users = createNiceMock(Users.class);
 
-final AmbariLdapDataPopulator populator = new 
AmbariLdapDataPopulatorTestInstance(configuration, users);
+LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
+LdapServerProperties ldapServerProperties = 
createNiceMock(LdapServerProperties.class);
+expect(configuration.isLdapConfigured()).andReturn(true);
+expect(ldapTemplate.search(EasyMock.StringanyObject(), 
EasyMock.StringanyObject(), 
EasyMock.AttributesMapperanyObject())).andThrow(new 
NullPointerException()).once();
+replay(ldapTemplate, configuration, ldapServerProperties);
 
-EasyMock.expect(configuration.isLdapConfigured()).andReturn(true);
-EasyMock.expect(populator.loadLdapTemplate().search(EasyMock. 
StringanyObject(), EasyMock. StringanyObject(), EasyMock. 
AttributesMapperanyObject())).andThrow(new NullPointerException()).once();
-EasyMock.replay(populator.loadLdapTemplate(), configuration);
+final AmbariLdapDataPopulatorTestInstance populator = new 
AmbariLdapDataPopulatorTestInstance(configuration, users);
+populator.setLdapTemplate(ldapTemplate);
+populator.setLdapServerProperties(ldapServerProperties);
 
-Assert.assertFalse(populator.isLdapEnabled());
-EasyMock.verify(populator.loadLdapTemplate(), configuration);
+assertFalse(populator.isLdapEnabled());
+verify(populator.loadLdapTemplate(), configuration);
   }
 
   @Test
   public void 

[09/14] git commit: AMBARI-7418 - Views: cannot create instance w/o a restart.

2014-09-20 Thread jonathanhurley
AMBARI-7418 - Views: cannot create instance w/o a restart.


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

Branch: refs/heads/branch-alerts-dev
Commit: c840be073d1b969b50bedee9d8252dbc20ea9ab9
Parents: 4005051
Author: tbeerbower tbeerbo...@hortonworks.com
Authored: Fri Sep 19 18:32:31 2014 -0400
Committer: tbeerbower tbeerbo...@hortonworks.com
Committed: Fri Sep 19 18:49:46 2014 -0400

--
 .../ambari/server/view/ViewProviderModule.java  | 26 
 .../apache/ambari/server/view/ViewRegistry.java | 22 -
 .../ambari/server/view/ViewRegistryTest.java| 20 +++
 3 files changed, 46 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c840be07/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
index edaff1b..5fadf22 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewProviderModule.java
@@ -22,9 +22,7 @@ import 
org.apache.ambari.server.controller.spi.PropertyProvider;
 import org.apache.ambari.server.controller.spi.ProviderModule;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
-import org.apache.ambari.server.orm.entities.ViewEntity;
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -35,11 +33,6 @@ import java.util.Map;
  */
 public class ViewProviderModule implements ProviderModule {
   /**
-   * Mapping of view resource type to resource provider.
-   */
-  private final MapResource.Type, ResourceProvider resourceProviders;
-
-  /**
* The delegate provider module.
*/
   private final ProviderModule providerModule;
@@ -51,12 +44,9 @@ public class ViewProviderModule implements ProviderModule {
* Construct a view provider module.
*
* @param providerModule the delegate provider module
-   * @param resourceProviders  the map of view resource types to resource 
providers
*/
-  private ViewProviderModule(ProviderModule providerModule,
-MapResource.Type, ResourceProvider 
resourceProviders) {
+  private ViewProviderModule(ProviderModule providerModule) {
 this.providerModule = providerModule;
-this.resourceProviders = resourceProviders;
   }
 
 
@@ -65,6 +55,9 @@ public class ViewProviderModule implements ProviderModule {
   @Override
   public ResourceProvider getResourceProvider(Resource.Type type) {
 
+MapResource.Type, ResourceProvider resourceProviders =
+ViewRegistry.getInstance().getResourceProviders();
+
 if (resourceProviders.containsKey(type)) {
   return resourceProviders.get(type);
 }
@@ -87,15 +80,6 @@ public class ViewProviderModule implements ProviderModule {
* @return a view provider module
*/
   public static ViewProviderModule getViewProviderModule(ProviderModule 
module) {
-MapResource.Type, ResourceProvider resourceProviders = new 
HashMapResource.Type, ResourceProvider();
-
-ViewRegistry registry = ViewRegistry.getInstance();
-for (ViewEntity definition : registry.getDefinitions()) {
-  for (Resource.Type type : definition.getViewResourceTypes()){
-ResourceProvider provider = definition.getResourceProvider(type);
-resourceProviders.put(type, provider);
-  }
-}
-return new ViewProviderModule(module, resourceProviders);
+return new ViewProviderModule(module);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/c840be07/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 5e652a1..58c4334 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -29,6 +29,7 @@ import 
org.apache.ambari.server.api.services.ViewExternalSubResourceService;
 import org.apache.ambari.server.api.services.ViewSubResourceService;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
+import 

[04/14] git commit: AMBARI-7416. Slider View: Do not show Flex action when app is stopped (alexantonenko)

2014-09-20 Thread jonathanhurley
AMBARI-7416. Slider View: Do not show Flex action when app is stopped 
(alexantonenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: d018aa6a1b720149fe4417801122cd72c322e4ab
Parents: fbe97db
Author: Alex Antonenko hiv...@gmail.com
Authored: Fri Sep 19 21:11:25 2014 +0300
Committer: Alex Antonenko hiv...@gmail.com
Committed: Fri Sep 19 21:22:46 2014 +0300

--
 .../main/resources/ui/app/controllers/slider_app_controller.js | 2 +-
 .../slider/src/main/resources/ui/app/styles/application.less   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d018aa6a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index f042e38..94ae7e7 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -56,7 +56,7 @@ App.SliderAppController = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
 confirm: true
   });
 }
-if ('FINISHED' !== status) {
+if ('RUNNING' == status) {
   actions.push({
 title: 'Flex',
 action: 'flex',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d018aa6a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/styles/application.less 
b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index f0d0bab..98f52d4 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -595,6 +595,9 @@ select {
 border-width: 0;
   }
 }
+td:nth-child(2) span{
+  word-break: break-all;
+}
   }
   .panel-heading {
 font-weight: 700;
@@ -604,9 +607,6 @@ select {
 td:first-child {
   text-align: right;
 }
-span{
-  word-break: break-all;
-}
   }
   .panel-components {
 .status {



[03/14] git commit: AMBARI-7414. ATS shows stopped after upgrade 1.6.1 - 1.7.0.(vbrodetskyi)

2014-09-20 Thread jonathanhurley
AMBARI-7414. ATS shows stopped after upgrade 1.6.1 - 1.7.0.(vbrodetskyi)


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

Branch: refs/heads/branch-alerts-dev
Commit: fbe97db797a276a490b9aeba752a22df3e5a8f07
Parents: d99a275
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Fri Sep 19 21:01:24 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Fri Sep 19 21:01:24 2014 +0300

--
 .../services/YARN/package/scripts/application_timeline_server.py   | 2 ++
 .../HDP/2.0.6/services/YARN/package/scripts/status_params.py   | 1 +
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe97db7/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
index 85d97c2..b38c147 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/application_timeline_server.py
@@ -49,6 +49,8 @@ class ApplicationTimelineServer(Script):
   def status(self, env):
 import status_params
 env.set_params(status_params)
+Execute(format(mv {yarn_historyserver_pid_file_old} 
{yarn_historyserver_pid_file}),
+only_if = format(test -e {yarn_historyserver_pid_file_old}, 
user=status_params.yarn_user))
 check_process_status(status_params.yarn_historyserver_pid_file)
 
 if __name__ == __main__:

http://git-wip-us.apache.org/repos/asf/ambari/blob/fbe97db7/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
index 6bc977c..498a885 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/status_params.py
@@ -31,5 +31,6 @@ mapred_pid_dir = 
format({mapred_pid_dir_prefix}/{mapred_user})
 
 resourcemanager_pid_file = 
format({yarn_pid_dir}/yarn-{yarn_user}-resourcemanager.pid)
 nodemanager_pid_file = 
format({yarn_pid_dir}/yarn-{yarn_user}-nodemanager.pid)
+yarn_historyserver_pid_file_old = 
format({yarn_pid_dir}/yarn-{yarn_user}-historyserver.pid)
 yarn_historyserver_pid_file = 
format({yarn_pid_dir}/yarn-{yarn_user}-timelineserver.pid)  # 
*-historyserver.pid is deprecated
 mapred_historyserver_pid_file = 
format({mapred_pid_dir}/mapred-{mapred_user}-historyserver.pid)
\ No newline at end of file



[13/14] git commit: AMBARI-7350. Add SLIDER service to the stacks (part - II)

2014-09-20 Thread jonathanhurley
AMBARI-7350. Add SLIDER service to the stacks (part - II)


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

Branch: refs/heads/branch-alerts-dev
Commit: 327accb1345a7648b5cb740b94ed649721919f2c
Parents: b82ac7a
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Sat Sep 20 00:16:09 2014 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Sat Sep 20 00:16:09 2014 -0700

--
 .../services/SLIDER/package/scripts/params.py   |  4 +-
 .../services/SLIDER/package/scripts/slider.py   | 22 +-
 .../SLIDER/package/templates/slider-env.sh.j2   | 38 ++
 .../SLIDER/package/templates/slider-wrapper.j2  | 42 
 .../stacks/2.2/SLIDER/test_slider_client.py | 29 ++
 5 files changed, 46 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/327accb1/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py
index 062e5bd..31ad31d 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py
@@ -34,12 +34,12 @@ else:
   slider_conf_dir = /usr/lib/slider/conf
   slider_bin_dir = /usr/lib/slider/bin
 
+hadoop_conf_dir = /etc/hadoop/conf
 smokeuser = config['configurations']['cluster-env']['smokeuser']
-user_group = config['configurations']['cluster-env']['user_group']
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 smokeuser_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
 kinit_path_local = functions.get_kinit_path([/usr/bin, /usr/kerberos/bin, 
/usr/sbin])
 
 java64_home = config['hostLevelParams']['java_home']
 log4j_props = config['configurations']['slider-log4j']['content']
-slider_cmd = format({slider_bin_dir}/slider-wrapper)
\ No newline at end of file
+slider_cmd = format({slider_bin_dir}/slider)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/327accb1/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
index d9d0693..87e93f8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py
@@ -34,27 +34,9 @@ def slider():
 configurations=params.config['configurations']['slider-client']
   )
 
-  XmlConfig(core-site.xml,
-conf_dir=params.slider_conf_dir,
-configurations=params.config['configurations']['core-site'],
-
configuration_attributes=params.config['configuration_attributes']['core-site']
-  )
-
-  XmlConfig(hdfs-site.xml,
-conf_dir=params.slider_conf_dir,
-configurations=params.config['configurations']['hdfs-site'],
-
configuration_attributes=params.config['configuration_attributes']['hdfs-site']
-  )
-
-  XmlConfig(yarn-site.xml,
-conf_dir=params.slider_conf_dir,
-configurations=params.config['configurations']['yarn-site'],
-
configuration_attributes=params.config['configuration_attributes']['yarn-site']
-  )
-
-  File(format({slider_bin_dir}/slider-wrapper),
+  File(format({slider_conf_dir}/slider-env.sh),
mode=0755,
-   content=Template('slider-wrapper.j2')
+   content=Template('slider-env.sh.j2')
   )
 
   if (params.log4j_props != None):

http://git-wip-us.apache.org/repos/asf/ambari/blob/327accb1/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/slider-env.sh.j2
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/slider-env.sh.j2
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/slider-env.sh.j2
new file mode 100644
index 000..4872e29
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/slider-env.sh.j2
@@ -0,0 +1,38 @@
+{#
+# Licensed to 

[08/14] git commit: AMBARI-7348. Single Sign-On with Views API to impersonate account (alejandro)

2014-09-20 Thread jonathanhurley
AMBARI-7348. Single Sign-On with Views API to impersonate account (alejandro)


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

Branch: refs/heads/branch-alerts-dev
Commit: 40050513e2cecaabf4139e40e09f8b198e6a7bd5
Parents: 1f7dbd5
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Wed Sep 17 19:52:41 2014 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Fri Sep 19 11:47:20 2014 -0700

--
 .../controller/internal/URLStreamProvider.java  |   4 +
 .../ambari/server/proxy/ProxyService.java   |  17 +-
 .../server/view/HttpImpersonatorImpl.java   | 167 +++
 .../server/view/ImpersonatorSettingImpl.java|  63 +++
 .../ambari/server/view/ViewContextImpl.java |  18 +-
 .../ambari/server/proxy/ProxyServiceTest.java   |  14 ++
 .../server/view/HttpImpersonatorImplTest.java   | 128 ++
 .../apache/ambari/view/HttpImpersonator.java|  53 ++
 .../apache/ambari/view/ImpersonatorSetting.java |  46 +
 .../org/apache/ambari/view/ViewContext.java |  15 ++
 ambari-web/app/utils/ajax/ajax.js   |  22 ---
 contrib/views/jobs/pom.xml  |  15 ++
 .../apache/ambari/view/jobs/ProxyServlet.java   |  68 
 .../jobs/src/main/resources/WEB-INF/web.xml |  37 
 .../app/scripts/controllers/jobs_controller.js  |  10 +-
 .../resources/ui/app/scripts/helpers/ajax.js|  25 ++-
 .../resources/ui/app/scripts/helpers/jobs.js|  15 +-
 .../ui/app/scripts/routes/application_route.js  |   8 +
 18 files changed, 687 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/40050513/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
index 2b32d11..1b57c84 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
@@ -218,4 +218,8 @@ public class URLStreamProvider implements StreamProvider {
  
 return connection;
   }
+
+  public AppCookieManager getAppCookieManager() {
+return appCookieManager;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/40050513/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java 
b/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
index 30e998b..2cdffef 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/proxy/ProxyService.java
@@ -20,6 +20,7 @@ package org.apache.ambari.server.proxy;
 
 import com.google.gson.Gson;
 import org.apache.ambari.server.controller.internal.URLStreamProvider;
+import org.apache.ambari.server.view.ImpersonatorSettingImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,6 +37,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -48,9 +50,9 @@ import java.util.HashMap;
 @Path(/)
 public class ProxyService {
 
-  private static final int URL_CONNECT_TIMEOUT = 2;
-  private static final int URL_READ_TIMEOUT = 15000;
-  private static final int HTTP_ERROR_RANGE_START = 
Response.Status.BAD_REQUEST.getStatusCode();
+  public static final int URL_CONNECT_TIMEOUT = 2;
+  public static final int URL_READ_TIMEOUT = 15000;
+  public static final int HTTP_ERROR_RANGE_START = 
Response.Status.BAD_REQUEST.getStatusCode();
 
   private static final String REQUEST_TYPE_GET = GET;
   private static final String REQUEST_TYPE_POST = POST;
@@ -59,6 +61,7 @@ public class ProxyService {
   private static final String QUERY_PARAMETER_URL = url=;
   private static final String AMBARI_PROXY_PREFIX = AmbariProxy-;
   private static final String ERROR_PROCESSING_URL = Error occurred during 
processing URL ;
+  private static final String INVALID_PARAM_IN_URL = Invalid query params 
found in URL ;
 
   private final static Logger LOG = 
LoggerFactory.getLogger(ProxyService.class);
 
@@ 

[10/14] git commit: AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir Zounaidou via alejandro)

2014-09-20 Thread jonathanhurley
AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir 
Zounaidou via alejandro)


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

Branch: refs/heads/branch-alerts-dev
Commit: 348d918a91cd12688ea43b08931b419a7325ac9d
Parents: c840be0
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Fri Sep 19 16:07:52 2014 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Fri Sep 19 16:07:52 2014 -0700

--
 .../server/state/stack/LatestRepoCallable.java  |  59 
 .../server/api/services/AmbariMetaInfoTest.java | 135 ++-
 2 files changed, 164 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/348d918a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
index 47d93f1..efb2d0a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
@@ -41,13 +41,13 @@ import com.google.gson.reflect.TypeToken;
 public class LatestRepoCallable implements CallableVoid {
   private static final int LOOKUP_CONNECTION_TIMEOUT = 2000;
   private static final int LOOKUP_READ_TIMEOUT = 1000;
-  
+
   private final static Logger LOG = 
LoggerFactory.getLogger(LatestRepoCallable.class);
-  
+
   private String sourceUri = null;
   private File stackRepoFolder = null;
   private StackInfo stack = null;
-  
+
   public LatestRepoCallable(String latestSourceUri, File stackRepoFolder, 
StackInfo stack) {
 this.sourceUri = latestSourceUri;
 this.stackRepoFolder = stackRepoFolder;
@@ -56,19 +56,19 @@ public class LatestRepoCallable implements CallableVoid {
 
   @Override
   public Void call() throws Exception {
-
+
 Type type = new TypeTokenMapString, MapString, Object(){}.getType();
 Gson gson = new Gson();
-
+
 MapString, MapString, Object latestUrlMap = null;
-
+
 try {
   if (sourceUri.startsWith(http)) {
-
+
 URLStreamProvider streamProvider = new URLStreamProvider(
 LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
 null, null, null);
-
+
 LOG.info(Loading latest URL info from  + sourceUri);
 latestUrlMap = gson.fromJson(new InputStreamReader(
 streamProvider.readFrom(sourceUri)), type);
@@ -79,7 +79,7 @@ public class LatestRepoCallable implements CallableVoid {
 } else {
   jsonFile = new File(sourceUri);
 }
-
+
 if (jsonFile.exists()) {
   LOG.info(Loading latest URL info from  + jsonFile);
   latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
@@ -89,71 +89,76 @@ public class LatestRepoCallable implements CallableVoid {
   LOG.error(Could not load the URI  + sourceUri +  ( + e.getMessage() 
+ ));
   throw e;
 }
-
-
+
+
 if (null != latestUrlMap) {
   for (RepositoryInfo ri : stack.getRepositories()) {
 if (latestUrlMap.containsKey(ri.getRepoId())) {
   MapString, Object valueMap = latestUrlMap.get(ri.getRepoId());
   if (valueMap.containsKey(latest)) {
-
+
 @SuppressWarnings(unchecked)
 MapString, String osMap = (MapString, String) 
valueMap.get(latest);
-
+
 String baseUrl = resolveOsUrl(ri.getOsType(), osMap);
 if (null != baseUrl) {
   // !!! in the case where name.repo is defined with the base 
url, strip that off.
   // Agents do the reverse action (take the base url, and append 
name.repo)
-  
+
   String repo_file_format;
   if(ri.getOsType().equals(ubuntu12)) {
 repo_file_format = list;
   } else {
 repo_file_format = repo;
   }
-  
+
   String repoFileName = stack.getName().toLowerCase() + . + 
repo_file_format;
-  int idx = baseUrl.toLowerCase().indexOf(repoFileName); 
-  
+  int idx = baseUrl.toLowerCase().indexOf(repoFileName);
+
   if (-1 != idx  baseUrl.toLowerCase().endsWith(repoFileName)) {
 baseUrl = baseUrl.substring(0, idx);
   }
-  
+
   if ('/' == baseUrl.charAt(baseUrl.length()-1)) {
   

[06/14] git commit: AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline ambari-server sync-ldap to call the API for syncing.

2014-09-20 Thread jonathanhurley
AMBARI-7417. Admin Views: Remove SYNC LDAP from the UI and create commandline 
ambari-server sync-ldap to call the API for syncing.


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

Branch: refs/heads/branch-alerts-dev
Commit: 21d784b68764899c8aa7262ba4b9a447911ddc22
Parents: d018aa6
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Fri Sep 19 11:21:04 2014 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Fri Sep 19 11:24:05 2014 -0700

--
 .../main/resources/ui/admin-web/app/index.html  |1 -
 .../app/scripts/controllers/NavbarCtrl.js   |   22 +-
 .../ui/admin-web/app/scripts/services/ldap.js   |   60 -
 .../resources/ui/admin-web/app/styles/main.css  |   10 +-
 .../ui/admin-web/app/views/leftNavbar.html  |9 -
 ambari-server/sbin/ambari-server|4 +
 .../controller/AmbariManagementController.java  |   10 +-
 .../AmbariManagementControllerImpl.java |   31 +-
 .../internal/ControllerResourceProvider.java|   53 +-
 .../server/security/authorization/Users.java|   17 +-
 .../security/ldap/AmbariLdapDataPopulator.java  |  268 +++-
 ambari-server/src/main/python/ambari-server.py  |   74 +
 .../ldap/AmbariLdapDataPopulatorTest.java   | 1329 +-
 .../security/ldap/LdapPerformanceTest.java  |   10 +-
 14 files changed, 1673 insertions(+), 225 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/index.html
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html 
b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
index 7ff0638..2fb9fce 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -134,7 +134,6 @@
 script src=scripts/services/User.js/script
 script src=scripts/services/Group.js/script
 script src=scripts/services/View.js/script
-script src=scripts/services/ldap.js/script
 script src=scripts/services/Cluster.js/script
 script src=scripts/services/uiAlert.js/script
 script src=scripts/services/PermissionLoader.js/script

http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
index 9434cff..130d6fc 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 
'ROUTES', 'LDAP', 'ConfirmationModal', '$rootScope', function($scope, Cluster, 
$location, uiAlert, ROUTES, LDAP, ConfirmationModal, $rootScope) {
+.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 
'ROUTES', 'ConfirmationModal', '$rootScope', function($scope, Cluster, 
$location, uiAlert, ROUTES, ConfirmationModal, $rootScope) {
   $scope.cluster = null;
   $scope.editCluster = {
 name: '',
@@ -73,24 +73,4 @@ angular.module('ambariAdminConsole')
var r = new RegExp( route.url.replace(/(:\w+)/, '\\w+'));
return r.test($location.path());
   };
-
-  $scope.isLDAPConfigured = false;
-  $scope.ldapData = {};
-  LDAP.get().then(function(data) {
-$scope.ldapData = data.data;
-$scope.isLDAPConfigured = data.data['LDAP']['configured'];
-  });
-
-  $scope.syncLDAP = function() {
-ConfirmationModal.show('Sync LDAP', 'Are you sure you want to sync 
LDAP?').then(function() {
-  LDAP.sync($scope.ldapData['LDAP'].groups, 
$scope.ldapData['LDAP'].users).then(function() {
-uiAlert.success('LDAP synced successful');
-$rootScope.$evalAsync(function() {
-  $rootScope.LDAPSynced = true;
-});
-  }).catch(function(data) {
-uiAlert.danger(data.data.status, data.data.message);
-  });
-});
-  };
 }]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/21d784b6/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ldap.js 

[11/14] git commit: Revert AMBARI-7286. Use latest repo url in blueprints rather than the default (Cabir Zounaidou via alejandro)

2014-09-20 Thread jonathanhurley
Revert AMBARI-7286. Use latest repo url in blueprints rather than the default 
(Cabir Zounaidou via alejandro)


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

Branch: refs/heads/branch-alerts-dev
Commit: 380fc2c70c24a6fd719cfd6843043b1189243f70
Parents: 348d918
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Fri Sep 19 17:24:17 2014 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Fri Sep 19 17:24:17 2014 -0700

--
 .../server/state/stack/LatestRepoCallable.java  |  59 
 .../server/api/services/AmbariMetaInfoTest.java | 135 +--
 2 files changed, 30 insertions(+), 164 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/380fc2c7/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
index efb2d0a..47d93f1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
@@ -41,13 +41,13 @@ import com.google.gson.reflect.TypeToken;
 public class LatestRepoCallable implements CallableVoid {
   private static final int LOOKUP_CONNECTION_TIMEOUT = 2000;
   private static final int LOOKUP_READ_TIMEOUT = 1000;
-
+  
   private final static Logger LOG = 
LoggerFactory.getLogger(LatestRepoCallable.class);
-
+  
   private String sourceUri = null;
   private File stackRepoFolder = null;
   private StackInfo stack = null;
-
+  
   public LatestRepoCallable(String latestSourceUri, File stackRepoFolder, 
StackInfo stack) {
 this.sourceUri = latestSourceUri;
 this.stackRepoFolder = stackRepoFolder;
@@ -56,19 +56,19 @@ public class LatestRepoCallable implements CallableVoid {
 
   @Override
   public Void call() throws Exception {
-
+
 Type type = new TypeTokenMapString, MapString, Object(){}.getType();
 Gson gson = new Gson();
-
+
 MapString, MapString, Object latestUrlMap = null;
-
+
 try {
   if (sourceUri.startsWith(http)) {
-
+
 URLStreamProvider streamProvider = new URLStreamProvider(
 LOOKUP_CONNECTION_TIMEOUT, LOOKUP_READ_TIMEOUT,
 null, null, null);
-
+
 LOG.info(Loading latest URL info from  + sourceUri);
 latestUrlMap = gson.fromJson(new InputStreamReader(
 streamProvider.readFrom(sourceUri)), type);
@@ -79,7 +79,7 @@ public class LatestRepoCallable implements CallableVoid {
 } else {
   jsonFile = new File(sourceUri);
 }
-
+
 if (jsonFile.exists()) {
   LOG.info(Loading latest URL info from  + jsonFile);
   latestUrlMap = gson.fromJson(new FileReader(jsonFile), type);
@@ -89,76 +89,71 @@ public class LatestRepoCallable implements CallableVoid {
   LOG.error(Could not load the URI  + sourceUri +  ( + e.getMessage() 
+ ));
   throw e;
 }
-
-
+
+
 if (null != latestUrlMap) {
   for (RepositoryInfo ri : stack.getRepositories()) {
 if (latestUrlMap.containsKey(ri.getRepoId())) {
   MapString, Object valueMap = latestUrlMap.get(ri.getRepoId());
   if (valueMap.containsKey(latest)) {
-
+
 @SuppressWarnings(unchecked)
 MapString, String osMap = (MapString, String) 
valueMap.get(latest);
-
+
 String baseUrl = resolveOsUrl(ri.getOsType(), osMap);
 if (null != baseUrl) {
   // !!! in the case where name.repo is defined with the base 
url, strip that off.
   // Agents do the reverse action (take the base url, and append 
name.repo)
-
+  
   String repo_file_format;
   if(ri.getOsType().equals(ubuntu12)) {
 repo_file_format = list;
   } else {
 repo_file_format = repo;
   }
-
+  
   String repoFileName = stack.getName().toLowerCase() + . + 
repo_file_format;
-  int idx = baseUrl.toLowerCase().indexOf(repoFileName);
-
+  int idx = baseUrl.toLowerCase().indexOf(repoFileName); 
+  
   if (-1 != idx  baseUrl.toLowerCase().endsWith(repoFileName)) {
 baseUrl = baseUrl.substring(0, idx);
   }
-
+  
   if ('/' == baseUrl.charAt(baseUrl.length()-1)) {

[14/16] git commit: AMBARI-7434. Unable to download client configs (dlysnichenko)

2014-09-22 Thread jonathanhurley
AMBARI-7434. Unable to download client configs (dlysnichenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 57030a4d1915ea3d219c66ca2a65840b3e078481
Parents: fc89a92
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Mon Sep 22 20:03:04 2014 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Mon Sep 22 20:04:35 2014 +0300

--
 .../internal/ClientConfigResourceProvider.java  | 33 +---
 .../ClientConfigResourceProviderTest.java   |  9 --
 2 files changed, 35 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/57030a4d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 34f4d6f..1caae37e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -341,11 +341,13 @@ public class ClientConfigResourceProvider extends 
AbstractControllerResourceProv
   if (currentHostsIndexes == null) {
 continue;
   }
-  for (String hostIndex : currentHostsIndexes) {
-try {
-  hosts.add(allHosts[Integer.parseInt(hostIndex)]);
-} catch (ArrayIndexOutOfBoundsException ex) {
-  throw new SystemException(Failed to fill cluster host info  , ex);
+  for (String hostIndexRange : currentHostsIndexes) {
+for (Integer hostIndex : rangeToSet(hostIndexRange)) {
+  try {
+hosts.add(allHosts[hostIndex]);
+  } catch (ArrayIndexOutOfBoundsException ex) {
+throw new SystemException(Failed to fill cluster host info  , 
ex);
+  }
 }
   }
   clusterHostInfo.put(key, hosts);
@@ -353,6 +355,27 @@ public class ClientConfigResourceProvider extends 
AbstractControllerResourceProv
 return clusterHostInfo;
   }
 
+  private static SetInteger rangeToSet(String range) {
+SetInteger indexSet = new HashSetInteger();
+int startIndex;
+int endIndex;
+if (range.contains(-)) {
+  startIndex = Integer.parseInt(range.split(-)[0]);
+  endIndex = Integer.parseInt(range.split(-)[1]);
+}
+else if (range.contains(,)) {
+  startIndex = Integer.parseInt(range.split(,)[0]);
+  endIndex = Integer.parseInt(range.split(,)[1]);
+}
+else {
+  startIndex = endIndex = Integer.parseInt(range);
+}
+for (int i=startIndex; i=endIndex; i++) {
+  indexSet.add(i);
+}
+return  indexSet;
+  }
+
   @Override
   public RequestStatus updateResources(final Request request, Predicate 
predicate)
   throws SystemException, UnsupportedPropertyException, 
NoSuchResourceException, NoSuchParentResourceException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/57030a4d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index 916e0de..ef094b5 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -232,11 +232,16 @@ public class ClientConfigResourceProviderTest {
 PowerMock.mockStaticPartial(StageUtils.class, getClusterHostInfo);
 MapString, SetString clusterHostInfo = new HashMapString, 
SetString();
 SetString all_hosts = new 
HashSetString(Arrays.asList(Host100,Host101,Host102));
-SetString some_hosts = new HashSetString(Arrays.asList(0,2));
+SetString some_hosts = new HashSetString(Arrays.asList(0-1,2));
+SetString ohter_hosts = new HashSetString(Arrays.asList(0,1));
 SetString clusterHostTypes = new 
HashSetString(Arrays.asList(nm_hosts, hs_host,
 namenode_host, rm_host, snamenode_host, slave_hosts, 
zookeeper_hosts));
 for (String hostTypes: clusterHostTypes) {
-  

[06/16] git commit: AMBARI-7430. By default create apps folder for Slider apps and drop a README (aonishuk)

2014-09-22 Thread jonathanhurley
AMBARI-7430. By default create apps folder for Slider apps and drop a README 
(aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: 7b2f467377e13ae81dd17930c49b9755968ef679
Parents: 0221541
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Mon Sep 22 15:42:17 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Mon Sep 22 15:42:17 2014 +0300

--
 ambari-server/pom.xml   | 22 
 .../main/resources/slider_resources/README.txt  | 17 +++
 2 files changed, 39 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b2f4673/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index bbf21fe..6287cdb 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -426,6 +426,17 @@
   /sources
 /mapping
 mapping
+  directory/var/lib/ambari-server/resources/apps/directory
+  filemode755/filemode
+  usernameroot/username
+  groupnameroot/groupname
+  sources
+source
+  
locationsrc/main/resources/slider_resources/README.txt/location
+/source
+  /sources
+/mapping
+mapping
   directory/var/lib/ambari-server/resources/scripts/directory
   filemode755/filemode
   sources
@@ -679,6 +690,17 @@
 /mapper
   /data
   data
+srcsrc/main/resources/slider_resources/README.txt/src
+typefile/type
+mapper
+  typeperm/type
+  prefix/var/lib/ambari-server/resources/apps//prefix
+  userroot/user
+  grouproot/group
+  filemode755/filemode
+/mapper
+  /data
+  data
 srcconf/unix/ca.config/src
 typefile/type
 mapper

http://git-wip-us.apache.org/repos/asf/ambari/blob/7b2f4673/ambari-server/src/main/resources/slider_resources/README.txt
--
diff --git a/ambari-server/src/main/resources/slider_resources/README.txt 
b/ambari-server/src/main/resources/slider_resources/README.txt
new file mode 100644
index 000..4123e05
--- /dev/null
+++ b/ambari-server/src/main/resources/slider_resources/README.txt
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the License); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+Drop Apache Slider application .zip packages in this folder.
\ No newline at end of file



[16/16] git commit: Merge branch 'trunk' into branch-alerts-dev

2014-09-22 Thread jonathanhurley
Merge branch 'trunk' into branch-alerts-dev


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

Branch: refs/heads/branch-alerts-dev
Commit: e6cc05872462d53f9b420837f129921d0e2e0b24
Parents: 7f86e75 802df76
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Mon Sep 22 10:47:55 2014 -0700
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Mon Sep 22 10:47:55 2014 -0700

--
 ambari-server/pom.xml   |  22 
 .../internal/ClientConfigResourceProvider.java  |  33 -
 .../internal/ConfigGroupResourceProvider.java   |  15 ++-
 .../server/upgrade/UpgradeCatalog170.java   |  68 +-
 .../main/resources/slider_resources/README.txt  |  17 +++
 .../services/GANGLIA/package/scripts/params.py  |   5 +-
 .../services/GANGLIA/package/scripts/params.py  |   6 +-
 .../services/OOZIE/package/scripts/oozie.py |  10 +-
 .../services/OOZIE/package/scripts/params.py|  13 +-
 .../services/SQOOP/package/scripts/params.py|   2 +
 .../SQOOP/package/scripts/service_check.py  |   1 +
 .../services/FALCON/package/scripts/falcon.py   |   4 +
 .../services/STORM/configuration/storm-site.xml |   6 +-
 .../services/SLIDER/package/scripts/slider.py   |   3 +-
 .../services/STORM/configuration/storm-site.xml |   6 +-
 .../ClientConfigResourceProviderTest.java   |   9 +-
 .../ConfigGroupResourceProviderTest.java|  37 +-
 .../server/upgrade/UpgradeCatalog170Test.java   | 125 ---
 .../stacks/2.0.6/OOZIE/test_oozie_client.py |  18 +--
 .../stacks/2.0.6/OOZIE/test_oozie_server.py |  18 +--
 .../stacks/2.0.6/SQOOP/test_service_check.py|   2 +
 .../stacks/2.1/FALCON/test_falcon_client.py |   4 +
 .../stacks/2.1/FALCON/test_falcon_server.py |   4 +
 .../stacks/2.2/SLIDER/test_slider_client.py |   4 +-
 .../main/dashboard/config_history_controller.js |   1 +
 ambari-web/app/controllers/main/service/item.js |  28 -
 ambari-web/app/templates/main/host/details.hbs  |   2 +-
 ambari-web/app/templates/main/service/item.hbs  |  13 +-
 ambari-web/app/views/common/filter_view.js  |  74 ++-
 .../views/main/dashboard/config_history_view.js |  10 +-
 ambari-web/app/views/main/service/item.js   |   6 +-
 contrib/views/slider/docs/index.md  |  63 ++
 .../view/slider/SliderAppsViewController.java   |   8 ++
 .../slider/SliderAppsViewControllerImpl.java|  69 +-
 .../assets/data/resource/slider-properties.json |   7 +-
 .../ui/app/controllers/slider_controller.js |  20 ++-
 .../src/main/resources/ui/app/helpers/ajax.js   |   7 +-
 .../resources/ui/app/models/slider_config.js|   8 +-
 .../src/main/resources/ui/app/routes/main.js|   7 +-
 .../src/main/resources/ui/app/translations.js   |   1 +
 .../views/slider/src/main/resources/view.xml|  25 
 41 files changed, 596 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/pom.xml
--

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
--



[03/16] git commit: AMBARI-7427 It is not possible to change Custom Created dates again. (Buzhor Denys via ababiichuk)

2014-09-22 Thread jonathanhurley
AMBARI-7427 It is not possible to change Custom Created dates again. (Buzhor 
Denys via ababiichuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: af150a1be3dd007625397c5dc03aa6547343cf28
Parents: 3590d7d
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Mon Sep 22 14:40:03 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Mon Sep 22 14:40:03 2014 +0300

--
 .../main/dashboard/config_history_controller.js |  1 +
 ambari-web/app/views/common/filter_view.js  | 74 +++-
 .../views/main/dashboard/config_history_view.js | 10 ++-
 3 files changed, 82 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af150a1b/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 e6d8614..582874c 100644
--- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js
+++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
@@ -127,6 +127,7 @@ App.MainConfigHistoryController = 
Em.ArrayController.extend(App.TableServerMixin
   time = curTime - 259200;
   break;
 case 'Custom':
+case 'Custom2':
   customDatePopup.showCustomDatePopup(this, this.get('actualValues'));
   break;
 case 'Any':

http://git-wip-us.apache.org/repos/asf/ambari/blob/af150a1b/ambari-web/app/views/common/filter_view.js
--
diff --git a/ambari-web/app/views/common/filter_view.js 
b/ambari-web/app/views/common/filter_view.js
index f279fd3..83d23a7 100644
--- a/ambari-web/app/views/common/filter_view.js
+++ b/ambari-web/app/views/common/filter_view.js
@@ -50,6 +50,24 @@ var wrapperView = Ember.View.extend({
*/
   fieldId: null,
 
+  /**
+   * This option is useful for Em.Select, if you want get events when same 
option selected more than one time a raw.
+   * This property is Object[] (for example see 
App.MainConfigHistoryView.modifiedFilterView),
+   * that have followed structure:
+   *
+   * code
+   * [
+   *  {
+   *values: ['DefinedValue1', 'DefinedValue2'], // this properties should 
be defined in `content` property
+   *displayAs: 'Choose me' // this value will be displayed
+   *  }
+   * ]
+   * /code
+   * @type {Array}
+   *
+   **/
+  triggeredOnSameValue: null,
+
   clearFilter: function(){
 this.set('value', this.get('emptyValue'));
 if(this.get('setPropertyOnApply')){
@@ -136,6 +154,60 @@ var wrapperView = Ember.View.extend({
 var parent = this.$().parent();
 this.set('parentNode', parent);
 parent.addClass('notActive');
+this.checkSelectSpecialOptions();
+  },
+
+  /**
+   * Check for Em.Select that should use dispatching event when option with 
same value selected more than one time.
+   **/
+  checkSelectSpecialOptions: function() {
+// check predefined property
+if (!this.get('triggeredOnSameValue') || 
!this.get('triggeredOnSameValue').length) return;
+// add custom additional observer that will handle property changes
+this.addObserver('value', this, 'valueCustomObserver');
+// get the full class attribute to find our select
+var classInlineAttr = this.get('fieldType').split(',')
+  .map(function(className) {
+return '.' + className.trim();
+  }).join('');
+this.set('classInlineAttr', classInlineAttr);
+this.get('triggeredOnSameValue').forEach(function(triggeredValue) {
+  triggeredValue.values.forEach(function(value, index) {
+// option with property `value`
+var $optionEl = $(this.get('element')).find(classInlineAttr)
+  .find('option[value=' + value + ']');
+// should be displayed with `displayAs` caption
+$optionEl.text(triggeredValue.displayAs);
+// the second one option should be hidden
+// as the result, on init stage we show only one option that could be 
selected
+if (index == 1) {
+  $optionEl.css('display', 'none');
+}
+  }, this);
+}, this);
+  },
+  /**
+   *
+   * Custom observer that used for special case of Em.Select related to 
dispatching event
+   * when option with same value selected more than one time.
+   *
+   **/
+  valueCustomObserver: function() {
+var hiddenValue;
+this.get('triggeredOnSameValue').forEach(function(triggeredValue) {
+  var values = 

[10/16] git commit: AMBARI-7433. Issues on upgrade ambari 1.6.0-1.7.0(ambari+mysql)(vbrodetskyi)

2014-09-22 Thread jonathanhurley
AMBARI-7433. Issues on upgrade ambari 1.6.0-1.7.0(ambari+mysql)(vbrodetskyi)


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

Branch: refs/heads/branch-alerts-dev
Commit: 6eecc2c156cdb9058f3c098770590a00b6ab32ff
Parents: f4ddfd6
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Mon Sep 22 17:49:54 2014 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Mon Sep 22 17:49:54 2014 +0300

--
 .../apache/ambari/server/upgrade/UpgradeCatalog170.java   | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eecc2c1/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 1313a3f..db96aa7 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
@@ -332,7 +332,7 @@ public class UpgradeCatalog170 extends 
AbstractUpgradeCatalog {
   }
 } else if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
   if (dbAccessor.tableHasData(clusterconfig)) {
-dbAccessor.executeQuery(UPDATE viewinstance  +
+dbAccessor.executeQuery(UPDATE clusterconfig  +
   SET config_id = (SELECT @a := @a + 1 FROM (SELECT @a := 1) s));
   }
 } else if (Configuration.POSTGRES_DB_NAME.equals(dbType)) {
@@ -370,7 +370,11 @@ public class UpgradeCatalog170 extends 
AbstractUpgradeCatalog {
 
 populateConfigVersions();
 
-dbAccessor.setNullable(clusterconfig, version, false);
+if (Configuration.MYSQL_DB_NAME.equals(dbType)) {
+  dbAccessor.executeQuery(ALTER TABLE clusterconfig MODIFY version BIGINT 
NOT NULL);
+} else {
+  dbAccessor.setNullable(clusterconfig, version, false);
+}
 
 dbAccessor.executeQuery(ALTER TABLE clusterconfig ADD CONSTRAINT 
UQ_config_type_tag UNIQUE (cluster_id, type_name, version_tag), true);
 dbAccessor.executeQuery(ALTER TABLE clusterconfig ADD CONSTRAINT 
UQ_config_type_version UNIQUE (cluster_id, type_name, version), true);
@@ -481,7 +485,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 CHANGE value 
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)) {



[01/16] git commit: AMBARI-7421. Slider View should support secured cluster (srimanth)

2014-09-22 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-alerts-dev 7f86e75c0 - e6cc05872


AMBARI-7421. Slider View should support secured cluster (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: d46bbdfa95e52063899c62d5711b3fcab31c5d81
Parents: 327accb
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Sat Sep 20 17:58:19 2014 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Sat Sep 20 18:10:36 2014 -0700

--
 contrib/views/slider/docs/index.md  | 63 ++
 .../view/slider/SliderAppsViewController.java   |  8 +++
 .../slider/SliderAppsViewControllerImpl.java| 69 ++--
 .../views/slider/src/main/resources/view.xml| 25 +++
 4 files changed, 132 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/docs/index.md
--
diff --git a/contrib/views/slider/docs/index.md 
b/contrib/views/slider/docs/index.md
new file mode 100644
index 000..534f317
--- /dev/null
+++ b/contrib/views/slider/docs/index.md
@@ -0,0 +1,63 @@
+# Slider Apps View
+
+## Security Guide
+*Slider Apps View* can optionally connect to a Kerberos secured cluster by 
following the below steps.
+
+ Step-1: Deploy a HDP cluster and secure it using *Kerberos*
+After deploying a HDP cluster through Ambari, it can be secured by using the 
*Enable Security* button in *Admin  Seurity* page.
+
+ Step-2: Create *Kerberos* principal for view
+We need to provide a *Kerberos* identity for the process in which the view is 
run. We shall identify the user as `view-principal`. Since views are generally 
hosted by Ambari server, typically this can be named as *ambari*.
+
+On the machine where *KDC Server* is hosted, create user principal by running 
below command
+
+```
+kadmin.local -q addprinc -randkey view-princi...@example.com
+```
+Next, extract keytab file 
+
+```
+kadmin.local -q xst -k /path/to/keytab/view-principal.headless.keytab 
view-princi...@example.com
+```
+The keytab file should then be copied over to the keytabs location on the host 
where the view is hosted.
+
+```
+cp /path/to/keytab/view-principal.headless.keytab /etc/security/keytabs/
+```
+
+Change file permissions so that only necessary users can access it.
+
+```
+chmod 440 /etc/security/keytabs/view-principal.headless.keytab
+```
+
+ Step-3: Configure *proxyuser* for created principal
+Add the following configurations in *Custom core-site* section of *HDFS* 
service.
+
+* hadoop.proxyuser.ambari.groups = *
+* hadoop.proxyuser.ambari.hosts = `view-server-host`
+
+This will in-turn show up in *core-site.xml* as
+
+```
+property
+  namehadoop.proxyuser.view-principal.groups/name
+  value*/value
+/property
+
+property
+  namehadoop.proxyuser.view-principal.hosts/name
+  valueview-server-host.ambari.apache.org/value
+/property
+```
+Restart HDFS and YARN services.
+
+ Step-4: Create *Slider Apps View* with security parameters
+
+From *Ambari-Admin* create a *Slider Apps View* with the below parameters 
populated
+
+* slider.security.enabled = true
+* yarn.resourcemanager.principal = `rm/_h...@example.com`
+* dfs.namenode.kerberos.principal = `nn/_h...@example.com`
+* view.kerberos.principal = `view-principal`
+* view.kerberos.principal.keytab = 
`/etc/security/keytabs/view-principal.headless.keytab`
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d46bbdfa/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
index 64ab78c..0cf5d15 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
@@ -35,6 +35,14 @@ public interface SliderAppsViewController {
   public static final String PROPERTY_YARN_RM_ADDRESS = 
yarn.resourcemanager.address;
   public static final String PROPERTY_YARN_RM_SCHEDULER_ADDRESS = 
yarn.resourcemanager.scheduler.address;
   public static final String PROPERTY_ZK_QUOROM = zookeeper.quorum;
+  public static final String PROPERTY_GANGLIA_SERVER_HOSTNAME = 
ganglia.server.hostname;
+  public static final String PROPERTY_GANGLIA_CUSTOM_CLUSTERS = 

[05/16] git commit: Merge remote-tracking branch 'origin/trunk' into trunk

2014-09-22 Thread jonathanhurley
Merge remote-tracking branch 'origin/trunk' into trunk


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

Branch: refs/heads/branch-alerts-dev
Commit: 02215416f701215570bfb3eeb23db3cf1461824f
Parents: af150a1 6236d62
Author: aBabiichuk ababiic...@cybervisiontech.com
Authored: Mon Sep 22 14:43:24 2014 +0300
Committer: aBabiichuk ababiic...@cybervisiontech.com
Committed: Mon Sep 22 14:43:24 2014 +0300

--
 .../views/slider/src/main/resources/ui/app/helpers/ajax.js| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--




[13/16] git commit: AMBARI-7425. WebHCat Issues with after 1.6.1 - 1.7.0 upgrade. (jaimin)

2014-09-22 Thread jonathanhurley
AMBARI-7425. WebHCat Issues with after 1.6.1 - 1.7.0 upgrade. (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: fc89a92df5a7686f7e072789467c3fcfbafda718
Parents: 97ff55a
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Sep 22 09:53:18 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Sep 22 09:53:18 2014 -0700

--
 .../server/upgrade/UpgradeCatalog170.java   |  58 -
 .../server/upgrade/UpgradeCatalog170Test.java   | 125 ---
 2 files changed, 103 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fc89a92d/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 db96aa7..bbc29f2 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
@@ -18,30 +18,9 @@
 
 package org.apache.ambari.server.upgrade;
 
-import java.lang.reflect.Type;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Expression;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
+import com.google.common.reflect.TypeToken;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
@@ -50,8 +29,6 @@ import org.apache.ambari.server.orm.dao.ClusterDAO;
 import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
 import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO;
 import org.apache.ambari.server.orm.dao.DaoUtils;
-import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
-import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
 import org.apache.ambari.server.orm.dao.KeyValueDAO;
 import org.apache.ambari.server.orm.dao.PermissionDAO;
@@ -96,9 +73,28 @@ import org.apache.ambari.server.utils.StageUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.reflect.TypeToken;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.lang.reflect.Type;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
 
 /**
  * Upgrade catalog for version 1.7.0.
@@ -664,8 +660,6 @@ public class UpgradeCatalog170 extends 
AbstractUpgradeCatalog {
 ClusterServiceDAO clusterServiceDAO = 
injector.getInstance(ClusterServiceDAO.class);
 ServiceDesiredStateDAO serviceDesiredStateDAO = 
injector.getInstance(ServiceDesiredStateDAO.class);
 ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO = 
injector.getInstance(ServiceComponentDesiredStateDAO.class);
-HostComponentDesiredStateDAO hostComponentDesiredStateDAO = 
injector.getInstance(HostComponentDesiredStateDAO.class);
-HostComponentStateDAO hostComponentStateDAO = 
injector.getInstance(HostComponentStateDAO.class);
 
 ListClusterEntity clusterEntities = clusterDAO.findAll();
 for (final ClusterEntity 

[09/16] git commit: AMBARI-7432 Sqoop service check fails for HDP2.2 (dsen)

2014-09-22 Thread jonathanhurley
AMBARI-7432 Sqoop service check fails for HDP2.2 (dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: f4ddfd65b9f070f23fb9489ad09e893bd5257be8
Parents: 201b7e9
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 22 17:03:05 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 22 17:03:05 2014 +0300

--
 .../stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py  | 2 ++
 .../HDP/2.0.6/services/SQOOP/package/scripts/service_check.py  | 1 +
 .../src/test/python/stacks/2.0.6/SQOOP/test_service_check.py   | 2 ++
 3 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
index e97bb9f..ff200b8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/params.py
@@ -30,11 +30,13 @@ if rpm_version is not None:
   sqoop_lib = '/usr/hdp/current/sqoop/lib'
   hbase_home = '/usr/hdp/current/hbase'
   hive_home = '/usr/hdp/current/hive'
+  sqoop_bin_dir = '/usr/hdp/current/sqoop/bin/'
 else:
   sqoop_conf_dir = /usr/lib/sqoop/conf
   sqoop_lib = /usr/lib/sqoop/lib
   hbase_home = /usr
   hive_home = /usr
+  sqoop_bin_dir = /usr/bin
 
 zoo_conf_dir = /etc/zookeeper
 security_enabled = config['configurations']['cluster-env']['security_enabled']

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
index c42501a..98edc1c 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/SQOOP/package/scripts/service_check.py
@@ -30,6 +30,7 @@ class SqoopServiceCheck(Script):
 Execute(format({kinit_path_local}  -kt {smoke_user_keytab} 
{smokeuser}))
 Execute(sqoop version,
 user = params.smokeuser,
+path = params.sqoop_bin_dir,
 logoutput = True
 )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4ddfd65/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py 
b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
index fa87bc6..21f9663 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_service_check.py
@@ -31,6 +31,7 @@ class TestSqoopServiceCheck(RMFTestCase):
 self.assertResourceCalled('Execute', '/usr/bin/kinit  -kt 
/etc/security/keytabs/smokeuser.headless.keytab ambari-qa',)
 self.assertResourceCalled('Execute', 'sqoop version',
   logoutput = True,
+  path = ['/usr/bin'],
   user = 'ambari-qa',)
 self.assertNoMoreResources()
 
@@ -42,6 +43,7 @@ class TestSqoopServiceCheck(RMFTestCase):
 )
 self.assertResourceCalled('Execute', 'sqoop version',
   logoutput = True,
+  path = ['/usr/bin'],
   user = 'ambari-qa',)
 self.assertNoMoreResources()
 



[11/16] git commit: AMBARI-7435 Issues with Hive Client Configs download. (atkach)

2014-09-22 Thread jonathanhurley
AMBARI-7435 Issues with Hive Client Configs download. (atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 329b62fd7f88ffeb0e3005b9cf6431f560e14928
Parents: 6eecc2c
Author: atkach atk...@hortonworks.com
Authored: Mon Sep 22 18:52:08 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Mon Sep 22 18:52:08 2014 +0300

--
 ambari-web/app/controllers/main/service/item.js | 28 +---
 ambari-web/app/templates/main/host/details.hbs  |  2 +-
 ambari-web/app/templates/main/service/item.hbs  | 13 -
 ambari-web/app/views/main/service/item.js   |  6 +++--
 4 files changed, 42 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/controllers/main/service/item.js
--
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index 84d833f..5325c2d 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -101,6 +101,21 @@ App.MainServiceItemController = Em.Controller.extend({
 
   allHosts: [],
 
+  clientComponents: function () {
+var clientNames = [];
+var clients = 
App.StackServiceComponent.find().filterProperty('serviceName', 
this.get('content.serviceName')).filterProperty('isClient');
+clients.forEach(function (item) {
+  clientNames.push({
+action: 'downloadClientConfigs',
+context: {
+  name: item.get('componentName'),
+  label: item.get('displayName')
+}
+  });
+});
+return clientNames;
+  }.property('content.serviceName'),
+
   /**
* Common method for ajax (start/stop service) responses
* @param data
@@ -611,6 +626,13 @@ App.MainServiceItemController = Em.Controller.extend({
 return (this.get('content.healthStatus') != 'green');
   }.property('content.healthStatus','isPending'),
 
+  /**
+   * Determine if service has than one service client components
+   */
+  isSeveralClients: function () {
+return App.StackServiceComponent.find().filterProperty('serviceName', 
this.get('content.serviceName')).filterProperty('isClient').length  1;
+  }.property('content.serviceName'),
+
   enableHighAvailability: function() {
 var ability_controller = 
App.router.get('mainAdminHighAvailabilityController');
 ability_controller.enableHighAvailability();
@@ -626,12 +648,12 @@ App.MainServiceItemController = Em.Controller.extend({
 ability_controller.enableRMHighAvailability();
   },
 
-  downloadClientConfigs: function () {
+  downloadClientConfigs: function (event) {
 var component = 
this.get('content.hostComponents').findProperty('isClient');
 componentsUtils.downloadClientConfigs.call(this, {
   serviceName: this.get('content.serviceName'),
-  componentName: component.get('componentName'),
-  displayName: component.get('displayName')
+  componentName: (event  event.name) || component.get('componentName'),
+  displayName: (event  event.label) || component.get('displayName')
 });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/templates/main/host/details.hbs
--
diff --git a/ambari-web/app/templates/main/host/details.hbs 
b/ambari-web/app/templates/main/host/details.hbs
index 41ea3e0..784063f 100644
--- a/ambari-web/app/templates/main/host/details.hbs
+++ b/ambari-web/app/templates/main/host/details.hbs
@@ -55,7 +55,7 @@
   ul class=dropdown-menu
 {{#each client in view.clients}}
   li
-a {{action downloadClientConfigs 
client target=controller href=true}}{{client.service.displayName}}/a
+a {{action downloadClientConfigs 
client target=controller href=true}}{{client.displayName}}/a
   /li
 {{/each}}
   /ul

http://git-wip-us.apache.org/repos/asf/ambari/blob/329b62fd/ambari-web/app/templates/main/service/item.hbs
--
diff --git a/ambari-web/app/templates/main/service/item.hbs 
b/ambari-web/app/templates/main/service/item.hbs
index 71bf554..a264f5f 100644
--- a/ambari-web/app/templates/main/service/item.hbs
+++ b/ambari-web/app/templates/main/service/item.hbs
@@ -83,11 +83,22 @@
 

[12/16] git commit: AMBARI-7423. ganglia host metrics not showing in non-HDFS cluster. (jaimin)

2014-09-22 Thread jonathanhurley
AMBARI-7423. ganglia host metrics not showing in non-HDFS cluster. (jaimin)


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

Branch: refs/heads/branch-alerts-dev
Commit: 97ff55ae272e4ea9d37584bd33e2c2f3b15499c8
Parents: 329b62f
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Mon Sep 22 09:34:53 2014 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Mon Sep 22 09:34:53 2014 -0700

--
 .../HDP/1.3.2/services/GANGLIA/package/scripts/params.py   | 5 ++---
 .../HDP/2.0.6/services/GANGLIA/package/scripts/params.py   | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/97ff55ae/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
index 0417980..8394082 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/GANGLIA/package/scripts/params.py
@@ -72,12 +72,11 @@ has_hbase_rs = not len(hbase_rs_hosts) == 0
 has_flume = not len(flume_hosts) == 0
 
 ganglia_cluster_names = {
-  jtnode_host : [(HDPJournalNode, 8654)],
   flume_hosts : [(HDPFlumeServer, 8655)],
   hbase_rs_hosts : [(HDPHBaseRegionServer, 8656)],
   nm_hosts : [(HDPNodeManager, 8657)],
   mapred_tt_hosts : [(HDPTaskTracker, 8658)],
-  slave_hosts : [(HDPDataNode, 8659), (HDPSlaves, 8660)],
+  slave_hosts : [(HDPDataNode, 8659)],
   namenode_host : [(HDPNameNode, 8661)],
   jtnode_host : [(HDPJobTracker, 8662)],
   hbase_master_hosts : [(HDPHBaseMaster, 8663)],
@@ -85,7 +84,7 @@ ganglia_cluster_names = {
   hs_host : [(HDPHistoryServer, 8666)],
 }
 
-ganglia_clusters = []
+ganglia_clusters = [(HDPSlaves, 8660)]
 
 for key in ganglia_cluster_names:
   property_name = format(/clusterHostInfo/{key})

http://git-wip-us.apache.org/repos/asf/ambari/blob/97ff55ae/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
index a00f7b1..43ce36f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
@@ -109,12 +109,12 @@ has_nimbus_server = not len(nimbus_server_hosts) == 0
 has_supervisor_server = not len(supervisor_server_hosts) == 0
 
 ganglia_cluster_names = {
-  jtnode_host: [(HDPJournalNode, 8654)],
+  jn_hosts: [(HDPJournalNode, 8654)],
   flume_hosts: [(HDPFlumeServer, 8655)],
   hbase_rs_hosts: [(HDPHBaseRegionServer, 8656)],
   nm_hosts: [(HDPNodeManager, 8657)],
   mapred_tt_hosts: [(HDPTaskTracker, 8658)],
-  slave_hosts: [(HDPDataNode, 8659), (HDPSlaves, 8660)],
+  slave_hosts: [(HDPDataNode, 8659)],
   namenode_host: [(HDPNameNode, 8661)],
   jtnode_host: [(HDPJobTracker, 8662)],
   hbase_master_hosts: [(HDPHBaseMaster, 8663)],
@@ -127,7 +127,7 @@ ganglia_cluster_names = {
   ReservedPort3: [(ReservedPort3, 8669)]
 }
 
-ganglia_clusters = []
+ganglia_clusters = [(HDPSlaves, 8660)]
 
 for key in ganglia_cluster_names:
   property_name = format(/clusterHostInfo/{key})



[07/16] git commit: AMBARI-7431. HDP-2.2.1 install results in Nimbus component failing to start (aonishuk)

2014-09-22 Thread jonathanhurley
AMBARI-7431. HDP-2.2.1 install results in Nimbus component failing to start 
(aonishuk)


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

Branch: refs/heads/branch-alerts-dev
Commit: e582b1e3e27ee08078bffbee8315afd19f612654
Parents: 7b2f467
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Mon Sep 22 16:15:06 2014 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Mon Sep 22 16:15:06 2014 +0300

--
 .../stacks/HDP/2.1/services/STORM/configuration/storm-site.xml | 6 +++---
 .../stacks/HDP/2.2/services/STORM/configuration/storm-site.xml | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e582b1e3/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
index b02d23a..b6a2cf2 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml
@@ -118,7 +118,7 @@
   /property
   property
 namenimbus.childopts/name
-value-Xmx1024m 
-Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf 
-javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM/value
+value-Xmx1024m 
-javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM/value
 descriptionThis parameter is used by the storm-deploy project to 
configure the jvm options for the nimbus daemon./description
   /property
   property
@@ -188,7 +188,7 @@
   /property
   property
 nameui.childopts/name
-value-Xmx768m 
-Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf/value
+value-Xmx768m/value
 descriptionChildopts for Storm UI Java process./description
   /property
   property
@@ -264,7 +264,7 @@
   /property
   property
 namesupervisor.childopts/name
-value-Xmx256m 
-Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf 
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.port=56431 
-javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM/value
+value-Xmx256m -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.port=56431 
-javaagent:/usr/lib/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8650,wireformat31x=true,mode=multicast,config=/usr/lib/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Supervisor_JVM/value
 descriptionThis parameter is used by the storm-deploy project to 
configure the jvm options for the supervisor daemon./description
   /property
   property

http://git-wip-us.apache.org/repos/asf/ambari/blob/e582b1e3/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
index 57a4889..f204456 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml
@@ -25,7 +25,7 @@
 
   property
 namenimbus.childopts/name
-value-Xmx1024m 
-Djava.security.auth.login.config=/etc/storm/conf/storm_jaas.conf 
-javaagent:/usr/hdp/current/storm/contrib/storm-jmxetric/lib/jmxetric-1.0.4.jar=host=localhost,port=8649,wireformat31x=true,mode=multicast,config=/usr/hdp/current/storm/contrib/storm-jmxetric/conf/jmxetric-conf.xml,process=Nimbus_JVM/value
+value-Xmx1024m 

[04/16] git commit: AMBARI-7428 Slider View: Even successful actions showing error dialogs. (atkach)

2014-09-22 Thread jonathanhurley
AMBARI-7428 Slider View: Even successful actions showing error dialogs. (atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 6236d6245413eadf794c266c7f953cd4548cf2b1
Parents: 3590d7d
Author: atkach atk...@hortonworks.com
Authored: Mon Sep 22 14:40:28 2014 +0300
Committer: atkach atk...@hortonworks.com
Committed: Mon Sep 22 14:40:28 2014 +0300

--
 .../views/slider/src/main/resources/ui/app/helpers/ajax.js| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6236d624/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
--
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js 
b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ea01d82..5ecd9c8 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -118,7 +118,8 @@ var urls = {
 format: function (data) {
   return {
 type: 'PUT',
-data: JSON.stringify(data.data)
+data: JSON.stringify(data.data),
+dataType: 'text'
   }
 }
   },
@@ -133,6 +134,7 @@ var urls = {
   return {
 type: 'POST',
 data: JSON.stringify(data.data),
+dataType: 'text',
 showErrorPopup: true
   }
 }
@@ -144,6 +146,7 @@ var urls = {
 format: function () {
   return {
 method: 'DELETE',
+dataType: 'text',
 showErrorPopup: true
   }
 }
@@ -159,6 +162,7 @@ var urls = {
   return {
 method: 'PUT',
 data: JSON.stringify(data.data),
+dataType: 'text',
 showErrorPopup: true
   }
 }
@@ -173,6 +177,7 @@ var urls = {
   return {
 method: 'PUT',
 data: JSON.stringify(data.data),
+dataType: 'text',
 showErrorPopup: true
   }
 }



[15/16] git commit: AMBARI-7355 Add possibility to filter config groups through api by host name (dsen)

2014-09-22 Thread jonathanhurley
AMBARI-7355 Add possibility to filter config groups through api by host name 
(dsen)


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

Branch: refs/heads/branch-alerts-dev
Commit: 802df768ac0415e91e951c61592ea370a5975957
Parents: 57030a4
Author: Dmytro Sen d...@hortonworks.com
Authored: Mon Sep 22 20:18:13 2014 +0300
Committer: Dmytro Sen d...@hortonworks.com
Committed: Mon Sep 22 20:18:13 2014 +0300

--
 .../internal/ConfigGroupResourceProvider.java   | 15 ++--
 .../ConfigGroupResourceProviderTest.java| 37 ++--
 2 files changed, 48 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/802df768/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index 46e9016..c73a8d4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -78,6 +78,8 @@ public class ConfigGroupResourceProvider extends
   .getPropertyId(ConfigGroup, service_config_version_note);
   protected static final String CONFIGGROUP_HOSTNAME_PROPERTY_ID =
 PropertyHelper.getPropertyId(null, host_name);
+  protected static final String CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID =
+PropertyHelper.getPropertyId(ConfigGroup, hosts/host_name);
   public static final String CONFIGGROUP_HOSTS_PROPERTY_ID = PropertyHelper
 .getPropertyId(ConfigGroup, hosts);
   public static final String CONFIGGROUP_CONFIGS_PROPERTY_ID =
@@ -138,6 +140,10 @@ public class ConfigGroupResourceProvider extends
 SetString   requestedIds = getRequestPropertyIds(request, predicate);
 SetResource resources= new HashSetResource();
 
+if (requestedIds.contains(CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID)) {
+  requestedIds.add(CONFIGGROUP_HOSTS_PROPERTY_ID);
+}
+
 for (ConfigGroupResponse response : responses) {
   Resource resource = new ResourceImpl(Resource.Type.ConfigGroup);
 
@@ -618,14 +624,19 @@ public class ConfigGroupResourceProvider extends
 MapString, Config configurations = new HashMapString, Config();
 SetString hosts = new HashSetString();
 
+String hostnameKey = CONFIGGROUP_HOSTNAME_PROPERTY_ID;
 Object hostObj = properties.get(CONFIGGROUP_HOSTS_PROPERTY_ID);
+if (hostObj == null) {
+  hostnameKey = CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID;
+  hostObj = properties.get(CONFIGGROUP_HOSTS_HOSTNAME_PROPERTY_ID);
+}
 if (hostObj != null) {
   if (hostObj instanceof HashSet?) {
 try {
   SetMapString, String hostsSet = (SetMapString, String) 
hostObj;
   for (MapString, String hostMap : hostsSet) {
-if (hostMap.containsKey(CONFIGGROUP_HOSTNAME_PROPERTY_ID)) {
-  String hostname = hostMap.get(CONFIGGROUP_HOSTNAME_PROPERTY_ID);
+if (hostMap.containsKey(hostnameKey)) {
+  String hostname = hostMap.get(hostnameKey);
   hosts.add(hostname);
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/802df768/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
index 4194979..db324e5 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
@@ -432,7 +432,7 @@ public class ConfigGroupResourceProviderTest {
 assertEquals(t3, resources.iterator().next().getPropertyValue
   (ConfigGroupResourceProvider.CONFIGGROUP_TAG_PROPERTY_ID));
 
-// Read by hostname
+// Read by hostname (hosts=h1)
 predicate = new PredicateBuilder().property(ConfigGroupResourceProvider
   .CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID).equals(Cluster100).and()
   .property(ConfigGroupResourceProvider.CONFIGGROUP_HOSTS_PROPERTY_ID)
@@ -448,8 +448,24 

[02/16] git commit: AMBARI-7426. Slider View: Parameter validation page should account for security parameters being set. (onechiporenko)

2014-09-22 Thread jonathanhurley
AMBARI-7426. Slider View: Parameter validation page should account for security 
parameters being set. (onechiporenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 3590d7d41b926cc5dfdc8b58322ebe97a80c80a4
Parents: d46bbdf
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Mon Sep 22 13:29:15 2014 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Mon Sep 22 13:29:15 2014 +0300

--
 .../assets/data/resource/slider-properties.json |  7 ++-
 .../ui/app/controllers/slider_controller.js | 20 ++--
 .../resources/ui/app/models/slider_config.js|  8 +++-
 .../src/main/resources/ui/app/routes/main.js|  7 ++-
 .../src/main/resources/ui/app/translations.js   |  1 +
 5 files changed, 38 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
index c9b0781..3b69893 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
+++ 
b/contrib/views/slider/src/main/resources/ui/app/assets/data/resource/slider-properties.json
@@ -19,7 +19,12 @@
   zookeeper.quorum : 
slider-1.c.pramod-thangali.internal:2181,slider-2.c.pramod-thangali.internal:2181,slider-3.c.pramod-thangali.internal:2181,
   ganglia.server.hostname : bvc,
   ganglia.custom.clusters : 
'HBaseCluster1','7000','AccumuloCluster1','7001','HBaseCluster2','7002',
-  slider.user : John Dow
+  slider.user : John Dow,
+  slider.security.enabled : false,
+  dfs.namenode.kerberos.principal : null,
+  view.kerberos.principal : null,
+  view.kerberos.principal.keytab : null,
+  yarn.resourcemanager.principal : null
 }
   },
   resources : [

http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 401c86d..a81854e 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -67,14 +67,30 @@ App.SliderController = Ember.Controller.extend({
 
   /**
* After all Slider-configs are loaded, application should check self status
+   * If config coderequired/code-property is true, its value shouldn't be 
empty
+   * If config depends on some other config (see 
coderequireDependsOn/code-property)
+   * and referenced config-value is not-false, current config should have 
not-empty value
* @method finishSliderConfiguration
*/
   finishSliderConfiguration: function () {
 //check if all services exist
 var errors = [];
 App.SliderApp.store.all('sliderConfig').forEach(function (model) {
-  if (Em.isEmpty(model.get('value'))  model.get('required')) {
-
errors.push(Em.I18n.t('error.config_is_empty').format(model.get('viewConfigName')));
+  if (model.get('required')) {
+if (Em.isEmpty(model.get('value'))) {
+  
errors.push(Em.I18n.t('error.config_is_empty').format(model.get('viewConfigName')));
+}
+  }
+  else {
+var dependenceConfig = model.get('requireDependsOn');
+if (!Em.isNone(dependenceConfig)) {
+  var depValue = dependenceConfig.get('value').toLowerCase();
+  if (depValue == true) {
+if (Em.isEmpty(model.get('value'))) {
+  
errors.push(Em.I18n.t('error.config_is_empty_2').format(model.get('viewConfigName'),
 dependenceConfig.get('viewConfigName')));
+}
+  }
+}
   }
 });
 errors.uniq();

http://git-wip-us.apache.org/repos/asf/ambari/blob/3590d7d4/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
--
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js 
b/contrib/views/slider/src/main/resources/ui/app/models/slider_config.js
index a079faf..d8b2be6 100644
--- 

git commit: AMBARI-6780 - SOURCE and SINK metrics not working on host-component

2014-08-08 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk d156c0ee9 - b3430e705


AMBARI-6780 - SOURCE and SINK metrics not working on host-component


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

Branch: refs/heads/trunk
Commit: b3430e7050d90ce873485986f99ad29db2420c0d
Parents: d156c0e
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu Aug 7 16:29:43 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Fri Aug 8 09:57:18 2014 -0400

--
 .../ServiceConfigVersionResourceDefinition.java |   9 +-
 .../internal/AbstractPropertyProvider.java  |  42 +++--
 .../controller/internal/BaseProvider.java   |  77 +---
 .../controller/utilities/PropertyHelper.java| 121 +---
 .../controller/internal/BaseProviderTest.java   | 188 ---
 .../utilities/PropertyHelperTest.java   |  22 +--
 6 files changed, 306 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3430e70/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
index a907166..f5d07f6 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
@@ -18,13 +18,12 @@
 
 package org.apache.ambari.server.api.resources;
 
+import java.util.List;
+
 import org.apache.ambari.server.api.services.Request;
 import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.controller.spi.Resource;
 
-import java.util.Collections;
-import java.util.List;
-
 public class ServiceConfigVersionResourceDefinition extends 
BaseResourceDefinition {
   /**
* Constructor.
@@ -68,7 +67,9 @@ public class ServiceConfigVersionResourceDefinition extends 
BaseResourceDefiniti
 
 String serviceName = (String) 
resultNode.getObject().getPropertyValue(service_name);
 Long version = (Long) 
resultNode.getObject().getPropertyValue(serviceconfigversion);
-href = href.substring(0, idx) + 
cenfigurations/serviceconfigversions?service_name= + serviceName + 
serviceconfigversion= + version;
+href = href.substring(0, idx)
++ configurations/serviceconfigversions?service_name=
++ serviceName + serviceconfigversion= + version;
 
 resultNode.setProperty(href, href);
   } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3430e70/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
index 542567f..4a675c5 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
@@ -18,9 +18,6 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import org.apache.ambari.server.controller.spi.PropertyProvider;
-import org.apache.ambari.server.controller.utilities.PropertyHelper;
-
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -31,6 +28,9 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.ambari.server.controller.spi.PropertyProvider;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+
 /**
  *  Abstract property provider implementation.
  */
@@ -123,12 +123,13 @@ public abstract class AbstractPropertyProvider extends 
BaseProvider implements P
   return;
 }
 
-String regExpKey = getRegExpKey(propertyId);
+Map.EntryString, Pattern regexEntry = getRegexEntry(propertyId);
 
-if (regExpKey != null) {
-  propertyInfo = componentMetricMap.get(regExpKey);
+if (regexEntry != null) {
+  String regexKey = regexEntry.getKey();
+  propertyInfo = componentMetricMap.get(regexKey);
   if (propertyInfo != null) {
-

git commit: AMBARI-6839 - Alerts: Update Oracle Alert DDL for CLOB (jonathanhurley)

2014-08-12 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk f2114d8c9 - e8c80e221


AMBARI-6839 - Alerts: Update Oracle Alert DDL for CLOB (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: e8c80e2213c40e42d89f4db870ab0a8bf0b9e15c
Parents: f2114d8
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Tue Aug 12 20:23:26 2014 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Tue Aug 12 23:21:52 2014 -0400

--
 .../orm/entities/AlertDefinitionEntity.java | 67 +++-
 .../server/orm/entities/AlertTargetEntity.java  | 34 ++
 .../server/upgrade/UpgradeCatalog170.java   | 17 +++--
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |  4 +-
 4 files changed, 72 insertions(+), 50 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e8c80e22/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
index 3aa0e62..de30921 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity.java
@@ -19,6 +19,7 @@ package org.apache.ambari.server.orm.entities;
 
 import java.util.Set;
 
+import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -28,6 +29,7 @@ import javax.persistence.Enumerated;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import javax.persistence.Lob;
 import javax.persistence.ManyToMany;
 import javax.persistence.NamedQueries;
 import javax.persistence.NamedQuery;
@@ -58,6 +60,8 @@ public class AlertDefinitionEntity {
   @Column(name = definition_id, nullable = false, updatable = false)
   private Long definitionId;
 
+  @Lob
+  @Basic
   @Column(name = alert_source, nullable = false, length = 32672)
   private String source;
 
@@ -69,7 +73,7 @@ public class AlertDefinitionEntity {
 
   @Column(name = definition_name, nullable = false, length = 255)
   private String definitionName;
-  
+
   @Column(name = scope, length = 255)
   @Enumerated(value = EnumType.STRING)
   private Scope scope;
@@ -104,7 +108,7 @@ public class AlertDefinitionEntity {
 
   /**
* Gets the unique identifier for this alert definition.
-   * 
+   *
* @return the ID.
*/
   public Long getDefinitionId() {
@@ -113,7 +117,7 @@ public class AlertDefinitionEntity {
 
   /**
* Sets the unique identifier for this alert definition.
-   * 
+   *
* @param definitionId
*  the ID (not {@code null}).
*/
@@ -125,7 +129,7 @@ public class AlertDefinitionEntity {
* Gets the source that defines the type of alert and the alert properties.
* This is typically a JSON structure that can be mapped to a first-class
* object.
-   * 
+   *
* @return the alert source (never {@code null}).
*/
   public String getSource() {
@@ -135,19 +139,19 @@ public class AlertDefinitionEntity {
   /**
* Sets the source of the alert, typically in JSON, that defines the type of
* the alert and its properties.
-   * 
+   *
* @param alertSource
*  the alert source (not {@code null}).
*/
   public void setSource(String alertSource) {
-this.source = alertSource;
+source = alertSource;
   }
 
   /**
* Gets the ID of the cluster that this alert definition is created for. Each
* cluster has their own set of alert definitions that are not shared with 
any
* other cluster.
-   * 
+   *
* @return the ID of the cluster (never {@code null}).
*/
   public Long getClusterId() {
@@ -158,7 +162,7 @@ public class AlertDefinitionEntity {
* Sets the ID of the cluster that this alert definition is created for. Each
* cluster has their own set of alert definitions that are not shared with 
any
* other cluster.
-   * 
+   *
* @param clusterId
*  the ID of the cluster (not {@code null}).
*/
@@ -169,7 +173,7 @@ public class AlertDefinitionEntity {
   /**
* Gets the component name that this alert is associated with, if any. Some
* alerts are scoped at the service level and will not have a component name.
-   * 
+   *
* @return the component name or {@code null} if none.
*/
   public String

<    1   2   3   4   5   6   7   8   9   10   >