HBASE-1055 Better vm stats on startup
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@726278 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f80f67db1
commit
2455174c07
|
@ -172,6 +172,7 @@ Release 0.19.0 - Unreleased
|
|||
(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]
|
||||
|
|
|
@ -126,7 +126,6 @@ case $startStop in
|
|||
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}" \
|
||||
|
|
|
@ -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 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
|
|||
|
||||
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();
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.io.IOException;
|
|||
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 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
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 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
.getClass(HConstants.REGION_SERVER_IMPL, HRegionServer.class);
|
||||
doMain(args, regionServerClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue