ambari git commit: AMBARI-11245 - ConfigurationTask Should Support Multiple Configurations Per Task (part2) (jonathanhurley)

2015-05-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 15000e505 -> 29410e60a


AMBARI-11245 - ConfigurationTask Should Support Multiple Configurations Per 
Task (part2) (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 29410e60a1ec98f5779fd6fcd570de8c83df6490
Parents: 15000e5
Author: Jonathan Hurley 
Authored: Wed May 20 01:14:35 2015 -0400
Committer: Jonathan Hurley 
Committed: Wed May 20 01:14:35 2015 -0400

--
 .../main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml| 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/29410e60/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
index 37a75113..7505a07 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
@@ -362,7 +362,7 @@
 
   
 mapred-site
-
+
 
 
   
@@ -386,6 +386,8 @@
   
 yarn-site
 
+
+
   
 
 
@@ -402,8 +404,7 @@
   
   
 capacity-scheduler
-
yarn.scheduler.capacity.root.default-node-label-expression
-
+
   
 
 



ambari git commit: AMBARI-11245 - ConfigurationTask Should Support Multiple Configurations Per Task (jonathanhurley)

2015-05-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk c9b6c7874 -> 15000e505


AMBARI-11245 - ConfigurationTask Should Support Multiple Configurations Per 
Task (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 15000e5057d0c072fbd5d6b1e40fe9e8b0300f61
Parents: c9b6c78
Author: Jonathan Hurley 
Authored: Tue May 19 13:47:41 2015 -0400
Committer: Jonathan Hurley 
Committed: Wed May 20 00:46:20 2015 -0400

--
 .../internal/UpgradeResourceProvider.java   |  49 ++-
 .../serveraction/upgrades/ConfigureAction.java  |  94 -
 .../state/stack/upgrade/ConfigureTask.java  | 141 ---
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |  19 +--
 .../internal/UpgradeResourceProviderTest.java   |   2 +-
 .../upgrades/ConfigureActionTest.java   |  82 ++-
 .../ambari/server/state/UpgradeHelperTest.java  |  89 ++--
 .../stacks/HDP/2.1.1/upgrades/upgrade_test.xml  |  22 ++-
 .../HDP/2.1.1/upgrades/upgrade_test_checks.xml  |   3 +-
 .../stacks/HDP/2.2.0/upgrades/upgrade_test.xml  |   3 +-
 .../HDP/2.2.0/upgrades/upgrade_test_checks.xml  |   3 +-
 11 files changed, 346 insertions(+), 161 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/15000e50/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 81a15ec..a644d78 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -98,7 +98,6 @@ import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.Gson;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 
@@ -191,9 +190,6 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   @Inject
   private static HostDAO s_hostDAO = null;
 
-  private static Gson s_gson = new Gson();
-
-
   /**
* Used to generated the correct tasks and stages during an upgrade.
*/
@@ -1017,42 +1013,27 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   }
   case CONFIGURE: {
 ConfigureTask ct = (ConfigureTask) task;
-Map configProperties = 
ct.getConfigurationProperties(cluster);
-List transfers = ct.getTransfers();
-List replacements = ct.getReplacements();
-
-// if the properties are empty it means that the conditions in the
-// task did not pass;
-if (configProperties.isEmpty() && transfers.isEmpty() && 
replacements.isEmpty()) {
-  stageText = "No conditions were met for this configuration task.";
-  itemDetail = stageText;
-} else {
-  commandParams.putAll(configProperties);
-  commandParams.put(ConfigureTask.PARAMETER_TRANSFERS, 
s_gson.toJson(transfers));
-  commandParams.put(ConfigureTask.PARAMETER_REPLACEMENTS, 
s_gson.toJson(replacements));
+Map configurationChanges = 
ct.getConfigurationChanges(cluster);
 
-  // extract the config type, key and value to use to build the
-  // summary and detail
-  String configType = 
configProperties.get(ConfigureTask.PARAMETER_CONFIG_TYPE);
-  String key = configProperties.get(ConfigureTask.PARAMETER_KEY);
-  String value = configProperties.get(ConfigureTask.PARAMETER_VALUE);
+// add all configuration changes to the command params
+commandParams.putAll(configurationChanges);
 
-  StringBuilder detail = new StringBuilder(String.format("Updating 
config %s", configType));
-
-  if (null != key && null != value) {
-detail.append(String.format("/%s to %s", key, value));
-  }
+// extract the config type to build the summary
+String configType = 
configurationChanges.get(ConfigureTask.PARAMETER_CONFIG_TYPE);
+if (null != configType) {
+  itemDetail = String.format("Updating configuration %s", configType);
+} else {
+  itemDetail = "Skipping Configuration Task";
+}
 
-  itemDetail = detail.toString();
+entity.setText(itemDetail);
 
-  if (null != ct.summary) {
-stageText = ct.summar

ambari git commit: AMBARI-11261. Stack advisor should handle when 'ranger-hive-plugin-properties' not provided (srimanth)

2015-05-19 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk e26e8ee5e -> c9b6c7874


AMBARI-11261. Stack advisor should handle when 'ranger-hive-plugin-properties' 
not provided (srimanth)


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

Branch: refs/heads/trunk
Commit: c9b6c7874ea04c58cce39833f1740c4456f5c9d4
Parents: e26e8ee
Author: Srimanth Gunturi 
Authored: Tue May 19 18:25:30 2015 -0700
Committer: Srimanth Gunturi 
Committed: Tue May 19 21:01:07 2015 -0700

--
 .../stacks/HDP/2.2/services/stack_advisor.py|  8 
 .../stacks/2.2/common/test_stack_advisor.py | 21 
 2 files changed, 25 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9b6c787/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 4366def..224c0b2 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -661,7 +661,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
 #Adding Ranger Plugin logic here 
 ranger_plugin_properties = getSiteProperties(configurations, 
"ranger-hdfs-plugin-properties")
-ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hdfs-plugin-enabled']
+ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hdfs-plugin-enabled'] if 
ranger_plugin_properties else 'No'
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
 if ("RANGER" in servicesList) and (ranger_plugin_enabled.lower() == 
'Yes'.lower()):
   if hdfs_site['dfs.permissions.enabled'] != 'true':
@@ -761,7 +761,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 validationItems = [] 
 #Adding Ranger Plugin logic here 
 ranger_plugin_properties = getSiteProperties(configurations, 
"ranger-hive-plugin-properties")
-ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hive-plugin-enabled']
+ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hive-plugin-enabled'] if 
ranger_plugin_properties else 'No'
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
 ##Add stack validations only if Ranger is enabled.
 if ("RANGER" in servicesList):
@@ -817,7 +817,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 validationItems = []
 #Adding Ranger Plugin logic here
 ranger_plugin_properties = getSiteProperties(configurations, 
"ranger-hive-plugin-properties")
-ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hive-plugin-enabled']
+ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hive-plugin-enabled'] if 
ranger_plugin_properties else 'No'
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]
 ##Add stack validations only if Ranger is enabled.
 if ("RANGER" in servicesList):
@@ -877,7 +877,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
 #Adding Ranger Plugin logic here 
 ranger_plugin_properties = getSiteProperties(configurations, 
"ranger-hbase-plugin-properties")
-ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hbase-plugin-enabled']
+ranger_plugin_enabled = 
ranger_plugin_properties['ranger-hbase-plugin-enabled'] if 
ranger_plugin_properties else 'No'
 prop_name = 'hbase.security.authorization'
 prop_val = "true"
 servicesList = [service["StackServices"]["service_name"] for service in 
services["services"]]

http://git-wip-us.apache.org/repos/asf/ambari/blob/c9b6c787/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 4abae12..5b6d7b1 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -2301,6 +2301,27 @@ class TestHDP22StackAdvisor(TestCase):
 
 pass
 
+  def test_validateHiveConfigurations(self):
+properties = {"hive_security_authorization": "None", 
"hive.exec.orc.default.stripe.size": "8388608"}
+configurations = {
+  "hive-site": {
+"properties": {"hive.security.authorization.enabled": "true"}
+  },
+  "hive-env": 

ambari git commit: AMBARI-11257. YARN Service Check job and Oozie job don't run because of whitespace in yarn.scheduler.capacity.root.default-node-label-expression (alejandro)

2015-05-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 74d2d234e -> e26e8ee5e


AMBARI-11257. YARN Service Check job and Oozie job don't run because of 
whitespace in yarn.scheduler.capacity.root.default-node-label-expression 
(alejandro)


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

Branch: refs/heads/trunk
Commit: e26e8ee5eeafd18ed25a9bf424b573ee27ccdc33
Parents: 74d2d23
Author: Alejandro Fernandez 
Authored: Tue May 19 16:06:02 2015 -0700
Committer: Alejandro Fernandez 
Committed: Tue May 19 20:14:55 2015 -0700

--
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |  5 
 .../YARN/configuration/capacity-scheduler.xml   |  2 +-
 .../YARN/configuration/capacity-scheduler.xml   | 25 
 3 files changed, 31 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e26e8ee5/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
index e954af2..a620b05 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
@@ -407,6 +407,11 @@
 yarn.node-labels.enabled
 false
   
+  
+capacity-scheduler
+
yarn.scheduler.capacity.root.default-node-label-expression
+
+  
 
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/e26e8ee5/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/YARN/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/YARN/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/YARN/configuration/capacity-scheduler.xml
index 63d56b0..1642746 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/YARN/configuration/capacity-scheduler.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/YARN/configuration/capacity-scheduler.xml
@@ -38,7 +38,7 @@
   
   
 yarn.scheduler.capacity.root.default-node-label-expression
- 
+
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e26e8ee5/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/capacity-scheduler.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/capacity-scheduler.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/capacity-scheduler.xml
new file mode 100644
index 000..f0821f3
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/capacity-scheduler.xml
@@ -0,0 +1,25 @@
+
+
+
+  
+yarn.scheduler.capacity.root.default-node-label-expression
+
+
+  
+
+



ambari git commit: AMBARI-11259. Views build break (hive fixes)

2015-05-19 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk c05d2389f -> 74d2d234e


AMBARI-11259. Views build break (hive fixes)


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

Branch: refs/heads/trunk
Commit: 74d2d234e7d74e16afbc9df3ace0754d5e80df8f
Parents: c05d238
Author: Sumit Mohanty 
Authored: Tue May 19 19:02:23 2015 -0700
Committer: Sumit Mohanty 
Committed: Tue May 19 19:02:23 2015 -0700

--
 .../ambari/view/hive/resources/files/FileService.java   | 3 ++-
 .../resources/jobs/atsJobs/ATSRequestsDelegateImpl.java | 3 ++-
 .../view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java | 9 ++---
 3 files changed, 10 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/74d2d234/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java
index ef48b5d..bae46ac 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java
@@ -118,7 +118,8 @@ public class FileService extends BaseService {
 URL url = new URL(filePath.substring(JSON_PATH_FILE.length()));
 
 InputStream responseInputStream = 
context.getURLStreamProvider().readFrom(url.toString(), "GET",
-null, new HashMap());
+  
(String)null,
+  
new HashMap());
 String response = IOUtils.toString(responseInputStream);
 
 for (String ref : url.getRef().split("!")) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/74d2d234/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/atsJobs/ATSRequestsDelegateImpl.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/atsJobs/ATSRequestsDelegateImpl.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/atsJobs/ATSRequestsDelegateImpl.java
index 1876b2a..061c449 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/atsJobs/ATSRequestsDelegateImpl.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/atsJobs/ATSRequestsDelegateImpl.java
@@ -98,7 +98,8 @@ public class ATSRequestsDelegateImpl implements 
ATSRequestsDelegate {
 String response;
 try {
   InputStream responseInputStream = 
context.getURLStreamProvider().readFrom(atsUrl, "GET",
-  null, new HashMap());
+   
 (String)null,
+   
 new HashMap());
   response = IOUtils.toString(responseInputStream);
 } catch (IOException e) {
   LOG.error("Error while reading from ATS", e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/74d2d234/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java
--
diff --git 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java
 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java
index a1987cd..6050fec 100644
--- 
a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java
+++ 
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/rm/RMRequestsDelegateImpl.java
@@ -59,7 +59,8 @@ public class RMRequestsDelegateImpl implements 
RMRequestsDelegate {
 String response;
 try {
   InputStream responseInputStream = 
context.getURLStreamProvider().readFrom(url, "GET",
-  null, new HashMap());
+   
 (String)null,
+   
 new HashMap());
   response = IOUtils.toString(responseInputStream);
 } catch (IOException e) {
   throw new ServiceFormattedException(
@@ -74,7 +75,8 @@ public class RMRequestsDelegateImpl implements 
RMRequestsDelegate {
  

ambari git commit: AMBARI-11256. Expression Field overflows with long metric name.(XIWANG)

2015-05-19 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk d42c2113d -> c05d2389f


AMBARI-11256. Expression Field overflows with long metric name.(XIWANG)


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

Branch: refs/heads/trunk
Commit: c05d2389fda7514b7fa486c64f4b8daa6a32dde5
Parents: d42c211
Author: Xi Wang 
Authored: Tue May 19 16:43:56 2015 -0700
Committer: Xi Wang 
Committed: Tue May 19 18:15:08 2015 -0700

--
 ambari-web/app/styles/enhanced_service_dashboard.less | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c05d2389/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index cece496..d8aa843 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -432,6 +432,7 @@
   border: 2px groove #ddd;
   padding: 0 1.4em 1.4em 1.4em;
   margin: 0 0 1.5em 0;
+  min-width: 95%;
 }
 legend {
   width: inherit;



ambari git commit: AMBARI-11259. Slider view build break

2015-05-19 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 6a3c1e340 -> d42c2113d


AMBARI-11259. Slider view build break


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

Branch: refs/heads/trunk
Commit: d42c2113d8dbccb122eb944a2fd4e38e60024e02
Parents: 6a3c1e3
Author: Sumit Mohanty 
Authored: Tue May 19 18:02:45 2015 -0700
Committer: Sumit Mohanty 
Committed: Tue May 19 18:02:45 2015 -0700

--
 .../ambari/view/slider/rest/client/SliderAppMasterClient.java  | 2 +-
 .../ambari/view/slider/rest/client/SliderAppMetricsHelper.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d42c2113/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
index 7393d65..7741cd2 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMasterClient.java
@@ -271,7 +271,7 @@ public class SliderAppMasterClient extends BaseHttpClient {
   InputStream jmxStream = null;
   Map headers = new HashMap();
   try {
-jmxStream = streamProvider.readFrom(jmxUrl, "GET", null, headers);
+jmxStream = streamProvider.readFrom(jmxUrl, "GET", (String)null, 
headers);
   } catch (IOException e) {
 logger.error(String.format(
 "Unable to access JMX endpoint at %s. Error %s", jmxUrl,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d42c2113/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMetricsHelper.java
--
diff --git 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMetricsHelper.java
 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMetricsHelper.java
index 658ee37..6d5e89e 100644
--- 
a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMetricsHelper.java
+++ 
b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/rest/client/SliderAppMetricsHelper.java
@@ -67,7 +67,7 @@ public class SliderAppMetricsHelper {
   String fullUrl = spec + "?" + params;
   logger.debug("Metrics request url = " + fullUrl);
   reader = new BufferedReader(new InputStreamReader(context
-  .getURLStreamProvider().readFrom(fullUrl, "GET", null, headers)));
+  .getURLStreamProvider().readFrom(fullUrl, "GET", (String)null, 
headers)));
 
   TimelineMetrics timelineMetrics = timelineObjectReader.readValue(reader);
   logger.debug("Timeline metrics response => " + timelineMetrics);



ambari git commit: AMBARI-11255. Create widget: widget does not become part of the layout post creation. (jaimin)

2015-05-19 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk be383cf3d -> 6a3c1e340


AMBARI-11255. Create widget: widget does not become part of the layout post 
creation. (jaimin)


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

Branch: refs/heads/trunk
Commit: 6a3c1e3405fd1d030a8537d31137bd8ffba79646
Parents: be383cf
Author: Jaimin Jetly 
Authored: Tue May 19 17:25:05 2015 -0700
Committer: Jaimin Jetly 
Committed: Tue May 19 17:25:05 2015 -0700

--
 .../controllers/main/service/info/summary.js|   2 +-
 .../service/widgets/create/step3_controller.js  |   5 +-
 .../service/widgets/create/wizard_controller.js |  16 ++-
 .../app/mixins/common/widgets/widget_section.js |   6 +-
 ambari-web/app/routes/add_widget.js | 141 ---
 ambari-web/app/routes/create_widget.js  | 141 +++
 ambari-web/app/routes/main.js   |  10 +-
 .../service/widgets/create/expression_view.js   |   2 +-
 8 files changed, 168 insertions(+), 155 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3c1e34/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index c56a922..69e6328 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -586,7 +586,7 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
* create widget
*/
   createWidget: function () {
-App.router.send('addServiceWidget', Em.Object.create({
+App.router.send('createServiceWidget', Em.Object.create({
   layout: this.get('activeWidgetLayout'),
   serviceName: this.get('content.serviceName')
 }));

http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3c1e34/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
index 24b32f8..00b12f4 100644
--- a/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
+++ b/ambari-web/app/controllers/main/service/widgets/create/step3_controller.js
@@ -122,7 +122,10 @@ App.WidgetWizardStep3Controller = Em.Controller.extend({
 description: this.get('widgetDescription') || "",
 scope: this.get('widgetScope').toUpperCase(),
 author: this.get('widgetAuthor'),
-metrics: this.get('widgetMetrics'),
+metrics: this.get('widgetMetrics').map(function (metric) {
+  delete metric.data;
+  return metric;
+}),
 values: this.get('widgetValues').map(function (value) {
   delete value.computedValue;
   return value;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3c1e34/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
index 4c1dd06..0fec8eb 100644
--- 
a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js
@@ -37,10 +37,10 @@ App.WidgetWizardController = App.WizardController.extend({
 widgetType: "",
 
 /**
- * @type {number}
+ * @type {Object}
  * @default null
  */
-layoutId: null,
+layout: null,
 
 /**
  * Example:
@@ -102,6 +102,7 @@ App.WidgetWizardController = App.WizardController.extend({
 callback: function () {
   this.load('widgetService');
   this.load('widgetType');
+  this.load('layout', true);
 }
   }
 ],
@@ -344,12 +345,17 @@ App.WidgetWizardController = App.WizardController.extend({
* @param data
*/
   postWidgetDefinitionSuccessCallback: function (data) {
-if (Em.isNone(this.get('content.layoutId'))) return;
-var widgets = 
App.WidgetLayout.find(this.get('content.layoutId')).get('widgets').toArray();
+if (Em.isNone(this.get('content.layout'))) return;
+var widgets = this.get('content.layout.widgets').map(function(item){
+  return Em.Object.create({id: item});
+});
 widgets.pushObject(Em.Object.create({
   id: data.resources[0].WidgetI

Git Push Summary

2015-05-19 Thread jluniya
Repository: ambari
Updated Tags:  refs/tags/release-2.0.1-rc0 [created] 51f88b2f5


ambari git commit: Revert "AMBARI-10882 Allow NFS mounts to be skipped during agent health check (dsen)"

2015-05-19 Thread fbarca
Repository: ambari
Updated Branches:
  refs/heads/trunk d37bef923 -> be383cf3d


Revert "AMBARI-10882 Allow NFS mounts to be skipped during agent health check 
(dsen)"

This reverts commit 8a7c54c6334b986bada53965d9512d79d951a7dc.


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

Branch: refs/heads/trunk
Commit: be383cf3dd37e076b5226357babbd1f51cc4b7d7
Parents: d37bef9
Author: Florian Barca 
Authored: Tue May 19 15:36:59 2015 -0700
Committer: Florian Barca 
Committed: Tue May 19 15:36:59 2015 -0700

--
 ambari-agent/conf/unix/ambari-agent.ini |  4 ++
 ambari-agent/conf/windows/ambari-agent.ini  |  4 ++
 .../main/python/ambari_agent/AmbariConfig.py| 15 ++---
 .../src/main/python/ambari_agent/Controller.py  |  5 +-
 .../src/main/python/ambari_agent/Hardware.py| 24 +++
 .../src/main/python/ambari_agent/Heartbeat.py   |  2 +-
 .../src/main/python/ambari_agent/HostInfo.py| 13 
 .../main/python/ambari_agent/RecoveryManager.py |  4 +-
 .../test/python/ambari_agent/TestHardware.py| 27 
 .../test/python/ambari_agent/TestHostInfo.py| 17 +
 ambari-agent/src/test/python/unitTests.py   |  5 +-
 .../ambari/server/agent/HeartBeatHandler.java   |  4 --
 .../server/agent/RegistrationResponse.java  | 13 
 .../server/configuration/Configuration.java | 17 -
 .../server/agent/TestHeartbeatHandler.java  | 67 +---
 15 files changed, 78 insertions(+), 143 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/be383cf3/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index def41c6..173bb51 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -31,6 +31,10 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 
+[command]
+maxretries=2
+sleepBetweenRetries=1
+
 [security]
 keysdir=/var/lib/ambari-agent/keys
 server_crt=ca.crt

http://git-wip-us.apache.org/repos/asf/ambari/blob/be383cf3/ambari-agent/conf/windows/ambari-agent.ini
--
diff --git a/ambari-agent/conf/windows/ambari-agent.ini 
b/ambari-agent/conf/windows/ambari-agent.ini
index 972e11e..61a3ad9 100644
--- a/ambari-agent/conf/windows/ambari-agent.ini
+++ b/ambari-agent/conf/windows/ambari-agent.ini
@@ -30,6 +30,10 @@ cache_dir=cache
 tolerate_download_failures=true
 parallel_execution=0
 
+[command]
+maxretries=2
+sleepBetweenRetries=1
+
 [security]
 keysdir=keys
 server_crt=ca.crt

http://git-wip-us.apache.org/repos/asf/ambari/blob/be383cf3/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py 
b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
index d4e0c20..13e9f03 100644
--- a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
+++ b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
@@ -50,6 +50,10 @@ parallel_execution=0
 [python]
 custom_actions_dir = 
{ps}var{ps}lib{ps}ambari-agent{ps}resources{ps}custom_actions
 
+[command]
+maxretries=2
+sleepBetweenRetries=1
+
 [security]
 keysdir={ps}tmp{ps}ambari-agent
 server_crt=ca.crt
@@ -142,7 +146,6 @@ pidPathVars = [
 
 class AmbariConfig:
   TWO_WAY_SSL_PROPERTY = "security.server.two_way_ssl"
-  AMBARI_PROPERTIES_CATEGORY = 'agentConfig'
   SERVER_CONNECTION_INFO = "{0}/connection_info"
   CONNECTION_PROTOCOL = "https"
 
@@ -169,9 +172,6 @@ class AmbariConfig:
   def add_section(self, section):
 self.config.add_section(section)
 
-  def has_section(self, section):
-return self.config.has_section(section)
-
   def setConfig(self, customConfig):
 self.config = customConfig
 
@@ -249,13 +249,6 @@ class AmbariConfig:
   def get_parallel_exec_option(self):
 return int(self.get('agent', 'parallel_execution', 0))
 
-  def update_configuration_from_registration(self, reg_resp):
-if reg_resp and AmbariConfig.AMBARI_PROPERTIES_CATEGORY in reg_resp:
-  if not self.has_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY):
-self.add_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY)
-  for k,v in reg_resp[AmbariConfig.AMBARI_PROPERTIES_CATEGORY].items():
-self.set(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, k, v)
-pass
 
 def updateConfigServerHostname(configFile, new_host):
   # update agent config file

http://git-wip-us.apache.org/repos/asf/ambari/blob/be383cf3/ambari-agent/src/main/python

ambari git commit: AMBARI-11254. Incorrect Graph layout in Preview when zooming in.(xiwang)

2015-05-19 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 7290fa0c2 -> d37bef923


AMBARI-11254. Incorrect Graph layout in Preview when zooming in.(xiwang)


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

Branch: refs/heads/trunk
Commit: d37bef923bbcee87c1eae1abbe9420e752df7a01
Parents: 7290fa0
Author: Xi Wang 
Authored: Tue May 19 14:49:15 2015 -0700
Committer: Xi Wang 
Committed: Tue May 19 15:07:20 2015 -0700

--
 ambari-web/app/styles/enhanced_service_dashboard.less   | 3 +++
 ambari-web/app/views/common/chart/linear_time.js| 2 +-
 ambari-web/app/views/common/widget/graph_widget_view.js | 3 +++
 ambari-web/app/views/main/service/widgets/create/wizard_view.js | 2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/styles/enhanced_service_dashboard.less
--
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less 
b/ambari-web/app/styles/enhanced_service_dashboard.less
index 53abf21..cece496 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -161,6 +161,9 @@
   .title {
 height: 0;
   }
+  .chart-container {
+cursor: default;
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/common/chart/linear_time.js
--
diff --git a/ambari-web/app/views/common/chart/linear_time.js 
b/ambari-web/app/views/common/chart/linear_time.js
index ab824ca..61cd300 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -674,7 +674,7 @@ App.ChartLinearTimeView = Ember.View.extend({
   },
 
   showGraphInPopup: function() {
-if(!this.get('hasData')) {
+if(!this.get('hasData') || this.get('isPreview')) {
   return;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/common/widget/graph_widget_view.js
--
diff --git a/ambari-web/app/views/common/widget/graph_widget_view.js 
b/ambari-web/app/views/common/widget/graph_widget_view.js
index f0a2118..9c94563 100644
--- a/ambari-web/app/views/common/widget/graph_widget_view.js
+++ b/ambari-web/app/views/common/widget/graph_widget_view.js
@@ -263,6 +263,9 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, {
 description: function () {
   return this.get('parentView.content.description');
 }.property('parentView.content.description'),
+isPreview: function () {
+  return this.get('parentView.isPreview');
+}.property('parentView.isPreview'),
 
 /**
  * set custom time range for graph widget

http://git-wip-us.apache.org/repos/asf/ambari/blob/d37bef92/ambari-web/app/views/main/service/widgets/create/wizard_view.js
--
diff --git a/ambari-web/app/views/main/service/widgets/create/wizard_view.js 
b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
index e39d494..70d43be 100644
--- a/ambari-web/app/views/main/service/widgets/create/wizard_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/wizard_view.js
@@ -28,7 +28,7 @@ App.WidgetWizardView = Em.View.extend(App.WizardMenuMixin, {
   previewWidgetClass: function () {
 switch (this.get('controller.content.widgetType')) {
   case 'GRAPH':
-return App.GraphWidgetView.extend(App.WidgetPreviewMixin);
+return App.GraphWidgetView.extend(App.WidgetPreviewMixin, {isPreview: 
true});
   case 'TEMPLATE':
 return App.TemplateWidgetView.extend(App.WidgetPreviewMixin);
   case 'NUMBER':



ambari git commit: AMBARI-11215. Fix jdbc url path for Ranger Admin and Ranger plugins (Gautam Borad via alejandro)

2015-05-19 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk 1b7afa940 -> 7290fa0c2


AMBARI-11215. Fix jdbc url path for Ranger Admin and Ranger plugins (Gautam 
Borad via alejandro)


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

Branch: refs/heads/trunk
Commit: 7290fa0c2a6a11a2e3fac13e7834eead89b9e854
Parents: 1b7afa9
Author: Alejandro Fernandez 
Authored: Tue May 19 14:52:41 2015 -0700
Committer: Alejandro Fernandez 
Committed: Tue May 19 15:05:15 2015 -0700

--
 .../0.96.0.2.0/package/scripts/params_linux.py  |  8 +++
 .../package/scripts/setup_ranger_hbase.py   |  2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |  8 +++
 .../package/scripts/setup_ranger_hdfs.py|  2 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  8 +++
 .../package/scripts/setup_ranger_hive.py|  2 +-
 .../0.5.0.2.2/package/scripts/params_linux.py   |  8 +++
 .../package/scripts/setup_ranger_knox.py|  2 +-
 .../RANGER/0.4.0/package/scripts/params.py  | 26 --
 .../0.9.1.2.1/package/scripts/params_linux.py   |  8 +++
 .../package/scripts/setup_ranger_storm.py   |  2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |  8 +++
 .../package/scripts/setup_ranger_yarn.py|  2 +-
 .../HBASE/configuration/ranger-hbase-audit.xml  |  6 +--
 .../ranger-hbase-policymgr-ssl.xml  |  4 +-
 .../HDFS/configuration/ranger-hdfs-audit.xml|  6 +--
 .../configuration/ranger-hdfs-policymgr-ssl.xml |  4 +-
 .../HIVE/configuration/ranger-hive-audit.xml|  6 +--
 .../configuration/ranger-hive-policymgr-ssl.xml |  4 +-
 .../KNOX/configuration/ranger-knox-audit.xml|  6 +--
 .../configuration/ranger-knox-policymgr-ssl.xml |  4 +-
 .../RANGER/configuration/ranger-admin-site.xml  | 20 ++--
 .../RANGER/configuration/ranger-site.xml| 21 +++-
 .../configuration/usersync-properties.xml   | 51 +++-
 .../STORM/configuration/ranger-storm-audit.xml  |  6 +--
 .../ranger-storm-policymgr-ssl.xml  |  4 +-
 .../YARN/configuration/ranger-yarn-audit.xml|  6 +--
 .../configuration/ranger-yarn-policymgr-ssl.xml |  4 +-
 28 files changed, 145 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7290fa0c/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 500d1ec..410a690 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -225,15 +225,23 @@ if has_ranger_admin:
   if xa_audit_db_flavor == 'mysql':
 jdbc_symlink_name = "mysql-jdbc-driver.jar"
 jdbc_jar_name = "mysql-connector-java.jar"
+audit_jdbc_url = format('jdbc:mysql://{xa_db_host}/{xa_audit_db_name}')
+jdbc_driver = "com.mysql.jdbc.Driver"
   elif xa_audit_db_flavor == 'oracle':
 jdbc_jar_name = "ojdbc6.jar"
 jdbc_symlink_name = "oracle-jdbc-driver.jar"
+audit_jdbc_url = format('jdbc:oracle:thin:\@//{xa_db_host}')
+jdbc_driver = "oracle.jdbc.OracleDriver"
   elif xa_audit_db_flavor == 'postgres':
 jdbc_jar_name = "postgresql.jar"
 jdbc_symlink_name = "postgres-jdbc-driver.jar"
+audit_jdbc_url = 
format('jdbc:postgresql://{xa_db_host}/{xa_audit_db_name}')
+jdbc_driver = "org.postgresql.Driver"
   elif xa_audit_db_flavor == 'sqlserver':
 jdbc_jar_name = "sqljdbc4.jar"
 jdbc_symlink_name = "mssql-jdbc-driver.jar"
+audit_jdbc_url = 
format('jdbc:sqlserver://{xa_db_host};databaseName={xa_audit_db_name}')
+jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
 
   downloaded_custom_connector = format("{exec_tmp_dir}/{jdbc_jar_name}")
   driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/7290fa0c/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
 
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/setup_ranger_hbase.py
index 88a6686..86049f8 100644
--- 
a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/pa

ambari git commit: AMBARI-11253. need to populate atlas server bind address (Jon Maron via smohanty)

2015-05-19 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 8f82a1a0d -> 1b7afa940


AMBARI-11253. need to populate atlas server bind address (Jon Maron via 
smohanty)


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

Branch: refs/heads/trunk
Commit: 1b7afa940a98dbf83580a14d585dd672cff95584
Parents: 8f82a1a
Author: Sumit Mohanty 
Authored: Tue May 19 15:00:38 2015 -0700
Committer: Sumit Mohanty 
Committed: Tue May 19 15:00:38 2015 -0700

--
 .../ATLAS/0.1.0.2.3/configuration/application-properties.xml| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b7afa94/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml
index e774f3b..29f4e72 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml
@@ -176,6 +176,7 @@
   metadata.authentication.method={{authentication_method}}
   metadata.authentication.principal={{authentication_principal}}
   metadata.authentication.keytab={{authentication_keytab}}
+  metadata.server.bind.address={{metadata_host}}
 
   # SPNEGO
   metadata.http.authentication.enabled={{http_authentication_enabled}}



ambari git commit: AMBARI-11249. Replace spinner with licensed spinner.gif (alexantonenko)

2015-05-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 67077fd1d -> 902b94d60


AMBARI-11249. Replace spinner with licensed spinner.gif (alexantonenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: 902b94d606bfa826e9f3f683a3fdecb7e7faf865
Parents: 67077fd
Author: Alex Antonenko 
Authored: Tue May 19 23:14:25 2015 +0300
Committer: Alex Antonenko 
Committed: Tue May 19 23:29:37 2015 +0300

--
 LICENSE.txt |  21 ++-
 ambari-web/app/assets/img/spinner.gif   | Bin 3289 -> 27694 bytes
 .../resources/ui/hive-web/tests/img/spinner.gif | Bin 3289 -> 27694 bytes
 3 files changed, 20 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/902b94d6/LICENSE.txt
--
diff --git a/LICENSE.txt b/LICENSE.txt
index fca7128..e226388 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -681,4 +681,23 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS
 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For SpiffyGif (ambari-web/app/assets/img/spinner.gif,
+contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif)
+
+Home:   http://spiffygif.com
+Author:  https://twitter.com/sean_holbert
+License: SpiffyGif License
+
+You are free to copy and redistribute any images generated from SpiffyGif in 
any medium or format, even commercially.
+You are permitted to remix, transform, and build upon images generated from 
SpiffyGif for any purpose, even commercially.
+
+THIS SOFTWARE AND GENERATED IMAGE FILES ARE PROVIDED BY THE COPYRIGHT HOLDERS 
AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/902b94d6/ambari-web/app/assets/img/spinner.gif
--
diff --git a/ambari-web/app/assets/img/spinner.gif 
b/ambari-web/app/assets/img/spinner.gif
index 39fcb67..1498819 100644
Binary files a/ambari-web/app/assets/img/spinner.gif and 
b/ambari-web/app/assets/img/spinner.gif differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/902b94d6/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif 
b/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif
index 39fcb67..1498819 100644
Binary files 
a/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif and 
b/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif differ



[3/4] ambari git commit: AMBARI-11243. Remove-icon for overrides has "button"-style (alexantonenko)

2015-05-19 Thread alexantonenko
AMBARI-11243. Remove-icon for overrides has "button"-style (alexantonenko)


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

Branch: refs/heads/trunk
Commit: b1980207eb6e33cbedc536b576838126510471c6
Parents: 3fa6a25
Author: Alex Antonenko 
Authored: Tue May 19 19:24:08 2015 +0300
Committer: Alex Antonenko 
Committed: Tue May 19 23:30:19 2015 +0300

--
 ambari-web/app/styles/application.less | 2 +-
 ambari-web/app/templates/common/configs/overriddenProperty.hbs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b1980207/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 7235c98..35c3522 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1208,7 +1208,7 @@ h1 {
   margin-right: 2px;
 }
 .btn-final{
-  background: none repeat scroll 0 0 #fff;
+  background: transparent repeat scroll 0 0 rgba(255, 255, 255, 0);
 }
 .btn-final .icon-lock{
   color: #a6a6a6;

http://git-wip-us.apache.org/repos/asf/ambari/blob/b1980207/ambari-web/app/templates/common/configs/overriddenProperty.hbs
--
diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs 
b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
index 9484f7e..8a8df0a 100644
--- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs
+++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
@@ -43,7 +43,7 @@
   
 {{/if}}
 {{#isAccessible ADMIN}}
-  
 



[1/4] ambari git commit: AMBARI-11249. Replace spinner with licensed spinner.gif (alexantonenko)

2015-05-19 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 2e0fd3d89 -> 8f82a1a0d


AMBARI-11249. Replace spinner with licensed spinner.gif (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 8f82a1a0dee185236acdc434f47f52ef1ff2ee28
Parents: b198020
Author: Alex Antonenko 
Authored: Tue May 19 23:14:25 2015 +0300
Committer: Alex Antonenko 
Committed: Tue May 19 23:30:19 2015 +0300

--
 LICENSE.txt |  21 ++-
 ambari-web/app/assets/img/spinner.gif   | Bin 3289 -> 27694 bytes
 .../resources/ui/hive-web/tests/img/spinner.gif | Bin 3289 -> 27694 bytes
 3 files changed, 20 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f82a1a0/LICENSE.txt
--
diff --git a/LICENSE.txt b/LICENSE.txt
index fca7128..e226388 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -681,4 +681,23 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS
 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+For SpiffyGif (ambari-web/app/assets/img/spinner.gif,
+contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif)
+
+Home:   http://spiffygif.com
+Author:  https://twitter.com/sean_holbert
+License: SpiffyGif License
+
+You are free to copy and redistribute any images generated from SpiffyGif in 
any medium or format, even commercially.
+You are permitted to remix, transform, and build upon images generated from 
SpiffyGif for any purpose, even commercially.
+
+THIS SOFTWARE AND GENERATED IMAGE FILES ARE PROVIDED BY THE COPYRIGHT HOLDERS 
AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f82a1a0/ambari-web/app/assets/img/spinner.gif
--
diff --git a/ambari-web/app/assets/img/spinner.gif 
b/ambari-web/app/assets/img/spinner.gif
index 39fcb67..1498819 100644
Binary files a/ambari-web/app/assets/img/spinner.gif and 
b/ambari-web/app/assets/img/spinner.gif differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f82a1a0/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif
--
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif 
b/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif
index 39fcb67..1498819 100644
Binary files 
a/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif and 
b/contrib/views/hive/src/main/resources/ui/hive-web/tests/img/spinner.gif differ



[4/4] ambari git commit: AMBARI-11241. Wrong service order when sorting on the allerts page (alexantonenko)

2015-05-19 Thread alexantonenko
AMBARI-11241. Wrong service order when sorting on the allerts page 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: cb8308064bd5851f449fe0be19ee8b72aba9e848
Parents: 2e0fd3d
Author: Alex Antonenko 
Authored: Tue May 19 19:09:32 2015 +0300
Committer: Alex Antonenko 
Committed: Tue May 19 23:30:19 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/cb830806/ambari-web/app/views/main/alert_definitions_view.js
--
diff --git a/ambari-web/app/views/main/alert_definitions_view.js 
b/ambari-web/app/views/main/alert_definitions_view.js
index b20beb3..dceaaf1 100644
--- a/ambari-web/app/views/main/alert_definitions_view.js
+++ b/ambari-web/app/views/main/alert_definitions_view.js
@@ -144,7 +144,7 @@ App.MainAlertDefinitionsView = App.TableView.extend({
*/
   serviceSort: sort.fieldView.extend({
 column: 3,
-name: 'service.serviceName',
+name: 'serviceDisplayName',
 displayName: Em.I18n.t('common.service'),
 type: 'string'
   }),



[2/4] ambari git commit: AMBARI-11225. HDFS configs page: Save alert appears, when there was no change (alexantonenko)

2015-05-19 Thread alexantonenko
AMBARI-11225. HDFS configs page: Save alert appears, when there was no change 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: 3fa6a25252bc1359bbb40ff4bef2238d56d9103b
Parents: cb83080
Author: Alex Antonenko 
Authored: Tue May 19 19:11:43 2015 +0300
Committer: Alex Antonenko 
Committed: Tue May 19 23:30:19 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/3fa6a252/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 a82dc41..a48f40b 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -831,9 +831,11 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   self.setProperties({
 dataIsLoaded: true,
 versionLoaded: true,
-hash: self.getHash(),
 isInit: false
   });
+  Em.run.next(function(){
+ self.set('hash', self.getHash())
+  });
 });
   },
 



ambari git commit: AMBARI-11170 - Views : AmbariStreamProvider and URLStreamProvider should accept body as Object (tbeerbower)

2015-05-19 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 824bc8b6a -> 2e0fd3d89


AMBARI-11170 - Views : AmbariStreamProvider and URLStreamProvider should accept 
body as Object (tbeerbower)


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

Branch: refs/heads/trunk
Commit: 2e0fd3d897f807f3086d7390d1c0af6fc3704fad
Parents: 824bc8b
Author: tbeerbower 
Authored: Tue May 19 16:28:32 2015 -0400
Committer: tbeerbower 
Committed: Tue May 19 16:28:55 2015 -0400

--
 .../controller/internal/URLStreamProvider.java  | 61 +---
 .../apache/ambari/server/utils/HTTPUtils.java   |  2 +-
 .../server/view/HttpImpersonatorImpl.java   |  2 +-
 .../server/view/ViewAmbariStreamProvider.java   | 22 -
 .../server/view/ViewURLStreamProvider.java  | 67 +
 .../internal/URLStreamProviderTest.java |  2 +-
 .../ambari/server/proxy/ProxyServiceTest.java   | 10 +-
 .../view/ViewAmbariStreamProviderTest.java  | 40 +++-
 .../server/view/ViewURLStreamProviderTest.java  | 98 +++-
 .../ambari/view/AmbariStreamProvider.java   | 23 -
 .../apache/ambari/view/URLStreamProvider.java   | 48 ++
 11 files changed, 324 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2e0fd3d8/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 1853021..1a8b085 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
@@ -65,30 +65,31 @@ public class URLStreamProvider implements StreamProvider {
 
   /**
* Provide the connection timeout for the underlying connection.
-   * 
+   *
* @param connectionTimeout
*  time, in milliseconds, to attempt a connection
* @param readTimeout
*  the read timeout in milliseconds
* @param configuration configuration holding TrustStore information
*/
-  public URLStreamProvider(int connectionTimeout, int readTimeout, 
-  ComponentSSLConfiguration configuration) {  
+  public URLStreamProvider(int connectionTimeout, int readTimeout,
+   ComponentSSLConfiguration configuration) {
 this(connectionTimeout, readTimeout,
 configuration.getTruststorePath(),
 configuration.getTruststorePassword(),
 configuration.getTruststoreType());
   }
+
   /**
* Provide the connection timeout for the underlying connection.
-   * 
+   *
* @param connectionTimeout
*  time, in milliseconds, to attempt a connection
* @param readTimeout
*  the read timeout in milliseconds
*/
   public URLStreamProvider(int connectionTimeout, int readTimeout, String path,
-  String password, String type) {
+   String password, String type) {
 
 this.connTimeout = connectionTimeout;
 this.readTimeout = readTimeout;
@@ -118,14 +119,50 @@ public class URLStreamProvider implements StreamProvider {
*
* @param spec   the String to parse as a URL
* @param requestMethod  the HTTP method (GET,POST,PUT,etc.).
-   * @param params the body of the request; may be null
+   * @param body   the body of the request; may be null
+   * @param headersthe headers of the request; may be null
+   *
+   * @return a URL connection
+   *
+   * @throws IOException if the URL connection can not be established
+   */
+  public HttpURLConnection processURL(String spec, String requestMethod, 
String body, Map> headers)
+  throws IOException {
+
+return processURL(spec, requestMethod, body == null ? null : 
body.getBytes(), headers);
+  }
+
+  /**
+   * Get a URL connection from the given spec.
+   *
+   * @param spec   the String to parse as a URL
+   * @param requestMethod  the HTTP method (GET,POST,PUT,etc.).
+   * @param body   the body of the request; may be null
* @param headersthe headers of the request; may be null
*
* @return a URL connection
*
* @throws IOException if the URL connection can not be established
*/
-  public HttpURLConnection processURL(String spec, String requestMethod, 
Object params, Map> headers)
+  public HttpURLConnection processURL(String spec, String requestMethod, 
InputStre

ambari git commit: AMBARI-11250. Publishing graphs/widgets for a new service requires ambari server code change.

2015-05-19 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/trunk 8a7c54c63 -> 824bc8b6a


AMBARI-11250. Publishing graphs/widgets for a new service requires ambari 
server code change.


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

Branch: refs/heads/trunk
Commit: 824bc8b6a45682638147d24197cdf106c4fe96c5
Parents: 8a7c54c
Author: Siddharth Wagle 
Authored: Tue May 19 12:55:58 2015 -0700
Committer: Siddharth Wagle 
Committed: Tue May 19 12:56:06 2015 -0700

--
 .../metrics/timeline/AMSPropertyProvider.java   | 23 -
 .../ambari/server/state/ComponentInfo.java  | 11 +++
 .../AMBARI_METRICS/0.1.0/metainfo.xml   |  1 +
 .../HBASE/0.96.0.2.0/metainfo.xml   |  2 +
 .../timeline/AMSPropertyProviderTest.java   | 96 
 5 files changed, 131 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/824bc8b6/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
index 8bd1b2d..d5af2b7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
@@ -17,7 +17,10 @@
  */
 package org.apache.ambari.server.controller.metrics.timeline;
 
+import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.controller.AmbariServer;
 import org.apache.ambari.server.controller.internal.PropertyInfo;
 import org.apache.ambari.server.controller.metrics.MetricHostProvider;
 import org.apache.ambari.server.controller.metrics.MetricsPropertyProvider;
@@ -27,6 +30,7 @@ import 
org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.TemporalInfo;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.controller.utilities.StreamProvider;
+import org.apache.ambari.server.state.StackId;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
 import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
@@ -339,8 +343,23 @@ public abstract class AMSPropertyProvider extends 
MetricsPropertyProvider {
   } else {
 String componentName = getComponentName(resource);
 if (componentName != null && !componentName.isEmpty()) {
-  if (TIMELINE_APPID_MAP.containsKey(componentName)) {
-componentName = TIMELINE_APPID_MAP.get(componentName);
+  String clusterName = (String) 
resource.getPropertyValue(clusterNamePropertyId);
+  StackId stackId;
+  try {
+AmbariManagementController managementController = 
AmbariServer.getController();
+stackId = 
managementController.getClusters().getCluster(clusterName).getCurrentStackVersion();
+if (stackId != null) {
+  String stackName = stackId.getStackName();
+  String version = stackId.getStackVersion();
+  AmbariMetaInfo ambariMetaInfo = 
managementController.getAmbariMetaInfo();
+  String serviceName = 
ambariMetaInfo.getComponentToService(stackName, version, componentName);
+  String timeLineAppId = ambariMetaInfo.getComponent(stackName, 
version, serviceName, componentName).getTimelineAppid();
+  if (timeLineAppId != null){
+componentName = timeLineAppId;
+  }
+}
+  } catch (Exception e) {
+e.printStackTrace();
   }
   uriBuilder.setParameter("appId", componentName);
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/824bc8b6/ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java
index 05c0df7..fd68060 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari

ambari git commit: AMBARI-10882 Allow NFS mounts to be skipped during agent health check (dsen)

2015-05-19 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 15616fd67 -> 8a7c54c63


AMBARI-10882 Allow NFS mounts to be skipped during agent health check (dsen)


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

Branch: refs/heads/trunk
Commit: 8a7c54c6334b986bada53965d9512d79d951a7dc
Parents: 15616fd
Author: Dmytro Sen 
Authored: Tue May 19 22:03:59 2015 +0300
Committer: Dmytro Sen 
Committed: Tue May 19 22:06:59 2015 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  4 --
 ambari-agent/conf/windows/ambari-agent.ini  |  4 --
 .../main/python/ambari_agent/AmbariConfig.py| 15 +++--
 .../src/main/python/ambari_agent/Controller.py  |  5 +-
 .../src/main/python/ambari_agent/Hardware.py| 24 ---
 .../src/main/python/ambari_agent/Heartbeat.py   |  2 +-
 .../src/main/python/ambari_agent/HostInfo.py| 13 
 .../main/python/ambari_agent/RecoveryManager.py |  4 +-
 .../test/python/ambari_agent/TestHardware.py| 27 
 .../test/python/ambari_agent/TestHostInfo.py| 17 -
 ambari-agent/src/test/python/unitTests.py   |  5 +-
 .../ambari/server/agent/HeartBeatHandler.java   |  4 ++
 .../server/agent/RegistrationResponse.java  | 13 
 .../server/configuration/Configuration.java | 17 +
 .../server/agent/TestHeartbeatHandler.java  | 67 +++-
 15 files changed, 143 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7c54c6/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 173bb51..def41c6 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -31,10 +31,6 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 
-[command]
-maxretries=2
-sleepBetweenRetries=1
-
 [security]
 keysdir=/var/lib/ambari-agent/keys
 server_crt=ca.crt

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7c54c6/ambari-agent/conf/windows/ambari-agent.ini
--
diff --git a/ambari-agent/conf/windows/ambari-agent.ini 
b/ambari-agent/conf/windows/ambari-agent.ini
index 61a3ad9..972e11e 100644
--- a/ambari-agent/conf/windows/ambari-agent.ini
+++ b/ambari-agent/conf/windows/ambari-agent.ini
@@ -30,10 +30,6 @@ cache_dir=cache
 tolerate_download_failures=true
 parallel_execution=0
 
-[command]
-maxretries=2
-sleepBetweenRetries=1
-
 [security]
 keysdir=keys
 server_crt=ca.crt

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7c54c6/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py 
b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
index 13e9f03..d4e0c20 100644
--- a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
+++ b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
@@ -50,10 +50,6 @@ parallel_execution=0
 [python]
 custom_actions_dir = 
{ps}var{ps}lib{ps}ambari-agent{ps}resources{ps}custom_actions
 
-[command]
-maxretries=2
-sleepBetweenRetries=1
-
 [security]
 keysdir={ps}tmp{ps}ambari-agent
 server_crt=ca.crt
@@ -146,6 +142,7 @@ pidPathVars = [
 
 class AmbariConfig:
   TWO_WAY_SSL_PROPERTY = "security.server.two_way_ssl"
+  AMBARI_PROPERTIES_CATEGORY = 'agentConfig'
   SERVER_CONNECTION_INFO = "{0}/connection_info"
   CONNECTION_PROTOCOL = "https"
 
@@ -172,6 +169,9 @@ class AmbariConfig:
   def add_section(self, section):
 self.config.add_section(section)
 
+  def has_section(self, section):
+return self.config.has_section(section)
+
   def setConfig(self, customConfig):
 self.config = customConfig
 
@@ -249,6 +249,13 @@ class AmbariConfig:
   def get_parallel_exec_option(self):
 return int(self.get('agent', 'parallel_execution', 0))
 
+  def update_configuration_from_registration(self, reg_resp):
+if reg_resp and AmbariConfig.AMBARI_PROPERTIES_CATEGORY in reg_resp:
+  if not self.has_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY):
+self.add_section(AmbariConfig.AMBARI_PROPERTIES_CATEGORY)
+  for k,v in reg_resp[AmbariConfig.AMBARI_PROPERTIES_CATEGORY].items():
+self.set(AmbariConfig.AMBARI_PROPERTIES_CATEGORY, k, v)
+pass
 
 def updateConfigServerHostname(configFile, new_host):
   # update agent config file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7c54c6/ambari-agent/src/main/python/ambari_agent/Controller.py
---

ambari git commit: AMBARI-11248. Config Override issue (onechiporenko)

2015-05-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 1ee56761e -> 15616fd67


AMBARI-11248. Config Override issue (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 15616fd67c76360d9364a23ab9efdc01a809ea92
Parents: 1ee5676
Author: Oleg Nechiporenko 
Authored: Tue May 19 22:03:55 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Tue May 19 22:03:55 2015 +0300

--
 .../controllers/main/service/info/configs.js|  8 ++--
 .../app/controllers/wizard/step7_controller.js  |  7 +--
 .../models/configs/objects/service_config.js|  2 +-
 .../configs/objects/service_config_property.js  | 14 ++---
 ambari-web/app/models/configs/sub_section.js|  6 --
 ambari-web/app/styles/widgets.less  |  3 +++
 .../configs/widgets/config_widget_view.js   | 12 +--
 .../widgets/slider_config_widget_view.js|  9 ++---
 ambari-web/test/models/configs/section_test.js  | 10 --
 .../test/models/configs/sub_section_test.js | 21 +++-
 .../widgets/slider_config_widget_view_test.js   |  6 +++---
 11 files changed, 69 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/15616fd6/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 8ca6840..a82dc41 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -179,8 +179,10 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
   return Em.isNone(config.get('widget'));
-}).filterProperty('isValid', false).filterProperty('isVisible').length;
-  }.property('selectedService.configs.@each.isValid'),
+}).filter(function(config) {
+  return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
+}).filterProperty('isVisible').length;
+  }.property('selectedService.configs.@each.isValid', 
'selectedService.configs.@each.overrideErrorTrigger'),
 
   /**
* Determines if Save-button should be disabled
@@ -370,6 +372,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
* @method onConfigGroupChange
*/
   onConfigGroupChange: function () {
+console.time('!');
 var self = this;
 this.get('stepConfigs').clear();
 var selectedConfigGroup = this.get('selectedConfigGroup');
@@ -418,6 +421,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 } else {
   self.onLoadOverrides(self.get('allConfigs'));
 }
+console.timeEnd('!');
   });
 });
   }.observes('selectedConfigGroup'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/15616fd6/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 7abe894..f0ae1d3 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -133,8 +133,10 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
   errorsCount: function () {
 return this.get('selectedService.configs').filter(function (config) {
   return Em.isNone(config.get('widget'));
-}).filterProperty('isValid', false).filterProperty('isVisible').length;
-  }.property('selectedService.configs.@each.isValid'),
+}).filter(function(config) {
+  return !config.get('isValid') || (config.get('overrides') || 
[]).someProperty('isValid', false);
+}).filterProperty('isVisible').length;
+  }.property('selectedService.configs.@each.isValid', 
'selectedService.configs.@each.overrideErrorTrigger'),
 
   /**
* Should Next-button be disabled
@@ -477,6 +479,7 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 serviceConfigProperty.set('overrides', parentOverridesArray);
   }
   serviceConfigProperty.get('overrides').pushObject(newSCP);
+  newSCP.validate();
 }, this);
 return serviceConfigProperty;
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/15616fd6/ambari-web/app/models/configs/objects/service_config.js

ambari git commit: AMBARI-11246: Release work for Apache Ambari Release 2.0.1 RC0 (jluniya)

2015-05-19 Thread jluniya
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 1d035163a -> 67077fd1d


AMBARI-11246: Release work for Apache Ambari Release 2.0.1 RC0 (jluniya)


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

Branch: refs/heads/branch-2.0.maint
Commit: 67077fd1d421f00be75f1f2a34232c344d1b611c
Parents: 1d03516
Author: Jayush Luniya 
Authored: Tue May 19 11:08:55 2015 -0700
Committer: Jayush Luniya 
Committed: Tue May 19 11:08:55 2015 -0700

--
 ambari-admin/pom.xml  | 4 ++--
 ambari-agent/pom.xml  | 4 ++--
 ambari-client/groovy-client/pom.xml   | 4 ++--
 ambari-client/pom.xml | 4 ++--
 ambari-client/python-client/pom.xml   | 4 ++--
 ambari-metrics/ambari-metrics-assembly/pom.xml| 4 ++--
 ambari-metrics/ambari-metrics-common/pom.xml  | 2 +-
 ambari-metrics/ambari-metrics-flume-sink/pom.xml  | 4 ++--
 ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 4 ++--
 ambari-metrics/ambari-metrics-host-monitoring/pom.xml | 4 ++--
 ambari-metrics/ambari-metrics-kafka-sink/pom.xml  | 4 ++--
 ambari-metrics/ambari-metrics-storm-sink/pom.xml  | 4 ++--
 ambari-metrics/ambari-metrics-timelineservice/pom.xml | 6 +++---
 ambari-metrics/pom.xml| 2 +-
 ambari-project/pom.xml| 4 ++--
 ambari-server/pom.xml | 4 ++--
 ambari-shell/ambari-groovy-shell/pom.xml  | 6 +++---
 ambari-shell/ambari-python-shell/pom.xml  | 4 ++--
 ambari-shell/pom.xml  | 4 ++--
 ambari-views/examples/property-validator-view/pom.xml | 2 +-
 ambari-views/pom.xml  | 4 ++--
 ambari-web/pom.xml| 4 ++--
 contrib/ambari-log4j/pom.xml  | 2 +-
 contrib/ambari-scom/ambari-scom-server/pom.xml| 4 ++--
 contrib/ambari-scom/metrics-sink/pom.xml  | 2 +-
 contrib/ambari-scom/pom.xml   | 2 +-
 contrib/views/capacity-scheduler/pom.xml  | 2 +-
 contrib/views/files/pom.xml   | 2 +-
 contrib/views/hive/pom.xml| 4 ++--
 contrib/views/jobs/pom.xml| 4 ++--
 contrib/views/pig/pom.xml | 4 ++--
 contrib/views/pom.xml | 8 
 contrib/views/slider/pom.xml  | 2 +-
 contrib/views/tez/pom.xml | 2 +-
 docs/pom.xml  | 4 ++--
 pom.xml   | 2 +-
 36 files changed, 65 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/67077fd1/ambari-admin/pom.xml
--
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index 1222e36..4c5fdd7 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -19,7 +19,7 @@
   
 org.apache.ambari
 ambari-project
-2.0.0.0
+2.0.1.0
 ../ambari-project
   
   4.0.0
@@ -27,7 +27,7 @@
   ambari-admin
   jar
   Ambari Admin View
-  2.0.0.0
+  2.0.1.0
   Admin control panel
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/67077fd1/ambari-agent/pom.xml
--
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 891029e..423827b 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -19,14 +19,14 @@
   
 org.apache.ambari
 ambari-project
-2.0.0.0
+2.0.1.0
 ../ambari-project
   
   4.0.0
   org.apache.ambari
   ambari-agent
   pom
-  2.0.0.0
+  2.0.1.0
   Ambari Agent
   Ambari Agent
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/67077fd1/ambari-client/groovy-client/pom.xml
--
diff --git a/ambari-client/groovy-client/pom.xml 
b/ambari-client/groovy-client/pom.xml
index cf7a77f..80f5d90 100644
--- a/ambari-client/groovy-client/pom.xml
+++ b/ambari-client/groovy-client/pom.xml
@@ -12,14 +12,14 @@
   
 ambari-client
 org.apache.ambari
-2.0.0.0
+2.0.1.0
 ../../ambari-client/
   
   4.0.0
   org.apache.ambari
   groovy-client
   jar
-  2.0.0.0
+  2.0.1.0
   Ambari Groovy Client
   Ambari Groovy client
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/67077fd1/ambari-client/pom.xml
--
diff --git 

ambari git commit: Revert "Revert "AMBARI-4626. "Capacity Scheduler" section in Ambari does not allow ACL value of "user group" with spaces (aonishuk)""

2015-05-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 0b00e25b0 -> 1d035163a


Revert "Revert "AMBARI-4626. "Capacity Scheduler" section in Ambari does not 
allow ACL value of "user group" with spaces (aonishuk)""

This reverts commit 0b00e25b0d4f7a045c52c047ae15c1bf4e67f4e5.


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

Branch: refs/heads/branch-2.0.maint
Commit: 1d035163a935b6e826d353c1d752c30c0e0d833b
Parents: 0b00e25
Author: Jonathan Hurley 
Authored: Tue May 19 13:35:16 2015 -0400
Committer: Jonathan Hurley 
Committed: Tue May 19 13:35:16 2015 -0400

--
 ambari-common/src/main/python/resource_management/core/source.py | 2 +-
 .../python/resource_management/libraries/providers/xml_config.py | 2 +-
 .../common-services/HDFS/2.1.0.2.0/configuration/core-site.xml   | 4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d035163/ambari-common/src/main/python/resource_management/core/source.py
--
diff --git a/ambari-common/src/main/python/resource_management/core/source.py 
b/ambari-common/src/main/python/resource_management/core/source.py
index 3e3276f..8693c65 100644
--- a/ambari-common/src/main/python/resource_management/core/source.py
+++ b/ambari-common/src/main/python/resource_management/core/source.py
@@ -130,7 +130,7 @@ else:
   self.context.update(variables)
   
   rendered = self.template.render(self.context)
-  return rendered + "\n" if not rendered.endswith('\n') else rendered
+  return rendered
 
   class InlineTemplate(Template):
 def __init__(self, name, extra_imports=[], **kwargs):

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d035163/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
index da7a907..494d3e7 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
@@ -41,7 +41,7 @@ class XmlConfigProvider(Provider):
 {% for key, value in configurations_dict|dictsort %}
 
   {{ key|e }}
-  {{ 
resource_management.core.source.InlineTemplate(value).get_content().strip() |e 
}}
+  {{ 
resource_management.core.source.InlineTemplate(value).get_content() |e 
}}
   {%- if not configuration_attrs is none -%}
   {%- for attrib_name, attrib_occurances in  configuration_attrs.items() 
-%}
   {%- for property_name, attrib_value in  attrib_occurances.items() -%}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d035163/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/core-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/core-site.xml
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/core-site.xml
index c0cd6b3..ccbc5cf 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/core-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/core-site.xml
@@ -135,9 +135,7 @@
 
   
 hadoop.security.auth_to_local
-
-DEFAULT
-
+DEFAULT
 The mapping from kerberos principal names to local OS 
mapreduce.job.user.names.
   So the default rule is just "DEFAULT" which takes all principals in your 
default domain to their first component.
   "omal...@apache.org" and "omalley/ad...@apache.org" to "omalley", if your 
default domain is APACHE.ORG.



ambari git commit: Revert "Revert "AMBARI-4626. "Capacity Scheduler" section in Ambari does not allow ACL value of "user group" with spaces (aonishuk)""

2015-05-19 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/trunk 21fde6765 -> 1ee56761e


Revert "Revert "AMBARI-4626. "Capacity Scheduler" section in Ambari does not 
allow ACL value of "user group" with spaces (aonishuk)""

This reverts commit cf0877cea1cbc5de42c89a342924f5081db8e3f7.


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

Branch: refs/heads/trunk
Commit: 1ee56761efaa9e049f37ff81cdbc69a096b0e494
Parents: 21fde67
Author: Jonathan Hurley 
Authored: Tue May 19 13:34:28 2015 -0400
Committer: Jonathan Hurley 
Committed: Tue May 19 13:34:28 2015 -0400

--
 .../providers/modify_properties_file.py |   4 +-
 .../libraries/providers/properties_file.py  |   2 +-
 .../libraries/providers/xml_config.py   |   2 +-
 .../HDFS/2.1.0.2.0/configuration/core-site.xml  |   4 +-
 .../services/HBASE/configuration/hbase-site.xml |   4 +-
 .../services/HDFS/configuration/core-site.xml   |   2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |   2 +-
 .../HDFS/configuration/hdfs-site.xml.orig   |  58 ++
 ambari-web/app/data/HDP2.2/site_properties.js   |  40 +
 .../app/data/HDP2.2/site_properties.js.orig | 830 +++
 10 files changed, 937 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee56761/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
index e71abb8..661cb68 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/modify_properties_file.py
@@ -52,14 +52,14 @@ class ModifyPropertiesFileProvider(Provider):
   in_var_value = line.split(delimiter)[1].strip()
   
   if in_var_name in properties:
-value = 
InlineTemplate(unicode(properties[in_var_name])).get_content().strip()
+value = 
InlineTemplate(unicode(properties[in_var_name])).get_content()
 new_content_lines[line_num] = 
u"{0}{1}{2}".format(unicode(in_var_name), delimiter, value)
 unsaved_values.remove(in_var_name)
 else:
   Logger.info(format("Creating new properties file as {filename} doesn't 
exist"))

 for property_name in unsaved_values:
-  value = 
InlineTemplate(unicode(properties[property_name])).get_content().strip()
+  value = InlineTemplate(unicode(properties[property_name])).get_content()
   line = u"{0}{1}{2}".format(unicode(property_name), delimiter, value)
   new_content_lines.append(line)
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee56761/ambari-common/src/main/python/resource_management/libraries/providers/properties_file.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/properties_file.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/properties_file.py
index 1d21649..53459dd 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/providers/properties_file.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/providers/properties_file.py
@@ -42,7 +42,7 @@ class PropertiesFileProvider(Provider):
 
 config_content = InlineTemplate('''# Generated by Apache Ambari. 
{{time.asctime(time.localtime())}}
 {% for key, value in properties_dict|dictsort %}
-{{key}}{{key_value_delimiter}}{{ 
resource_management.core.source.InlineTemplate(str(value)).get_content().strip()
 }}{% endfor %}
+{{key}}{{key_value_delimiter}}{{ 
resource_management.core.source.InlineTemplate(str(value)).get_content() }}{% 
endfor %}
 ''', extra_imports=[time, resource_management, resource_management.core, 
resource_management.core.source], properties_dict=self.resource.properties, 
key_value_delimiter=self.resource.key_value_delimiter)
 
 Logger.info(format("Generating properties file: {filepath}"))

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ee56761/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
 
b/ambari-common/src/main/python/resource_management/libraries/providers/xml_config.py
index 6f6c

ambari git commit: AMBARI-11242. Every minute Ambari agent freezes for 10-15 while executing status commands (aonishuk)

2015-05-19 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 7e8d3dea8 -> 21fde6765


AMBARI-11242. Every minute Ambari agent freezes for 10-15 while executing 
status commands (aonishuk)


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

Branch: refs/heads/trunk
Commit: 21fde676532f4073e7e089e8e1780412f827a949
Parents: 7e8d3de
Author: Andrew Onishuk 
Authored: Tue May 19 19:04:25 2015 +0300
Committer: Andrew Onishuk 
Committed: Tue May 19 19:04:25 2015 +0300

--
 .../ambari_agent/CustomServiceOrchestrator.py   | 17 ++--
 .../main/python/ambari_agent/PythonExecutor.py  | 16 ++--
 .../ambari_agent/PythonReflectiveExecutor.py| 98 
 .../TestCustomServiceOrchestrator.py| 11 ++-
 .../python/ambari_agent/TestPythonExecutor.py   | 19 ++--
 .../libraries/functions/check_process_status.py | 12 ++-
 .../libraries/script/script.py  |  7 --
 7 files changed, 138 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21fde676/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
--
diff --git 
a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
index b107e3f..e291196 100644
--- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py
@@ -28,6 +28,7 @@ import threading
 from FileCache import FileCache
 from AgentException import AgentException
 from PythonExecutor import PythonExecutor
+from PythonReflectiveExecutor import PythonReflectiveExecutor
 import hostname
 
 
@@ -55,6 +56,7 @@ class CustomServiceOrchestrator():
 
   AMBARI_SERVER_HOST = "ambari_server_host"
   DONT_DEBUG_FAILURES_FOR_COMMANDS = [COMMAND_NAME_SECURITY_STATUS, 
COMMAND_NAME_STATUS]
+  REFLECTIVELY_RUN_COMMANDS = [COMMAND_NAME_SECURITY_STATUS, 
COMMAND_NAME_STATUS] # -- commands which run a lot and often (this increases 
their speed)
 
   def __init__(self, config, controller):
 self.config = config
@@ -95,12 +97,15 @@ class CustomServiceOrchestrator():
   else: 
 logger.warn("Unable to find pid by taskId = %s" % task_id)
 
-  def get_py_executor(self):
+  def get_py_executor(self, forced_command_name):
 """
 Wrapper for unit testing
 :return:
 """
-return PythonExecutor(self.tmp_dir, self.config)
+if forced_command_name in self.REFLECTIVELY_RUN_COMMANDS:
+  return PythonReflectiveExecutor(self.tmp_dir, self.config)
+else:
+  return PythonExecutor(self.tmp_dir, self.config)
 
   def runCommand(self, command, tmpoutfile, tmperrfile, 
forced_command_name=None,
  override_output_files=True, retry=False):
@@ -178,13 +183,13 @@ class CustomServiceOrchestrator():
   if command.has_key('commandType') and command['commandType'] == 
ActionQueue.BACKGROUND_EXECUTION_COMMAND and len(filtered_py_file_list) > 1:
 raise AgentException("Background commands are supported without hooks 
only")
 
-  python_executor = self.get_py_executor()
+  python_executor = self.get_py_executor(forced_command_name)
   for py_file, current_base_dir in filtered_py_file_list:
 log_info_on_failure = not command_name in 
self.DONT_DEBUG_FAILURES_FOR_COMMANDS
-script_params = [command_name, json_path, current_base_dir]
+script_params = [command_name, json_path, current_base_dir, 
tmpstrucoutfile, logger_level, self.exec_tmp_dir]
 ret = python_executor.run_file(py_file, script_params,
-   self.exec_tmp_dir, tmpoutfile, tmperrfile, 
timeout,
-   tmpstrucoutfile, logger_level, 
self.map_task_to_process,
+   tmpoutfile, tmperrfile, timeout,
+   tmpstrucoutfile, self.map_task_to_process,
task_id, override_output_files, handle = 
handle, log_info_on_failure=log_info_on_failure)
 # Next run_file() invocations should always append to current output
 override_output_files = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/21fde676/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py 
b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
index 3aa26a0..abbbe85 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/pyt

ambari git commit: AMBARI-11236. RU: Clarify Prerequisite Check for Service and MM details (dlysnichenko)

2015-05-19 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk e3d5fd618 -> 7e8d3dea8


AMBARI-11236. RU: Clarify Prerequisite Check for Service and MM details 
(dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 7e8d3dea89a9ff80f7e7e315498f71ff97c521b2
Parents: e3d5fd6
Author: Lisnichenko Dmitro 
Authored: Tue May 19 18:51:55 2015 +0300
Committer: Lisnichenko Dmitro 
Committed: Tue May 19 18:51:55 2015 +0300

--
 .../ambari/server/checks/ServicesMaintenanceModeCheck.java  | 2 +-
 .../ambari/server/checks/ServicesMaintenanceModeCheckTest.java  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7e8d3dea/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheck.java
index 2b5ff49..5108afd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheck.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheck.java
@@ -50,7 +50,7 @@ public class ServicesMaintenanceModeCheck extends 
AbstractCheckDescriptor {
 final Cluster cluster = clustersProvider.get().getCluster(clusterName);
 for (Map.Entry serviceEntry : 
cluster.getServices().entrySet()) {
   final Service service = serviceEntry.getValue();
-  if (!service.isClientOnlyService() && (service.getDesiredState() != 
State.STARTED || service.getMaintenanceState() == MaintenanceState.ON)) {
+  if (!service.isClientOnlyService() && service.getMaintenanceState() == 
MaintenanceState.ON) {
 prerequisiteCheck.getFailedOn().add(service.getName());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7e8d3dea/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheckTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheckTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheckTest.java
index 8b5cdb1..87ced01 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheckTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesMaintenanceModeCheckTest.java
@@ -76,11 +76,12 @@ public class ServicesMaintenanceModeCheckTest {
 final Service service = Mockito.mock(Service.class);
 
Mockito.when(cluster.getServices()).thenReturn(Collections.singletonMap("service",
 service));
 Mockito.when(service.isClientOnlyService()).thenReturn(false);
-Mockito.when(service.getDesiredState()).thenReturn(State.UNKNOWN);
 
+// We don't bother checking service desired state as it's performed by a 
separate check
+Mockito.when(service.getDesiredState()).thenReturn(State.UNKNOWN);
 PrerequisiteCheck check = new PrerequisiteCheck(null, null);
 servicesMaintenanceModeCheck.perform(check, new 
PrereqCheckRequest("cluster"));
-Assert.assertEquals(PrereqCheckStatus.FAIL, check.getStatus());
+Assert.assertEquals(PrereqCheckStatus.PASS, check.getStatus());
 
 Mockito.when(service.getDesiredState()).thenReturn(State.STARTED);
 check = new PrerequisiteCheck(null, null);



ambari git commit: AMBARI-11229 - Views: AmbariStreamProvider is encoding the url provided (tbeerbower)

2015-05-19 Thread tbeerbower
Repository: ambari
Updated Branches:
  refs/heads/trunk 27a228977 -> e3d5fd618


AMBARI-11229 - Views: AmbariStreamProvider is encoding the url provided 
(tbeerbower)


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

Branch: refs/heads/trunk
Commit: e3d5fd61864872121f994e769e8a7e4e496912c1
Parents: 27a2289
Author: tbeerbower 
Authored: Tue May 19 10:06:51 2015 -0400
Committer: tbeerbower 
Committed: Tue May 19 10:06:59 2015 -0400

--
 .../server/controller/AmbariManagementControllerImpl.java | 10 +-
 .../controller/AmbariManagementControllerImplTest.java|  3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e3d5fd61/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index d1aebae..266d299 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -323,7 +323,15 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
 uriBuilder.setScheme(masterProtocol);
 uriBuilder.setHost(masterHostname);
 uriBuilder.setPort(masterPort);
-uriBuilder.setPath(path);
+
+String[] parts = path.split("\\?");
+
+if (parts.length > 1) {
+  uriBuilder.setPath(parts[0]);
+  uriBuilder.setQuery(parts[1]);
+} else {
+  uriBuilder.setPath(path);
+}
 
 return uriBuilder.toString();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e3d5fd61/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index 5d84586..23ce914 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@ -170,6 +170,9 @@ public class AmbariManagementControllerImplTest {
 ambariConfigsSetter.setConfigs(controller, "https", "othersecuredhost", 
8443);
 assertEquals("https://othersecuredhost:8443/oracle/ojdbc/";, 
controller.getAmbariServerURI("/oracle/ojdbc/"));
 
+ambariConfigsSetter.setConfigs(controller, "http", "hostname", 8080);
+assertEquals("http://hostname:8080/jdk_path?query";, 
controller.getAmbariServerURI("/jdk_path?query"));
+
 verify(injector);
   }
 



ambari git commit: AMBARI-10931. Blueprints processor needs stronger validation of Blueprint JSON structure (Emil Anca via rlevas)

2015-05-19 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 211c78bbb -> 27a228977


AMBARI-10931. Blueprints processor needs stronger validation of Blueprint JSON 
structure (Emil Anca via rlevas)


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

Branch: refs/heads/trunk
Commit: 27a228977c02860926ae71d90395b6dde5b16517
Parents: 211c78b
Author: Emil Anca 
Authored: Tue May 19 09:35:23 2015 -0400
Committer: Robert Levas 
Committed: Tue May 19 09:35:23 2015 -0400

--
 .../internal/BlueprintResourceProvider.java |  20 ++
 .../internal/BlueprintResourceProviderTest.java | 187 ++-
 2 files changed, 163 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/27a22897/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
index aab5395..f85ec32 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
@@ -375,8 +375,28 @@ public class BlueprintResourceProvider extends 
AbstractControllerResourceProvide
*/
   private Command getCreateCommand(final Map properties, 
final Map requestInfoProps) {
 return new Command() {
+  @SuppressWarnings("rawtypes")
   @Override
   public Void invoke() throws AmbariException {
+String rawRequestBody = 
requestInfoProps.get(Request.REQUEST_INFO_BODY_PROPERTY);
+Map rawBodyMap = jsonSerializer.>fromJson(rawRequestBody, Map.class);
+Object configurationData = rawBodyMap.get(CONFIGURATION_PROPERTY_ID);
+
+if (configurationData != null) {
+  if (configurationData instanceof List) {
+for (Object map : (List) configurationData) {
+  if (map instanceof Map) {
+if (((Map) map).size() > 1) {
+  throw new IllegalArgumentException("Configuration Maps must 
hold a single configuration type each");
+}
+  } else {
+throw new IllegalArgumentException("Configuration elements 
must be Maps");
+  }
+}
+  } else {
+throw new IllegalArgumentException("Configurations property must 
be a List of Maps");
+  }
+}
 Blueprint blueprint;
 try {
   blueprint = blueprintFactory.createBlueprint(properties);

http://git-wip-us.apache.org/repos/asf/ambari/blob/27a22897/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
index 118a7be..4a5ff46 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
@@ -58,6 +58,7 @@ import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
+import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.orm.dao.BlueprintDAO;
 import org.apache.ambari.server.orm.dao.StackDAO;
@@ -127,22 +128,9 @@ public class BlueprintResourceProviderTest {
 
 AmbariManagementController managementController = 
createMock(AmbariManagementController.class);
 Request request = createMock(Request.class);
-//Capture> stackServiceRequestCapture = new 
Capture>();
-
-//Map services = new HashMap();
-//ServiceInfo service = new ServiceInfo();
-//service.setName("test-service");
-//services.put("test-service", service);
-
-//List serviceComponents = new ArrayList();
-//ComponentInfo component1 = new ComponentInfo();
-//component1.setName("component1");
-//ComponentInfo compone

ambari git commit: AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2 (metastore part)

2015-05-19 Thread abaranchuk
Repository: ambari
Updated Branches:
  refs/heads/trunk fddbaf4dd -> 211c78bbb


AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2 
(metastore part)


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

Branch: refs/heads/trunk
Commit: 211c78bbbae794a0c5d7fdb04327bf2960bb96ea
Parents: fddbaf4
Author: Artem Baranchuk 
Authored: Mon May 18 17:31:37 2015 +0300
Committer: Artem Baranchuk 
Committed: Tue May 19 14:24:23 2015 +0300

--
 .../server/upgrade/UpgradeCatalog210.java   | 33 
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  | 13 +++-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  2 ++
 .../services/HIVE/configuration/hive-env.xml|  5 +++
 .../server/upgrade/UpgradeCatalog210Test.java   |  9 +-
 5 files changed, 60 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
index b10d3a5..69c82ef 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
@@ -873,6 +873,39 @@ public class UpgradeCatalog210 extends 
AbstractUpgradeCatalog {
 
 // Initialize all default widgets and widget layouts
 initializeClusterAndServiceWidgets();
+
+addMissingConfigs();
+  }
+
+  protected void addMissingConfigs() throws AmbariException {
+updateHiveConfigs();
+  }
+
+  protected void updateHiveConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(
+AmbariManagementController.class);
+Clusters clusters = ambariManagementController.getClusters();
+
+if (clusters != null) {
+  Map clusterMap = clusters.getClusters();
+  Map prop = new HashMap();
+
+  if (clusterMap != null && !clusterMap.isEmpty()) {
+for (final Cluster cluster : clusterMap.values()) {
+  //hive metastore and client_heapsize are added for HDP2, we should 
check if it exists and not add it for HDP1
+  if(cluster.getDesiredConfigByType("hive-env") != null) {
+Map hiveProps = new HashMap();
+if 
(!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize"))
 {
+  hiveProps.put("hive.client.heapsize", "512m");
+}
+if 
(!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize"))
 {
+  hiveProps.put("hive.metastore.heapsize", "1024m");
+}
+updateConfigurationPropertiesForCluster(cluster, "hive-env", 
hiveProps, false, true);
+  }
+}
+  }
+}
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
index 923a9ba..db2c927 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml
@@ -28,6 +28,12 @@
   
 
   
+hive.metastore.heapsize
+1024
+Hive Metastore Java heap size
+  
+
+  
 hive_database_type
 mysql
 Default HIVE DB type.
@@ -106,7 +112,12 @@
 
 # The heap size of the jvm stared by hive shell script can be controlled via:
 
-export HADOOP_HEAPSIZE="{{hive_heapsize}}"
+if [ "$SERVICE" = "metastore" ]; then
+  export HADOOP_HEAPSIZE="{{hive_metastore_heapsize}}"
+else
+  export HADOOP_HEAPSIZE="{{hive_heapsize}}"
+fi
+
 export HADOOP_CLIENT_OPTS="-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS"
 
 # Larger heap size may be required when running queries over large number of 
files or partitions.

http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0

[2/2] ambari git commit: AMBARI-11235 Should 'Set Recommended Value'-button be available for configs with type 'password'. (ababiichuk)

2015-05-19 Thread ababiichuk
AMBARI-11235 Should 'Set Recommended Value'-button be available for configs 
with type 'password'. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: fddbaf4ddf2cbac63ca629d44e41ae8e56a0fec9
Parents: 3441765
Author: aBabiichuk 
Authored: Tue May 19 13:08:18 2015 +0300
Committer: aBabiichuk 
Committed: Tue May 19 13:08:18 2015 +0300

--
 .../app/models/configs/objects/service_config_property.js   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fddbaf4d/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 46f6fa6..06994c0 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -137,7 +137,8 @@ App.ServiceConfigProperty = Em.Object.extend({
* @type {boolean}
*/
   recommendedValueExists: function () {
-return !Em.isNone(this.get('recommendedValue')) && 
this.get('isRequiredByAgent') && !this.get('cantBeUndone');
+return !Em.isNone(this.get('recommendedValue')) && 
(this.get('recommendedValue') != "")
+  && this.get('isRequiredByAgent') && !this.get('cantBeUndone');
   }.property('recommendedValue'),
 
   /**
@@ -469,4 +470,4 @@ App.ServiceConfigProperty = Em.Object.extend({
 return isError;
   }
 
-});
+});
\ No newline at end of file



[1/2] ambari git commit: AMBARI-11234 Installer not overriding /stacks values with /recommendations values. (ababiichuk)

2015-05-19 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 558925301 -> fddbaf4dd


AMBARI-11234 Installer not overriding /stacks values with /recommendations 
values. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 3441765407ee544f80e97fa9ebe3de2e2f9ccb71
Parents: 5589253
Author: aBabiichuk 
Authored: Tue May 19 13:08:00 2015 +0300
Committer: aBabiichuk 
Committed: Tue May 19 13:08:00 2015 +0300

--
 ambari-web/app/mixins/common/configs/enhanced_configs.js | 9 +
 ambari-web/app/views/common/controls_view.js | 5 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34417654/ambari-web/app/mixins/common/configs/enhanced_configs.js
--
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 5d67ee7..85df56b 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -207,16 +207,17 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
   /**
* disable saving recommended value for current config
* @param config
+   * @param {boolean} saveRecommended
* @method removeCurrentFromDependentList
*/
-  removeCurrentFromDependentList: function (config) {
+  removeCurrentFromDependentList: function (config, saveRecommended) {
 var current = 
this.get('_dependentConfigValues').find(function(dependentConfig) {
   return Em.get(dependentConfig, 'propertyName') == config.get('name') && 
Em.get(dependentConfig, 'fileName') == 
App.config.getConfigTagFromFileName(config.get('filename'))
 });
 if (current) {
   Em.setProperties(current, {
-  'saveRecommended': false,
-  'saveRecommendedDefault': false
+  'saveRecommended': !!saveRecommended,
+  'saveRecommendedDefault': !!saveRecommended
 });
 }
   },
@@ -419,7 +420,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
 
 for (var propertyName in configObject[key].properties) {
 
-  var dependentProperty = 
this.get('_dependentConfigValues').findProperty('propertyName', propertyName);
+  var dependentProperty = 
this.get('_dependentConfigValues').filterProperty('propertyName', 
propertyName).findProperty('fileName', key);
   var cp = configProperties.findProperty('name', propertyName);
   var override = (notDefaultGroup && group && cp && 
cp.get('overrides')) ? cp.get('overrides').findProperty('group.name', 
group.get('name')) : null;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/34417654/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 7263475..995ace7 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -90,6 +90,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
 if (!config.get('isValid')) return $.Deferred().resolve().promise();
 if (App.get('isClusterSupportsEnhancedConfigs') && 
['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name')))
 {
   var name = config.get('name');
+  var saveRecommended = (this.get('config.value') === 
this.get('config.recommendedValue'));
   var controller = this.get('controller');
   var type = App.config.getConfigTagFromFileName(config.get('filename'));
   var p = App.StackConfigProperty.find(name + '_' + type);
@@ -98,10 +99,10 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
   "type": type,
   "name": name
 }], false, function() {
-  controller.removeCurrentFromDependentList(config);
+  controller.removeCurrentFromDependentList(config, saveRecommended);
 });
   } else {
-controller.removeCurrentFromDependentList(config);
+controller.removeCurrentFromDependentList(config, saveRecommended);
   }
 }
 



ambari git commit: AMBARI-11233. Checkbox override issue (onechiporenko)

2015-05-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 2e64b3b9f -> 558925301


AMBARI-11233. Checkbox override issue (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 558925301b22a06f5b7b35b84f68588e904703b4
Parents: 2e64b3b
Author: Oleg Nechiporenko 
Authored: Tue May 19 12:48:37 2015 +0300
Committer: Oleg Nechiporenko 
Committed: Tue May 19 12:48:37 2015 +0300

--
 ambari-web/app/controllers/wizard/step7_controller.js| 3 ++-
 .../app/mixins/main/service/configs/config_overridable.js| 4 ++--
 .../app/models/configs/objects/service_config_property.js| 8 
 3 files changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/55892530/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 1325069..7abe894 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1120,8 +1120,9 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
 var overrides = serviceConfigProperty.get('overrides') || [];
 var newSCP = App.ServiceConfigProperty.create(serviceConfigProperty);
 var group = this.get('selectedService.configGroups').findProperty('name', 
this.get('selectedConfigGroup.name'));
+var valueForOverride = (serviceConfigProperty.get('widget') || 
serviceConfigProperty.get('displayType') == 'checkbox') ? 
serviceConfigProperty.get('value') : '';
 newSCP.set('group', group);
-newSCP.set('value', serviceConfigProperty.get('widget') ? 
serviceConfigProperty.get('value') : '');
+newSCP.set('value', valueForOverride);
 newSCP.set('isOriginalSCP', false); // indicated this is overridden value,
 newSCP.set('parentSCP', serviceConfigProperty);
 newSCP.set('isEditable', true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/55892530/ambari-web/app/mixins/main/service/configs/config_overridable.js
--
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js 
b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 0591195..df45e81 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -30,7 +30,6 @@ App.ConfigOverridable = Em.Mixin.create({
* @method createOverrideProperty
*/
   createOverrideProperty: function (event) {
-$('.tooltip').remove();
 var serviceConfigProperty = event.contexts[0];
 var serviceConfigController = this.get('isView') ? this.get('controller') 
: this;
 var selectedConfigGroup = 
serviceConfigController.get('selectedConfigGroup');
@@ -63,7 +62,8 @@ App.ConfigOverridable = Em.Mixin.create({
   );
 }
 else {
-  serviceConfigController.addOverrideProperty(serviceConfigProperty, 
selectedConfigGroup, serviceConfigProperty.get('widget') ? 
serviceConfigProperty.get('value') : null);
+  var valueForOverride = (serviceConfigProperty.get('widget') || 
serviceConfigProperty.get('displayType') == 'checkbox') ? 
serviceConfigProperty.get('value') : null;
+  serviceConfigController.addOverrideProperty(serviceConfigProperty, 
selectedConfigGroup, valueForOverride);
 }
 Em.$('body>.tooltip').remove();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/55892530/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 2357467..46f6fa6 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -425,14 +425,14 @@ App.ServiceConfigProperty = Em.Object.extend({
   _validateOverrides: function () {
 var self = this;
 var isError = false;
-var value = this.get('value');
+var value = '' + this.get('value');
 var isOriginalSCP = this.get('isOriginalSCP');
 var supportsFinal = this.get('supportsFinal');
 var isFinal = this.get('isFinal');
 var parentSCP = this.get('parentSCP');
 if (!isOriginalSCP) {
   if (!Em.isNone(parentSCP)) {
-if (value === parentSCP.get('value')) {
+if (value === '' + parentSCP.get

ambari git commit: AMBARI-11200. Fix ignored persistence-related unit tests (dlysnichenko)

2015-05-19 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk afe427a0f -> 2e64b3b9f


AMBARI-11200. Fix ignored persistence-related unit tests (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 2e64b3b9f71d3681b6c37ab5e7b39087c989a306
Parents: afe427a
Author: Lisnichenko Dmitro 
Authored: Tue May 19 12:30:28 2015 +0300
Committer: Lisnichenko Dmitro 
Committed: Tue May 19 12:30:28 2015 +0300

--
 ambari-server/pom.xml   |  6 +
 .../server/orm/entities/AlertTargetEntity.java  |  8 ++
 .../HostVersionOutOfSyncListenerTest.java   |  3 +++
 .../server/orm/dao/AlertDefinitionDAOTest.java  |  7 ++---
 .../server/orm/dao/AlertDispatchDAOTest.java| 10 +---
 .../ambari/server/orm/dao/AlertsDAOTest.java| 27 +++-
 .../upgrades/UpgradeActionTest.java |  6 ++---
 .../state/alerts/InitialAlertEventTest.java |  2 --
 .../state/cluster/AlertDataManagerTest.java |  7 ++---
 .../server/state/cluster/ClusterTest.java   | 26 +++
 10 files changed, 42 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2e64b3b9/ambari-server/pom.xml
--
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 4c34e6a..4158d95 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1460,6 +1460,12 @@
   derby
 
 
+  org.apache.derby
+  derbytools
+  10.11.1.1
+  test
+
+
   org.springframework.security
   spring-security-core
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e64b3b9/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
index ce29921..5151a4a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java
@@ -320,6 +320,14 @@ public class AlertTargetEntity {
 alertNotices.add(notice);
   }
 
+  public List getAlertNotices() {
+return alertNotices;
+  }
+
+  public void setAlertNotices(List alertNotices) {
+this.alertNotices = alertNotices;
+  }
+
   /**
* Called before {@link EntityManager#remove(Object)} for this entity, 
removes
* the non-owning relationship between targets and groups.

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e64b3b9/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
index 7f5cbfb..078d4c7 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
@@ -32,6 +32,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.inject.Inject;
+import com.google.inject.persist.UnitOfWork;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.events.ServiceComponentInstalledEvent;
@@ -101,6 +102,7 @@ public class HostVersionOutOfSyncListenerTest {
 
 EventBusSynchronizer.synchronizeAmbariEventPublisher(injector);
 injector.injectMembers(this);
+injector.getInstance(UnitOfWork.class).begin();
 
 StackId stackId = new StackId(this.stackId);
 clusters.addCluster("c1", stackId);
@@ -115,6 +117,7 @@ public class HostVersionOutOfSyncListenerTest {
 
   @After
   public void teardown() {
+injector.getInstance(UnitOfWork.class).end();
 injector.getInstance(PersistService.class).stop();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2e64b3b9/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java
 
b/a