问题描述
HBase启动时,警告: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
代码语言:javascript复制[root@node1 ~]# start-hbase.sh
starting master, logging to /opt/hbase-1.2.5/logs/hbase-root-master-node1.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
node3: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node3.out
node2: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node2.out
node1: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node1.out
node3: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
node3: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
node2: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
解决办法
由于使用了JDK8 ,需要在HBase的配置文件中hbase-env.sh,注释掉两行。
代码语言:javascript复制[root@node1 ~]# vi /opt/hbase-1.2.5/conf/hbase-env.sh
# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8
#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
重启
代码语言:javascript复制[root@node1 ~]# stop-hbase.sh
stopping hbase..........................
[root@node1 ~]# start-hbase.sh
starting master, logging to /opt/hbase-1.2.5/logs/hbase-root-master-node1.out
node3: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node3.out
node2: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node2.out
node1: starting regionserver, logging to /opt/hbase-1.2.5/logs/hbase-root-regionserver-node1.out