您好,欢迎来到酷升汽车网。
搜索
您的当前位置:首页HBase伪集群配置

HBase伪集群配置

来源:酷升汽车网


与Hadoop一样,HBase也有三种运行模式:Standalone,?Distributed,?Pseudo-distributed。其中,Pseudo-distributed称为伪集群模式,与Distributed基本一样,只不过进程都运行在一台机器上。1、对HDFS配置伪集群模式。见:Hadoop伪集群测试?与?Hadoop集群配置

与Hadoop一样,HBase也有三种运行模式:Standalone,?Distributed,?Pseudo-distributed。 其中,Pseudo-distributed称为伪集群模式,与Distributed基本一样,只不过进程都运行在一台机器上。 1、对HDFS配置伪集群模式。 见:Hadoop伪集群测试?与?Hadoop集群配置详细版 2、配置HBase hbase-site.xml


 hbase.rootdir
 hdfs://localhost:9000/hbase
 hbase.cluster.distributed
 true
 hbase.zookeeper.quorum
 localhost
 hbase.zookeeper.property.dataDir
 /home/liheyuan/soft/hbase-0.94.9/zk_data
3、启动 执行一键脚本,将启动hbase进程,以及内置的zookeeper服务器。
./bin/start-hbase.sh
jps应该至少有以下进程启动。
14962 HQuorumPeer
15274 HRegionServer
15034 HMaster
注意,HBase的集群启动相当慢,清检查log确定完全启动后,再用Java客户端、cli连接。 4、Java API连接
Configuration conf = new Configuration();
conf.set("hbase.zookeeper.quorum", "localhost");
pool = new HTablePool(conf, 1);
pool.getTable("test");
   

Copyright © 2019- kushenhuo.cn 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务