Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties Setting default log level to "WARN". To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel). 19/01/22 22:56:54 WARN Utils: Your hostname, localhost resolves to a loopback address: 127.0.0.1; using 192.168.1.6 instead (on interface en0) 19/01/22 22:56:54 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address 19/01/22 22:56:54 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Spark context Web UI available at http://192.168.1.6:4040 Spark context available as 'sc' (master = local[2], app id = local-1548169015800). Spark session available as 'spark'. Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 2.2.3 /_/
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_181) Type in expressions to have them evaluated. Type :help for more information.
JMX enabled by default Using config: /usr/local/zookeeper/zookeeper-3.4.5-cdh5.7.0/sbin/../conf/zoo.cfg Starting zookeeper ... STARTED
1 2 3
jps
50469 QuorumPeerMain
zookeeper实例已经启动
启动HBase
1 2
cd $HBASE_HOME bin/start-hbase.sh
1 2 3 4
starting master, logging to /usr/local/hbase/hbase-1.2.0-cdh5.7.0//logs/hbase-simon-master-localhost.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 starting regionserver, logging to /usr/local/hbase/hbase-1.2.0-cdh5.7.0//logs/hbase-simon-1-regionserver-localhost.out
我们可以看到starting master和starting regionserver
1 2 3 4
jps
50607 HMaster 50703 HRegionServer
说明HBase已经成功的启动了。
1 2 3 4 5 6
cd $HADOOP_HOME
bin/hadoop fs -ls / 19/01/22 13:42:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Found 4 items drwxr-xr-x - simon supergroup 0 2019-01-22 13:34 /hbase
2019-01-22 13:41:26,984 INFO [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available 2019-01-22 13:41:28,153 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/hbase/hbase-1.2.0-cdh5.7.0/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/hadoop/hadoop-2.6.0-cdh5.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 1.2.0-cdh5.7.0, rUnknown, Wed Mar 23 11:46:29 PDT 2016
hbase(main):001:0>
查看版本号
1 2
hbase(main):001:0> version 1.2.0-cdh5.7.0, rUnknown, Wed Mar 23 11:46:29 PDT 2016
查看状态
1 2
hbase(main):002:0> status 1 active master, 0 backup masters, 1 servers, 0 dead, 2.0000 average load
创建表member,包含info和address两个列蔟
1 2 3 4
hbase(main):003:0> create 'member', 'info', 'address' 0 row(s) in 2.3700 seconds
=> Hbase::Table - member
查看数据库表列表
1 2 3 4 5 6
hbase(main):004:0> list TABLE member 1 row(s) in 0.0380 seconds