栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Hbase集成Phoenix

Hbase集成Phoenix

>>上传安装包至 /opt/soft 目录

>>创建安装目录
mkdir /opt/module/phoenix
>>解压安装包
tar -zxvf apache-phoenix-4.14.2-Hbase-1.3-bin.tar.gz -C /opt/module/phoenix/ --strip-components 1
>>在 /opt/module/phoenix/bin目录下拷贝下列xml文件
cd /opt/module/phoenix/bin ln -s /opt/module/hadoop-2.7.2/etc/hadoop/hdfs-site.xml ln -s /opt/module/hbase/conf/hbase-site.xml ln -s /opt/module/hadoop-2.7.2/etc/hadoop/core-site.xml

>>编辑 hbase-site.xml 文件


	
		phoenix.query.timeoutMs
		1800000
	

	
		hbase.rpc.timeout
		1200000
	

	
		hbase.client.scanner.timeout.period
		1200000
	

	     
		hbase.rootdir     
		hdfs://hadoop103:9000/Hbase   
	

	   
		hbase.cluster.distributed
		true
	

   	
	
		hbase.master.port
		16000
	

	    
		hbase.zookeeper.quorum
	     	hadoop102,hadoop103,hadoop104
	

	   
		hbase.zookeeper.property.dataDir
	     	/opt/module/zookeeper-3.4.10/zkData
	

	
  		phoenix.schema.isNamespaceMappingEnabled
  		true
	

	
  		phoenix.schema.mapSystemTablesToNamespace
  		true
	

	
        hbase.table.sanity.checks
        false
	

	
	
        hbase.regionserver.wal.codec
        org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
	

	
        hbase.region.server.rpc.scheduler.factory.class
        org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory
	

	
        hbase.rpc.controllerfactory.class
   		org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory
	

	
        hbase.master.loadbalancer.class
        org.apache.phoenix.hbase.index.balancer.IndexLoadBalancer
	

	
        hbase.coprocessor.master.classes
        org.apache.phoenix.hbase.index.master.IndexMasterObserver
	

>>编辑 /etc/profile

#phoenix environment
export PHOENIX_HOME=/opt/module/phoenix
export PHOENIX_CLASSPATH=$PHOENIX_HOME
export PATH=$PATH:$PHOENIX_HOME/bin
>>重新编译 /etc/profile 文件
source /etc/profile
>>启动Hadoop,Zookeeper,Hbase
start-dfs.sh start-yarn.sh zkServer.sh start start-hbase.sh
>>使用 sqlline.py 
sqlline.py hadoop102,hadoop103,hadoop104:2181
>>查询所有表
!tables
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/583831.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号