ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-14113 Check memory consumption of hbase shell jvm launched to verify data model (dsen)
Date Mon, 30 Nov 2015 19:29:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 50701f7a1 -> ad79d5a59


AMBARI-14113 Check memory consumption of hbase shell jvm launched to verify data model (dsen)


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

Branch: refs/heads/branch-2.1
Commit: ad79d5a594d4cef22af1aa4416cf302414c5f81c
Parents: 50701f7
Author: Dmytro Sen <dsen@apache.org>
Authored: Mon Nov 30 21:12:37 2015 +0200
Committer: Dmytro Sen <dsen@apache.org>
Committed: Mon Nov 30 21:29:48 2015 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/server/upgrade/UpgradeCatalog213.java    | 6 ++++++
 .../AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml       | 4 ++--
 .../apache/ambari/server/upgrade/UpgradeCatalog213Test.java    | 6 ++++--
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad79d5a5/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
index 35a883d..f6d5cca 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java
@@ -1184,6 +1184,12 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog {
     regSearch = "\\{\\{regionserver_heapsize\\}\\}";
     replacement = "{{regionserver_heapsize}}m";
     content = content.replaceAll(regSearch, replacement);
+    regSearch = "export HBASE_HEAPSIZE=";
+    replacement = "#export HBASE_HEAPSIZE=";
+    content = content.replaceAll(regSearch, replacement);
+    content += "\n" +
+      "# The maximum amount of heap to use for hbase shell.\n" +
+      "export HBASE_SHELL_OPTS=\"-Xmx256m\"\n";
     return content;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad79d5a5/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
index 367dc00..f7fac44 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
@@ -159,8 +159,8 @@ else
   export HBASE_CLASSPATH=${HBASE_CLASSPATH}
 fi
 
-# The maximum amount of heap to use, in MB. Default is 1000.
-export HBASE_HEAPSIZE={{hbase_heapsize}}m
+# The maximum amount of heap to use for hbase shell.
+export HBASE_SHELL_OPTS="-Xmx256m"
 
 # Extra Java runtime options.
 # Below are what we set by default. May only work with SUN JVM.

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad79d5a5/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
index ac8913e..994fb40 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog213Test.java
@@ -721,7 +721,7 @@ public class UpgradeCatalog213Test {
     String expectedContent = "export HBASE_CLASSPATH=${HBASE_CLASSPATH}\n" +
         "\n" +
         "# The maximum amount of heap to use, in MB. Default is 1000.\n" +
-        "export HBASE_HEAPSIZE={{hbase_heapsize}}m\n" +
+        "#export HBASE_HEAPSIZE={{hbase_heapsize}}m\n" +
         "\n" +
         "{% if java_version &lt; 8 %}\n" +
         "export HBASE_MASTER_OPTS=\" -XX:PermSize=64m -XX:MaxPermSize={{hbase_master_maxperm_size}}m
-Xms{{hbase_heapsize}}m -Xmx{{hbase_heapsize}}m -Xmn{{hbase_master_xmn_size}}m -XX:CMSInitiatingOccupancyFraction=70
-XX:+UseCMSInitiatingOccupancyOnly\"\n" +
@@ -729,7 +729,9 @@ public class UpgradeCatalog213Test {
         "{% else %}\n" +
         "export HBASE_MASTER_OPTS=\" -Xms{{hbase_heapsize}}m -Xmx{{hbase_heapsize}}m -Xmn{{hbase_master_xmn_size}}m
-XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly\"\n" +
         "export HBASE_REGIONSERVER_OPTS=\" -Xmn{{regionserver_xmn_size}}m -XX:CMSInitiatingOccupancyFraction=70
-XX:+UseCMSInitiatingOccupancyOnly -Xms{{regionserver_heapsize}}m -Xmx{{regionserver_heapsize}}m\"\n"
+
-        "{% endif %}\n";
+      "{% endif %}\n\n" +
+      "# The maximum amount of heap to use for hbase shell.\n" +
+      "export HBASE_SHELL_OPTS=\"-Xmx256m\"\n";
     String result = (String) updateAmsHbaseEnvContent.invoke(upgradeCatalog213, oldContent);
     Assert.assertEquals(expectedContent, result);
   }


Mime
View raw message