hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r726278 - in /hadoop/hbase/trunk: CHANGES.txt bin/hbase-daemon.sh src/java/org/apache/hadoop/hbase/master/HMaster.java src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Sat, 13 Dec 2008 22:02:04 GMT
Author: stack
Date: Sat Dec 13 14:02:04 2008
New Revision: 726278

URL: http://svn.apache.org/viewvc?rev=726278&view=rev
Log:
HBASE-1055 Better vm stats on startup

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/bin/hbase-daemon.sh
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=726278&r1=726277&r2=726278&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sat Dec 13 14:02:04 2008
@@ -172,6 +172,7 @@
                (Doğacan Güney via Stack)
    HBASE-1048  HLog: Found 0 logs to remove out of total 1450; oldest
                outstanding seqnum is 162297053 fr om region -ROOT-,,0
+   HBASE-1055  Better vm stats on startup
 
   NEW FEATURES
    HBASE-875   Use MurmurHash instead of JenkinsHash [in bloomfilters]

Modified: hadoop/hbase/trunk/bin/hbase-daemon.sh
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/hbase-daemon.sh?rev=726278&r1=726277&r2=726278&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/hbase-daemon.sh (original)
+++ hadoop/hbase/trunk/bin/hbase-daemon.sh Sat Dec 13 14:02:04 2008
@@ -126,7 +126,6 @@
     echo starting $command, logging to $logout
     # Add to the command log file vital stats on our environment.
     echo "`date` Starting $command on `hostname`" >> $loglog
-    $JAVA -version >> $loglog 2>&1
     echo "ulimit -n `ulimit -n`" >> $loglog 2>&1
     nohup nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
         --config "${HBASE_CONF_DIR}" \

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=726278&r1=726277&r2=726278&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java Sat Dec 13 14:02:04
2008
@@ -20,6 +20,8 @@
 package org.apache.hadoop.hbase.master;
 
 import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Constructor;
 import java.util.ArrayList;
 import java.util.List;
@@ -898,6 +900,12 @@
 
       if (cmd.equals("start")) {
         try {
+          RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+          if (runtime != null) {
+            LOG.info("vmName=" + runtime.getVmName() + ", vmVendor=" +
+              runtime.getVmVendor() + ", vmVersion=" + runtime.getVmVersion());
+            LOG.info("vmInputArguments=" + runtime.getInputArguments());
+          }
           // If 'local', defer to LocalHBaseCluster instance.
           if (LocalHBaseCluster.isLocal(conf)) {
             (new LocalHBaseCluster(conf)).startup();

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=726278&r1=726277&r2=726278&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Sat
Dec 13 14:02:04 2008
@@ -23,6 +23,7 @@
 import java.lang.Thread.UncaughtExceptionHandler;
 import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryUsage;
+import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.net.InetSocketAddress;
@@ -2094,6 +2095,10 @@
             LOG.warn("Not starting a distinct region server because " +
               "hbase.master is set to 'local' mode");
           } else {
+            RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+            if (runtime != null) {
+              LOG.info("vmInputArguments=" + runtime.getInputArguments());
+            }
             Constructor<? extends HRegionServer> c =
               regionServerClass.getConstructor(HBaseConfiguration.class);
             HRegionServer hrs = c.newInstance(conf);
@@ -2130,4 +2135,4 @@
         .getClass(HConstants.REGION_SERVER_IMPL, HRegionServer.class);
     doMain(args, regionServerClass);
   }
-}
\ No newline at end of file
+}



Mime
View raw message