一、phoenix-4.14.1部署方法
mkdir /vk
cd /vk && wget http://mirrors.hust.edu.cn/apache/phoenix/apache-phoenix-4.14.1-HBase-1.4/bin/apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz
tar -zxf apache-phoenix-4.14.1-HBase-1.4-bin.tar.gz -C /home/hadoop/phoenix && cd /home/hadoop/phoenix
将phoenix-core-4.11.0-HBase-1.3.jar+phoenix-4.14.1-HBase-1.4-client.jar拷贝到hbase集群中的所有region server的hbase的lib目录下。在测试环境下,master和slave01均作为regionserver。
cp phoenix-4.14.1-HBase-1.4-client.jar /home/hadoop/hbase/lib/ && cp phoenix-core-4.14.1-HBase-1.4.jar /home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-4.14.1-HBase-1.4-client.jar hadoop@master:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-core-4.14.1-HBase-1.4.jar hadoop@master:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-4.14.1-HBase-1.4-client.jar hadoop@slave01:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-core-4.14.1-HBase-1.4.jar hadoop@slave01:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-4.14.1-HBase-1.4-client.jar hadoop@slave02:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-core-4.14.1-HBase-1.4.jar hadoop@slave02:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-4.14.1-HBase-1.4-client.jar hadoop@slave03:/home/hadoop/hbase/lib/
scp /home/hadoop/hbase/lib/phoenix-core-4.14.1-HBase-1.4.jar hadoop@slave03:/home/hadoop/hbase/lib/
连接命令:192.168.2.50
/home/hadoop/phoenix/bin/sqlline.py localhost:2181
只修改- H master下的hbase-site.xml配置 后四行
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.master</name>
<value>master</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>master,slave01,slave02</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>60000000</value>
</property>
<property>
<name>hbase.hregion.majorcompaction</name>
<value>0</value>
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
<property>
<name>hbase.regionserver.wal.codec</name>
<value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
</property>
<property>
<name>hbase.region.server.rpc.scheduler.factory.class</name>
<value>org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory</value>
</property>
<property>
<name>hbase.rpc.controllerfactory.class</name>
<value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value>
</property>
<property>
<name>hbase.table.sanity.checks</name>
<value>false</value>
</property>
</configuration>
重启Hbase
连接phoenix
/home/hadoop/phoenix/bin/sqlline.py master,slave01,slave02,slave03:2181