hbase.tmp.dirrootdir可以配多个文件系统吗

HII I use the Hadoop HA,hadoop ha work very well ,but
my hbase configuration&property&&name&hbase.rootdir&/name&&value&hdfs://cluster/hbase&/value&&/property&hbase can not access HDFS ,
How should I the configuration hbase.rootdir is correct ? thanks very much?My core-site.xml configuration&property&&name&fs.defaultFS&/name&&value&hdfs://cluster&/value&&/property&&property&&name&pression.codecs&/name&&value&org.apache.press.SnappyCodec&/value&&/property&My
hdfs-site.xml
configuration&property&&name&dfs.federation.nameservices&/name&&value&cluster&/value&&/property&&property&&name&dfs.replication&/name&&value&3&/value&&/property&&property&&name&dfs.datanode.max.xcievers&/name&&value&8192&/value&&/property&&property&&name&dfs.namenode.name.dir&/name&&value&/ytxt/hadoopData&/value&&/property&&property&&name&dfs.ha.namenodes.cluster&/name&&value&nn0,nn1&/value&&/property&&property&&name&dfs.namenode.rpc-address.cluster.nn0&/name&&value&sy-hadoop-:9000&/value&&/property&&property&&name&dfs.namenode.rpc-address.cluster.nn1&/name&&value&sy-hadoop-:9000&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn0&/name&&value&sy-hadoop-:50070&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn1&/name&&value&sy-hadoop-:50070&/value&&/property&&property&&name&dfs.namenode.shared.edits.dir&/name&&value&/HAshared&/value&&/property&&property&&name&dfs.client.failover.proxy.provider.cluster&/name&&value&org.apache.Hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider&/value&&/property&&property&&name&dfs.ha.fencing.methods&/name&&value&sshfence&/value&&/property&&property&&name&dfs.ha.fencing.ssh.private-key-files&/name&&value&/home/hadoop/.ssh/id_rsa&/value&&/property&&property&&name&dfs.ha.automatic-failover.enabled&/name&&value&true&/value&&/property&&property&&name&ha.zookeeper.quorum&/name&&value&sy-hadoop-,sy-hadoop-,datanode1:2181,datanode2:2181,datanode3:2181&/value&&/property&&property&&name&dfs.data.dir&/name&&value&/ytxt/hadoopData&/value&&/property&lztaomin
Search Discussions
On Wed, Apr 17, 2013 at 8:25 PM, lztaomin wrote:hdfs://cluster/hbase&/valWhere is the port number bro????*Thanks & Regards
*&Shashwat Shriparv
HInow my hbase configuration
hdfs://cluster:9000/hbaseBut the connection address is not my internal and external address ,How the configuration hbase.rootdir can guarantee HBase connection address Hadoop HA's active namenode.thanks very much.My hdfs-site.xml configuration&property&&name&dfs.federation.nameservices&/name&&value&cluster&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn0&/name&&value&sy-hadoop-:50070&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn1&/name&&value&sy-hadoop-:50070&/value&&/property&lztaomin发件人: lztaomin发送时间:
22:55收件人: user主题: hbase hbase.rootdir configurationHII I use the Hadoop HA,hadoop ha work very well ,but
my hbase configuration&property&&name&hbase.rootdir&/name&&value&hdfs://cluster/hbase&/value&&/property&hbase can not access HDFS ,
How should I the configuration hbase.rootdir is correct ? thanks very much?My core-site.xml configuration&property&&name&fs.defaultFS&/name&&value&hdfs://cluster&/value&&/property&&property&&name&pression.codecs&/name&&value&org.apache.press.SnappyCodec&/value&&/property&My
hdfs-site.xml
configuration&property&&name&dfs.federation.nameservices&/name&&value&cluster&/value&&/property&&property&&name&dfs.replication&/name&&value&3&/value&&/property&&property&&name&dfs.datanode.max.xcievers&/name&&value&8192&/value&&/property&&property&&name&dfs.namenode.name.dir&/name&&value&/ytxt/hadoopData&/value&&/property&&property&&name&dfs.ha.namenodes.cluster&/name&&value&nn0,nn1&/value&&/property&&property&&name&dfs.namenode.rpc-address.cluster.nn0&/name&&value&sy-hadoop-:9000&/value&&/property&&property&&name&dfs.namenode.rpc-address.cluster.nn1&/name&&value&sy-hadoop-:9000&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn0&/name&&value&sy-hadoop-:50070&/value&&/property&&property&&name&dfs.namenode.http-address.cluster.nn1&/name&&value&sy-hadoop-:50070&/value&&/property&&property&&name&dfs.namenode.shared.edits.dir&/name&&value&/HAshared&/value&&/property&&property&&name&dfs.client.failover.proxy.provider.cluster&/name&&value&org.apache.Hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider&/value&&/property&&property&&name&dfs.ha.fencing.methods&/name&&value&sshfence&/value&&/property&&property&&name&dfs.ha.fencing.ssh.private-key-files&/name&&value&/home/hadoop/.ssh/id_rsa&/value&&/property&&property&&name&dfs.ha.automatic-failover.enabled&/name&&value&true&/value&&/property&&property&&name&ha.zookeeper.quorum&/name&&value&sy-hadoop-,sy-hadoop-,datanode1:2181,datanode2:2181,datanode3:2181&/value&&/property&&property&&name&dfs.data.dir&/name&&value&/ytxt/hadoopData&/value&&/property&lztaomin
Related Discussions
viewthread |
categories,
user style
2 users in discussion
site design / logo & 2017 Grokbase4047人阅读
hbase(6)
hbase安装配置---coco
4. hbase配置
&下载:hbase-0.96.2-hadoop2-bin.tar.gz
[root@db96 ~]# wget /hbase/hbase-0.96.2/hbase-0.96.2-hadoop2-bin.tar.gz
[root@db96 ~]# tar -zxvf hbase-0.96.2-hadoop2-bin.tar.gz -C /usr/local/
[root@db96 ~]# cd /usr/local/
[root@db96 local]# ln -s /usr/local/hbase-0.96.2-hadoop2/ &hbase
配置分布式hbase
1. vi hbase-env.sh, 添加java_home路径,和 托管zookeeper: HBASE_MANAGES_ZK
[root@db96 conf]# vim hbase-env.sh&
# The java implementation to use. &Java 1.6 required.
&export JAVA_HOME=/usr/java/default/
# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false&
一个分布式运行的Hbase依赖一个zookeeper集群。所有的节点和客户端都必须能够访问zookeeper。
默认的情况下Hbase会管理一个zookeep集群。这个集群会随着Hbase的启动而启动。当然,
你也可以自己管理一个zookeeper集群,但需要配置Hbase。你需要修改conf/hbase-env.sh
里面的HBASE_MANAGES_ZK 来切换。这个值默认是true的,作用是让Hbase启动的时候同时也启动zookeeper.
让Hbase使用一个现有的不被Hbase托管的Zookeep集群,需要设置&
conf/hbase-env.sh文件中的HBASE_MANAGES_ZK 属性为 false
&2. vi hbase-site.xml, 添加如下信息。
[root@db96 conf]# vim hbase-site.xml
&configuration&
&property&&
&name&hbase.rootdir&/name&&
&value&hdfs://db96:9000/data/hadoop/hbase&/value&&
&/property&&
&property&&
&name&hbase.cluster.distributed&/name&&
&value&true&/value&&
&/property&
&property&
&name&hbase.zookeeper.property.clientPort&/name&
&value&2181&/value&
&/property&&
&property&&
&name&hbase.zookeeper.quorum&/name&&
&value&db96,db98,db99&/value&&
&/property&&
&property&&
&name&hbase.zookeeper.property.dataDir&/name&&
&value&/usr/local/zookeeper/data&/value&&
&/property&&
&property&
&name&zookeeper.session.timeout&/name&
&value&90000&/value&
&/property&
&/configuration&
3. 修改regiionservers
[root@db96 conf]# vi regionservers&
把配置好的hbase安装文件,scp 到其他从库上。
[root@db96 local]# scp -r hbase-0.96.2-hadoop2 db98:/usr/local/
[root@db96 local]# scp -r hbase-0.96.2-hadoop2 db99:/usr/local/
[root@db98 local]# ln -s /usr/local/hbase-0.96.2-hadoop2/ hbase
[root@db99 local]# ln -s /usr/local/hbase-0.96.2-hadoop2/ hbase
启动测试:
[root@db96 logs]# /usr/local/hbase/bin/start-hbase.sh
[root@db96 data]# hbase shell
13:44:29,069 INFO &[main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase S enter 'help&RETURN&' for list of supported commands.
Type &exit&RETURN&& to leave the HBase Shell
Version 0.96.2-hadoop2, r1581096, Mon Mar 24 16:03:18 PDT 2014
hbase(main):001:0& list
TABLE & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hbase-0.96.2-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop2/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.
0 row(s) in 1.6240 seconds
hbase(main):002:0& create 'test','fa'
0 row(s) in 0.4500 seconds
=& Hbase::Table - test
hbase(main):003:0& list
TABLE & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
test & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &&
1 row(s) in 0.0520 seconds
=& [&test&]
hbase(main):004:0& put 'test' ,'row1','fa:id','1'
0 row(s) in 0.1400 seconds
hbase(main):005:0& put 'test' ,'row1','fa:name','hello'
0 row(s) in 0.0320 seconds
hbase(main):006:0& scan 'test'
ROW & & & & & & & & & & & & & & &COLUMN+CELL & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &&
&row1 & & & & & & & & & & & & & &column=fa:id, timestamp=9, value=1 & & & & & & & & & & & & & & & & & & & & & & &
&row1 & & & & & & & & & & & & & &column=fa:name, timestamp=6, value=hello & & & & & & & & & & & & & & & & & & & &
1 row(s) in 0.0310 seconds
hbase(main):007:0& create 'student','info'
0 row(s) in 0.4360 seconds
=& Hbase::Table - student
hbase(main):008:0& list
TABLE & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
student & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
test & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &&
2 row(s) in 0.0400 seconds
=& [&student&, &test&]
hbase(main):009:0& exit
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1020854次
积分:10220
积分:10220
排名:第1293名
原创:150篇
转载:134篇
评论:96条
(5)(4)(5)(4)(2)(4)(2)(1)(3)(1)(2)(2)(7)(13)(3)(1)(2)(3)(14)(8)(23)(3)(1)(5)(19)(7)(3)(1)(2)(2)(6)(14)(13)(1)(4)(9)(10)(3)(7)(7)(20)(24)(21)今天看啥 热点:
手把手教你安装Hbase,一次成功!,把手hbase
安装环境:
Centos 6.5
JDK: jdk1.6.0_18
Hadoop: hadoop-0.20.2
Hbase: hbase-0.90.5
安装准备:
Jdk环境已安装:版本为1.6以上
hadoop环境已安装:完全分布模式安装如下
http://blog.csdn.net/lichangzai/article/details/8206834
hbase版本选择
Hbase 版本必需与 Hadoop版本匹配,否则会安装失败或不能正常使用。关于两者何种版本能正常匹配,可以看官方文档或在网上搜寻安装的成功案例。
hbase软件下载
http://mirror./apache/hbase/hbase-0.90.5/
安装概述:
l&&&&&&&& 配置hosts,确保涉及的主机名均可以解析为ip
l&&&&&&&& 编辑hbase-env.xml
l&&&&&&&& 编辑hbase-site.xml
l&&&&&&&& 编辑regionservers文件
l&&&&&&&& 把Hbase复制到其它节点
l&&&&&&&& 启动Hbase
l&&&&&&&& 验证启动
安装步骤:
1.&&&&&&配置hosts
此步在配置hadoop时已经完成,如下:
[root@gc ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1&&&&&&&&&&&&&& localhost.localdomain localhost
::1&&&&&&&&&&&& localhost6.localdomain6 localhost6
192.168.2.101 &&&&&&&&&&rac1.localdomain rac1
192.168.2.102&&&&&&&&&& rac2.localdomain rac2
192.168.2.100&&&&&&&&&& gc.localdomain gc
2.&&&&&&拷贝并解压安装包
[grid@gc ~]$ pwd
/home/grid
[grid@gc ~]$ tar -xzvf hbase-0.90.5.tar.gz
3.&&&&&&替换hadoop核心jar包
主要目的是防止因为hbase和hadoop版本不同出现兼容问题,造成hmaster启动异常
/home/grid/hbase-0.90.5/lib
$ mv hadoop-core-0.20-append-r1056497.jar hadoop-core-0.20-append-r1056497.jar.bak
$ cp /home/grid/hadoop-0.20.2/hadoop-0.20.2-core.jar /home/grid/hbase-0.90.5/lib/
$ chmod 775 hadoop-0.20.2-core.jar
4.&&&&&&编辑hbase-env.xml
[grid@gc conf]$ pwd
/home/grid/hbase-0.90.5/conf
[grid@gc conf]$ vi hbase-env.sh
# 添加如下内容
# The java implementation to use.& Java 1.6 required.
export JAVA_HOME=/usr/java/jdk1.6.0_18
# Extra Java CLASSPATH elements.& Optional.
export HBASE_CLASSPATH=/home/grid/hadoop-0.20.2/conf
# Where log files are stored.& $HBASE_HOME/logs by default.
export HBASE_LOG_DIR=${HBASE_HOME}/logs
# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=true
5.&&&&&&编辑hbase-site.xml
[grid@gc conf]$ vi hbase-site.xml
#添加如下内容
&property&
&name&hbase.rootdir&/name& #设置hbase数据库存放数据的目录
&value&hdfs://gc:9000/hbase&/value&
&/property&
&property&
&name&hbase.cluster.distributed&/name&& #打开hbase分布模式
&value&true&/value&
&/property&
&property&
&name&hbase.master&/name& #指定hbase集群主控节点
&value&gc:60000&/value&
&/property&
&property&
&name&hbase.zookeeper.quorum&/name&
&value&gc,rac1,rac2&/value& #指定zookeeper集群节点名,因为是由zookeeper表决算法决定的
&/property&
&property&
&name&hbase.zookeeper.property.dataDir&/name& #指zookeeper集群data目录
&value&/home/grid/hbase-0.90.5/zookeeper&/value&
&/property&
6.&&&&&&编辑regionservers文件
[grid@gc conf]$ cat regionservers
#把localhost改为如下
7.&&&&&&将修改的hbase目录同步其它节点
--分别同步到rac1,rac2两节点
[grid@gc ~]$ scp -r hbase-0.90.5 rac1:/home/grid/
[grid@gc ~]$ scp -r hbase-0.90.5 rac2:/home/grid/
8.&&&&&&启动/关闭Hbase数据库集群
--启动hbase之前必需检查hadoop是否已经启动
[grid@gc ~]$ hadoop-0.20.2/bin/hadoop dfsadmin -report
Configured Capacity:
(42.56 GB)
Present Capacity:
DFS Remaining:
DFS Used: 4 KB)
DFS Used%: 0.01%
Under replicated blocks: 4
Blocks with corrupt replicas: 0
Missing blocks: 0
-------------------------------------------------
Datanodes available: 2 (2 total, 0 dead)
Name: 192.168.2.101:50010
Decommission Status : Normal
Configured Capacity:
(21.28 GB)
DFS Used: 2 KB)
Non DFS Used:
(18.75 GB)
DFS Remaining: (2.53 GB)
DFS Used%: 0%
DFS Remaining%: 11.9%
Last contact: Tue Dec 25 09:40:14 CST 2012
Name: 192.168.2.102:50010
Decommission Status : Normal
Configured Capacity:
(21.28 GB)
DFS Used: 2 KB)
Non DFS Used:
DFS Remaining: 3.99 MB)
DFS Used%: 0%
DFS Remaining%: 3.69%
Last contact: Tue Dec 25 09:40:13 CST 2012
--启动Hbase集群
----在gc master节点
[grid@gc ~]$ hbase-0.90.5/bin/start-hbase.sh
rac2: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-rac2.localdomain.out
gc: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-gc.localdomain.out
rac1: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-rac1.localdomain.out
starting master, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-master-gc.localdomain.out
rac1: starting regionserver, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-regionserver-rac1.localdomain.out
rac2: starting regionserver, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-regionserver-rac2.localdomain.out
--可以看到多出两个hbase进程
[grid@gc ~]$ jps
2718 HQuorumPeer
6875 JobTracker
6799 SecondaryNameNode
8129 org.eclipse.equinox.launcher_1.1.1.R36x_v0.jar
6651 NameNode
2772 HMaster
--rac1,rac2 slave节点
[grid@rac1 ~]$ jps
23663 HRegionServer
3736 DataNode
23585 HQuorumPeer
3840 TaskTracker
[grid@rac2 ~]$ jps
10579 TaskTracker
29735 HQuorumPeer
10480 DataNode
29812 HRegionServer
--通过浏览器验证:
http://192.168.2.100:60010/master.jsp
--关闭hbase集群
[grid@gc hbase-0.90.5]$ bin/stop-hbase.sh
stopping hbase...................
gc: stopping zookeeper.
rac2: stopping zookeeper.
rac1: stopping zookeeper.
命令行操作:
常用hbase命令
--进入habase
[grid@gc ~]$ hbase-0.90.5/bin/hbase shell
HBase S enter 'help&RETURN&' for list of supported commands.
Type &exit&RETURN&& to leave the HBase Shell
Version 0.90.5, r1212209, Fri Dec& 9 05:40:36 UTC 2011
hbase(main):001:0&
--查看数据库状态
hbase(main):002:0& status
2 servers, 0 dead, 1.0000 average load
--查询数据库版本
hbase(main):004:0& version
0.90.5, r1212209, Fri Dec& 9 05:40:36 UTC 2011
--帮助命令
hbase(main):003:0& help
HBase Shell, version 0.90.5, r1212209, Fri Dec& 9 05:40:36 UTC 2011
Type 'help &COMMAND&', (e.g. 'help &get&' -- the quotes are necessary) for help on a specific command.
Commands are grouped. Type 'help &COMMAND_GROUP&', (e.g. 'help &general&') for help on a command group.
COMMAND GROUPS:
& Group name: general
& Commands: status, version
& Group name: ddl
& Commands: alter, create, describe, disable, drop, enable, exists, is_disabled, is_enabled, list
& Group name: dml
& Commands: count, delete, deleteall, get, get_counter, incr, put, scan, truncate
& Group name: tools
& Commands: assign, balance_switch, balancer, close_region, compact, flush, major_compact, move, split, unassign, zk_dump
& Group name: replication
& Commands: add_peer, disable_peer, enable_peer, remove_peer, start_replication, stop_replication
SHELL USAGE:
Quote all names in HBase Shell such as table and column names.& Commas delimit
command parameters.& Type &RETURN& after entering a command to run it.
Dictionaries of configuration used in the creation and alteration of tables are
Ruby Hashes. They look like this:
& {'key1' =& 'value1', 'key2' =& 'value2', ...}
and are opened and closed with curley-braces.& Key/values are delimited by the
'=&' character combination.& Usually keys are predefined constants such as
NAME, VERSIONS, COMPRESSION, etc.& Constants do not need to be quoted.& Type
'Object.constants' to see a (messy) list of all constants in the environment.
If you are using binary keys or values and need to enter them in the shell, use
double-quote'd hexadecimal representation. For example:
& hbase& get 't1', &key\x03\x3f\xcd&
& hbase& get 't1', &key\003\023\011&
& hbase& put 't1', &test\xef\xff&, 'f1:', &\x01\x33\x40&
The HBase shell is the (J)Ruby IRB with the above HBase-specific commands added.
For more on the HBase Shell, see http://hbase.apache.org/docs/current/book.html
Hbase数据库操作命令
resume表逻辑模型:
lichangzai
binfo:age=’’
binfo:sex=’man’
edu:mschool=’rq no.1’
edu:university=’qhddx’
work:company1=’12580’
binfo:age=’’
edu:university=’bjdx’
work:company1=’LG’
hbase(main):005:0& create 'resume','binfo','edu','work'
0 row(s) in 16.5710 seconds
hbase(main):006:0& list
TABLE&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
resume&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 1.6080 seconds
--查看表结构
hbase(main):007:0& describe 'resume'
DESCRIPTION&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ENABLED&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&{NAME =& 'resume', FAMILIES =& [{NAME =& 'binfo', BLOOMFILTER =& 'NONE', REPLICATION_SCOPE =& '0', C true&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&OMPRESSION =& 'NONE', VERSIONS =& '3', TTL =& '', BLOCKSIZE =& '65536', IN_MEMORY =& 'fals&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&e', BLOCKCACHE =& 'true'}, {NAME =& 'edu', BLOOMFILTER =& 'NONE', REPLICATION_SCOPE =& '0', COMPRESS&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&ION =& 'NONE', VERSIONS =& '3', TTL =& '', BLOCKSIZE =& '65536', IN_MEMORY =& 'false', BLO&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&CKCACHE =& 'true'}, {NAME =& 'work', BLOOMFILTER =& 'NONE', REPLICATION_SCOPE =& '0', COMPRESSION =&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
& 'NONE', VERSIONS =& '3', TTL =& '', BLOCKSIZE =& '65536', IN_MEMORY =& 'false', BLOCKCACH&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&E =& 'true'}]}&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 1.8590 seconds
--添加列族
hbase(main):014:0& disable 'resume'&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 4.2630 seconds
hbase(main):015:0& alter 'resume',name='f1'
0 row(s) in 4.6990 seconds
--删除列族
hbase(main):017:0& alter 'resume',{NAME=&'f1',METHOD=&'delete'}
0 row(s) in 1.1390 seconds
hbase(main):021:0& alter 'resume','delete' =& 'f1'
0 row(s) in 1.9310 seconds
hbase(main):022:0& enable 'resume'
0 row(s) in 5.9060 seconds
(1)&&&&&&
ddl命令是区分大小写的,像ddl中的alter,create, drop, enable等都必需用小写。而{}中的属性名都必需用大写。
(2)&&&&&&
alter、drop表之前必需在先禁用(disabel)表,修改完后再启用表(enable)表,否则会报错
--查询禁用状态
hbase(main):024:0& is_disabled 'resume'
false&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 0.4930 seconds
hbase(main):021:0& is_enabled 'resume'
true&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 0.2450 seconds
hbase(main):015:0& create 't1','f1'
0 row(s) in 15.3730 seconds
hbase(main):016:0& disable 't1'
0 row(s) in 6.4840 seconds
hbase(main):017:0& drop 't1'
0 row(s) in 7.3730 seconds
--查询表是否存在
hbase(main):018:0& exists 'resume'
Table resume does exist&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 2.3900 seconds
hbase(main):019:0& exists 't1'
Table t1 does not exist&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 1.3270 seconds
--插入数据
put 'resume','lichangzai','binfo:age',''
put 'resume','lichangzai','binfo:sex','man'
put 'resume','lichangzai','edu:mschool','rq no.1'
put 'resume','lichangzai','edu:university','qhddx'
put 'resume','lichangzai','work:company1','12580'
put 'resume','lichangzai','work:company2','china mobile'
put 'resume','lichangzai','binfo:site','blog.csdn.net/lichangzai'
put 'resume','lichangzai','binfo:mobile',''
put 'resume','changfei','binfo:age',''
put 'resume','changfei','edu:university','bjdx'
put 'resume','changfei','work:company1','LG'
put 'resume','changfei','binfo:mobile',''
put 'resume','changfei','binfo:site','hi.baidu/lichangzai'
--获取一行键的所有数据
hbase(main):014:0& get 'resume','lichangzai'
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:age&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=2, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:mobile&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&
&binfo:sex&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=man&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:site&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=6, value=blog.csdn.net/lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&edu:mschool&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=1, value=rq no.1&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&edu:university&&&& &&&&&&&&&&&&&&&&&&&&&timestamp=1, value=qhddx&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&work:company1&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=12580&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&work:company2&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=5, value=china mobile&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
8 row(s) in 2.1090 seconds
注意:必须通过行键Row Key来查询数据
--获取一个行键,一个列族的所有数据
hbase(main):015:0& get 'resume','lichangzai','binfo'
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:age&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&timestamp=2, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:mobile&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:sex&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=man&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:site&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=6, value=blog.csdn.net/lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
4 row(s) in 1.6010 seconds
--获取一个行键,一个列族中一个列的所有数据
hbase(main):017:0& get 'resume','lichangzai','binfo:sex'&
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:sex&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=man&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 0.8980 seconds
--更新一条记录
hbase(main):018:0& put 'resume','lichangzai','binfo:mobile',''
0 row(s) in 1.7640 seconds
hbase(main):019:0& get 'resume','lichangzai','binfo:mobile'
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:mobile&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=1, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 1.5710 seconds
注意:更新实质就是插入一条带有时间戳的记录,get查询时只显示最新时间的记录
--通过timestamp来获取数据
------查询最新的时间戳的数据
hbase(main):020:0& get 'resume','lichangzai',{COLUMN=&'binfo:mobile',TIMESTAMP=&1}
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&binfo:mobile&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=1, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 0.4060 seconds
------查之前(即删除)时间戳的数据
hbase(main):021:0& get 'resume','lichangzai',{COLUMN=&'binfo:mobile',TIMESTAMP=&3}&&&&&&&&&&&&
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&
&binfo:mobile&&&&&&&&&&&&&&&&&&&&&&&&&&& timestamp=3, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
1 row(s) in 0.7780 seconds
--全表扫描
hbase(main):022:0& scan 'resume'
ROW& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&COLUMN+CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&changfei&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:age, timestamp=6, value=&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&changfei&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:mobile, timestamp=7, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&changfei&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:site, timestamp=6, value=hi.baidu/lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&changfei&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=edu:university, timestamp=7, value=bjdx&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&
&changfei&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=work:company1, timestamp=9, value=LG&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:age, timestamp=2, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:mobile, timestamp=1, value=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&& &&&&&&&&&&&&&&&&&&&&column=binfo:sex, timestamp=3, value=man&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=binfo:site, timestamp=6, value=blog.csdn.net/lichangzai&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=edu:mschool, timestamp=1, value=rq no.1&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=edu:university, timestamp=1, value=qhddx&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=work:company1, timestamp=3, value=12580&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&lichangzai&&&&&&&&&&&&&&&&&&&&&&&&&&&&& column=work:company2, timestamp=5, value=china mobile&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
2 row(s) in 3.6300 seconds
--删除指定行键的列族字段
hbase(main):023:0& put 'resume','changfei','binfo:sex','man'
0 row(s) in 1.2630 seconds
hbase(main):024:0& delete 'resume','changfei','binfo:sex'
0 row(s) in 0.5890 seconds
hbase(main):026:0& get 'resume','changfei','binfo:sex'
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 0.5560 seconds
--删除整行
hbase(main):028:0& create 't1','f1','f2'
0 row(s) in 8.3950 seconds
hbase(main):029:0& put 't1','a','f1:col1','xxxxx'
0 row(s) in 2.6790 seconds
hbase(main):030:0& put 't1','a','f1:col2','xyxyx'
0 row(s) in 0.5130 seconds
hbase(main):031:0& put 't1','b','f2:cl1','ppppp'
0 row(s) in 1.2620 seconds
hbase(main):032:0& deleteall 't1','a'
0 row(s) in 1.2030 seconds
hbase(main):033:0& get 't1','a'
COLUMN&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CELL&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
0 row(s) in 0.8980 seconds
--查询表中有多少行
hbase(main):035:0& count 'resume'
2 row(s) in 2.8150 seconds
hbase(main):036:0& count 't1'&&&
1 row(s) in 0.9500 seconds
hbase(main):037:0& truncate 't1'
Truncating 't1' table (it may take a while):
&- Disabling table...
&- Dropping table...
&- Creating table...
0 row(s) in 21.0060 seconds
注意:Truncate表的处理过程:由于Hadoop的HDFS文件系统不允许直接修改,所以只能先删除表在重新创建已达到清空表的目的
遇到的问题
在刚配置完成hbase安装后,各节点进程还正常,可是过一小段时间后,master节点的HMaster进程就自已停止了。
之后再重新启动master节点后,就出现了下面的问题
--master节点缺少HMaster进程
[grid@gc bin]$ ./start-hbase.sh
rac1: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-rac1.localdomain.out
rac2: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-rac2.localdomain.out
gc: starting zookeeper, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-zookeeper-gc.localdomain.out
starting master, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-master-gc.localdomain.out
rac2: starting regionserver, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-regionserver-rac2.localdomain.out
rac1: starting regionserver, logging to /home/grid/hbase-0.90.5/bin/../logs/hbase-grid-regionserver-rac1.localdomain.out
[grid@gc bin]$ jps
3871 NameNode
4075 JobTracker
4011 SecondaryNameNode
8673 HQuorumPeer
--两slave节点rac1,rac2进程正常
[grid@rac1 bin]$ jps
10353 HQuorumPeer
6457 DataNode
6579 TaskTracker
10448 HRegionServer
[grid@rac2 ~]$ jps
10311 HQuorumPeer
6426 DataNode
6546 TaskTracker
10391 HRegionServer
下面是部分日志
--master节点gc的日志
[grid@gc logs]$tail -100f hbase-grid-master-gc.localdomain.log
15:23:45,842 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server gc/192.168.2.100:2181
15:23:45,853 INFO org.apache.zookeeper.ClientCnxn: Socket connection established to gc/192.168.2.100:2181, initiating session
15:23:45,861 INFO org.apache.zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
15:23:46,930 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server rac1/192.168.2.101:2181
15:23:47,167 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
& && &&&at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
& && &&&at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
& && &&&at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
15:23:48,251 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server rac2/192.168.2.102:2181
15:23:48,362 INFO org.apache.zookeeper.ZooKeeper: Session: 0x0 closed
15:23:48,362 INFO org.apache.zookeeper.ClientCnxn: EventThread shut down
15:23:48,367 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster
& && &&&at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1065)
& && &&&at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:142)
& && &&&at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:102)
& && &&&at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
& && &&&at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
& && &&&at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1079)
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase
& && &&&at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
& && &&&at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
& && &&&at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:809)
& && &&&at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:837)
& && &&&at org.apache.hadoop.hbase.zookeeper.ZKUtil.createAndFailSilent(ZKUtil.java:931)
& && &&&at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.&init&(ZooKeeperWatcher.java:134)
& && &&&at org.apache.hadoop.hbase.master.HMaster.&init&(HMaster.java:219)
& && &&&at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
& && &&&at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
& && &&&at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
& && &&&at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
& && &&&at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1060)
[grid@gc logs]$tail -100f hbase-grid-zookeeper-gc.localdomain.log
15:23:57,380 WARN org.apache.zookeeper.server.quorum.QuorumCnxManager: Cannot open channel to 2 at election address rac2/192.168.2.102:3888
java.net.ConnectException: Connection refused
sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
&&&&&&at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
&&&&&&at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:100)
& && &&&at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:366)
& && &&&at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:335)
& && &&&at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:360)
& && &&&at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:333)
& && &&&at java.lang.Thread.run(Thread.java:619)
15:23:57,670 INFO org.apache.zookeeper.server.ZooKeeperServer: Server environment:user.home=/home/grid
15:23:57,671 INFO org.apache.zookeeper.server.ZooKeeperServer: Server environment:user.dir=/home/grid/hbase-0.90.5
15:23:57,679 INFO org.apache.zookeeper.server.ZooKeeperServer: Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 180000 datadir /home/grid/hbase-0.90.5/zookeeper/version-2 snapdir /home/grid/hbase-0.90.5/zookeeper/version-2
15:23:58,118 WARN org.apache.zookeeper.server.quorum.Learner: Unexpected exception, tries=0, connecting to rac1/192.168.2.101:2888
java.net.ConnectException: Connection refused
java.net.PlainSocketImpl.socketConnect(Native Method)
&&&&&&at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
&&&&&&at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
&&&&&&at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
&&&&&&at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
&&&&&&at java.net.Socket.connect(Socket.java:525)
&&&&&&at org.apache.zookeeper.server.quorum.Learner.connectToLeader(Learner.java:212)
&&&&&&at org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:65)
&&&&&&at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:644)& && &&&at
15:24:00,886 INFO org.apache.zookeeper.server.quorum.Learner: Getting a snapshot from leader
15:24:00,897 INFO org.apache.zookeeper.server.quorum.Learner: Setting leader epoch 9
15:24:01,051 INFO org.apache.zookeeper.server.persistence.FileTxnSnapLog: Snapshotting:
15:24:03,218 INFO org.apache.zookeeper.server.NIOServerCnxn: Accepted socket connection from /192.168.2.101:12397
15:24:03,377 INFO org.apache.zookeeper.server.NIOServerCnxn: Client attempting to establish new session at /192.168.2.101:12397
15:24:03,396 WARN org.apache.zookeeper.server.quorum.Learner: Got zxid 0x expected 0x1
15:24:03,400 INFO org.apache.zookeeper.server.persistence.FileTxnLog: Creating new log file: log.
15:24:03,470 INFO org.apache.zookeeper.server.NIOServerCnxn: Established session 0x3bd0f with negotiated timeout 180000 for client /192.168.2.101:12397
15:24:07,057 INFO org.apache.zookeeper.server.NIOServerCnxn: Accepted socket connection from /192.168.2.102:52300
15:24:07,690 INFO org.apache.zookeeper.server.NIOServerCnxn: Client attempting to establish new session at /192.168.2.102:52300
15:24:07,712 INFO org.apache.zookeeper.server.NIOServerCnxn: Established session 0x3bd0f with negotiated timeout 180000 for client /192.168.2.102:52300
15:24:10,016 INFO org.apache.zookeeper.server.quorum.FastLeaderElection: Notification: 2 (n.leader),
(n.zxid), 1 (n.round), LOOKING (n.state), 2 (n.sid), FOLLOWING (my state)
15:24:30,422 INFO org.apache.zookeeper.server.quorum.FastLeaderElection: Notification: 2 (n.leader),
(n.zxid), 2 (n.round), LOOKING (n.state), 2 (n.sid), FOLLOWING (my state)
15:24:30,423 INFO org.apache.zookeeper.server.quorum.FastLeaderElection: Notification: 2 (n.leader),
(n.zxid), 2 (n.round), LOOKING (n.state), 2 (n.sid), FOLLOWING (my state)
--slave节点rac2的日志
[grid@rac2 logs]$tail -100f hbase-grid-regionserver-rac2.localdomain.log
15:23:46,939 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server rac1/192.168.2.101:2181
15:23:47,154 INFO org.apache.zookeeper.ClientCnxn: Socket connection established to rac1/192.168.2.101:2181, initiating session
15:23:47,453 INFO org.apache.zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
15:23:47,977 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server gc/192.168.2.100:2181
15:23:48,354 INFO org.apache.zookeeper.ClientCnxn: Socket connection established to gc/192.168.2.100:2181, initiating session
15:23:49,583 INFO org.apache.zookeeper.ClientCnxn: Session establishment complete on server gc/192.168.2.100:2181, sessionid = 0x3bd0f, negotiated timeout = 180000
15:23:52,052 INFO org.apache.hadoop.hbase.regionserver.ShutdownHook: Installed shutdown hook thread: Shutdownhook:regionserver60020
禁用IPV6,将/etc/hosts文件里面的::1 localhost那一行删掉重启
[grid@rac1 ~]$ cat /etc/hosts
127.0.0.1&&&&&& localhost.localdomain localhost
# ::1&&&&&&&&&&localhost6.localdomain6 localhosti6
192.168.2.101& &rac1.localdomain& && &&&rac1
192.168.2.102& &rac2.localdomain& && &&&rac2
192.168.2.100& &gc.localdomain&&gc
玩通关了的当然不必说,没开始玩的很感兴趣的玩家们是不是很想知道疯狂猜图的攻略呢?下面就跟着大璃一起来看看疯狂猜图怎么玩,攻略具体步骤又是什么吧~ 疯狂猜图攻略 1.首先在你的手机里通过浏览器或者其他的平台搜出疯狂猜图这个游戏来。 2.然后点击下载,最好在WIFI情况下下载,减少流量。然后手机安装这个游戏即可,完全免费。 3.打开手机,找到刚才下载的游戏,点击图标进入游戏。点击这个红色的箭头,就可以进入游戏。 4.进入到游戏,可以观看到游戏的总图是一个传统过关性的结构,这里能看到总关数。 5.点击左下角的红色小旗子,开始游戏。 6.游戏会以图片形式出现在屏幕里,可以观看图片,从下面的文字输入对应图片的文字,比如人名,电影名等等。 7.如果不懂这个图片,可以选择提示,但是需要金钱购买。 8.该游戏的右边,还开通了分享按钮。让你在你的朋友面前炫耀一翻。 9.同时你还可以看到你关数地图的轨迹。 详细步骤列出来了,大家感觉如何?是不是觉得疯狂猜图也没有想象中的那么难呢?那就加油吧,祝大家一次通关哦~
  每个人一生中都拥有一副好牌,可惜的是许多人都把它浪费了,手上握有一副富人的牌,却把自己打成了一个穷人。  许多人心灵上都沾满了消极的灰尘,失望的污泥和贫穷落后的思想,甚至还怨恨的种子,这样你就永远不会快乐和富有的。穷人:致富和做生意到底有没有什么秘诀?  富人:每件事情都 有它不同的内在规律,所谓的秘诀实际上就只是那么一点点东西。  九十九度加一度,水就开了。开水与温水的区别是这么一度。有些事情之所以会有天壤之别,往往就是因为这微不足道的一度。我在报上看到这么一件事。  两个下岗女工,各在路边开了一个早点铺,都卖包子和油茶。一个生意逐渐兴旺,一个30天后收了摊,据说原因是一个鸡蛋的问题。  生意逐渐兴旺的那家,每当顾客到来时,总是问在油茶里打一个鸡蛋还是两个鸡蛋;垮掉的那一家问的是要不要。两种不同的问法总能使第一家卖出较多的鸡蛋。鸡蛋卖出得多,盈利就大,就付得起各项费用,生意也就做了下去。鸡蛋卖得少的,盈利少,去掉费用不赚钱,摊子只好收起。成功与失败之间仅一个鸡蛋的区别。  名满天下的可口可乐中,百分之九十九的是水、糖、碳酸和咖啡因,世界上一切饮料的构成也大概如此。然而在可口可乐中有1%的东西是其他绝对有的,据说就是这个神秘的1%,使它每年有4亿多美的纯利润,而其他品牌的饮料,每年有8000万美的收入就算满意了。  在这世界上成与败之间的距离就这么一点点,所谓秘诀也就这一点点,但就这一点点东西是最宝贵的,许多人要用多次的失败才换回它,然后走向成功。穷人:如果知道了某种生意的秘诀,然后从事这个项目就容易成功吗?  富人:各种生意都有自己的小秘密,谁也不会把这小秘密告诉别人,因为有的是不能摆到桌面上的,另外也怕被别人学走了,他们都把它列入了祖传秘方。那个诊所的朋友,他告诉我,一个诊所要赚钱,原则上:一要便宜,二要有效。但你如果死照这原则做,是不了钱的。既然便宜你收费就不能贵,有效的话,病一次就看好了,这样赚的钱除了打点主管部门、房租、员工工资,以及七七八八的社会各种收费所剩无几了……不如剩早关门。你要从事什么行业,你就要先去跟从事这行业的人做朋友或先到他那里做雇员最好同,用心就能学到这个祖传秘方。这比自己损失了不少时间在实践中慢慢摸索要合算得多。  小老板做事,中老板做市,大老板做势!  我们许多人用体力赚钱,不少人用技术赚钱,很少人用知识赚钱,极少人是用智慧赚钱的。在财富时代,智慧的人太少太少,有智慧又能抓住商机的人更是凤毛麟角。只要我们开动脑筋,发挥智慧,就可以把握机会,成为财富的主人。
暂无相关文章
相关搜索:
相关阅读:
相关频道:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
云计算最近更新

我要回帖

更多关于 hbase.local.dir 的文章

 

随机推荐