ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-10451. Stack Validator skips hbase-env, fails when when HBase properties hbase_master_heapsize or hbase_regionserver_heapsize are added to both hbase-env and hbase-site - returns 500 error (alejandro)
Date Sat, 02 May 2015 01:42:59 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a851dffba -> 48edffff0


AMBARI-10451. Stack Validator skips hbase-env, fails when when HBase properties hbase_master_heapsize
or hbase_regionserver_heapsize are added to both hbase-env and hbase-site - returns 500 error
(alejandro)


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

Branch: refs/heads/trunk
Commit: 48edffff0383e48d5164fbee4e10ee0a7a376e71
Parents: a851dff
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Fri Apr 10 19:00:36 2015 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Fri May 1 18:42:48 2015 -0700

----------------------------------------------------------------------
 .../api/services/stackadvisor/StackAdvisorRunner.java  |  4 +++-
 .../stacks/HDP/2.0.6/services/stack_advisor.py         | 13 +++++++++++--
 .../resources/stacks/HDP/2.2/services/stack_advisor.py |  1 -
 3 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/48edffff/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
index 191aeed..f3b61bd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
@@ -83,10 +83,12 @@ public class StackAdvisorRunner {
             if (index > -1) {
               errMessage = errMessage.substring(index + 1).trim();
             }
-            errorMessage = errMessage;
+            errorMessage = "Stack Advisor reported an error: " + errMessage;
           } else {
             errorMessage = "Error occurred during stack advisor execution";
           }
+          errorMessage += "\nStdOut file: " + outputFile + "\n";
+          errorMessage += "\nStdErr file: " + errorFile;
           switch (exitCode) {
             case 1:
               throw new StackAdvisorRequestException(errorMessage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/48edffff/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 32678a8..d56b201 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -326,12 +326,16 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     for service in services["services"]:
       serviceName = service["StackServices"]["service_name"]
       validator = self.validateServiceConfigurations(serviceName)
-      if validator is not  None:
+      if validator is not None:
         for siteName, method in validator.items():
           if siteName in recommendedDefaults:
             siteProperties = getSiteProperties(configurations, siteName)
             if siteProperties is not None:
-              resultItems = method(siteProperties, recommendedDefaults[siteName]["properties"],
configurations, services, hosts)
+              siteRecommendations = recommendedDefaults[siteName]["properties"]
+              print("SiteName: %s, method: %s\n" % (siteName, method.__name__))
+              print("Site properties: %s\n" % str(siteProperties))
+              print("Recommendations: %s\n********\n" % str(siteRecommendations))
+              resultItems = method(siteProperties, siteRecommendations, configurations, services,
hosts)
               items.extend(resultItems)
     self.validateMinMax(items, recommendedDefaults, configurations)
     return items
@@ -541,6 +545,11 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     return None
 
   def validatorLessThenDefaultValue(self, properties, recommendedDefaults, propertyName):
+    if propertyName not in recommendedDefaults:
+      # If a property name exists in say hbase-env and hbase-site (which is allowed), then
it will exist in the
+      # "properties" dictionary, but not necessarily in the "recommendedDefaults" dictionary".
In this case, ignore it.
+      return None
+
     if not propertyName in properties:
       return self.getErrorItem("Value should be set")
     value = to_number(properties[propertyName])

http://git-wip-us.apache.org/repos/asf/ambari/blob/48edffff/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 005d275..272475d 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
@@ -735,7 +735,6 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
     return self.toConfigurationValidationProblems(validationItems, "hive-site")
 
   def validateHBASEConfigurations(self, properties, recommendedDefaults, configurations,
services, hosts):
-    super(HDP22StackAdvisor, self).validateHbaseEnvConfigurations(properties, recommendedDefaults,
configurations, services, hosts)
     hbase_site = properties
     validationItems = []
 


Mime
View raw message