您好,欢迎访问代理记账网站
移动应用 微信公众号 联系我们

咨询热线 -

电话 15988168888

联系客服
  • 价格透明
  • 信息保密
  • 进度掌控
  • 售后无忧

Phoenix安装

1、下载,需要和hbase版本保持一致

http://phoenix.apache.org/download.html

我的hbase比较老,是1.2版本的所以找

 2、解压、配置

(1)tar -zxvf phoenix.. -C ...

(2)vi /etc/profile export PHOENIX_HOME

(3)vi $HBASE_HOME/conf/hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://hdp-1:9000/hbase</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>hdp-1:2181,hdp-2:2181,hdp-3:2181</value>
    </property>
    <property>
        <name>hbase.table.sanity.checks</name>
        <value>false</value>
    </property>

  <property>
    <name>hbase.zookeeper.znode.parent</name>
    <value>/hbase</value>
  </property>

    <property>
        <name>hbase.master</name>
        <value>hdfs://hdp-1:60000</value>
    </property>
</configuration>

(4)cp $HADOOP_HOME/etc/hadoop/core-site.xml $PHOENIX_HOME/bin

         cp $HADOOP_HOME/etc/hadoop/hdfs-site.xml $PHOENIX_HOME/bin

         cp $HBASE_HOME/lib/hbase-site.xml $PHOENIX_HOME/bin

(5)在PHOENIX_HOME/bin下测试

         

[root@hdp-1 bin]# ./sqlline.py hdp-1:2181
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:hdp-1:2181 none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:hdp-1:2181
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/apps/apache-phoenix-4.8.2-HBase-1.2-bin/phoenix-4.8.2-HBase-1.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/apps/hadoop-2.8.1/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
21/07/01 07:56:43 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Connected to: Phoenix (version 4.8)
Driver: PhoenixEmbeddedDriver (version 4.8)
Autocommit status: true
Transaction isolation: TRANSACTION_READ_COMMITTED
Building list of tables and columns for tab-completion (set fastconnect to true to skip)...
86/86 (100%) Done
Done
sqlline version 1.1.9
0: jdbc:phoenix:hdp-1:2181> 


分享:

低价透明

统一报价,无隐形消费

金牌服务

一对一专属顾问7*24小时金牌服务

信息保密

个人信息安全有保障

售后无忧

服务出问题客服经理全程跟进