开发者社区> 问答> 正文

Phoenix4.14不读取hbase配置文件

hbase小能手 2018-11-07 16:05:24 683
  1. cdh集群是新装的
  2. Phoenix 4.14也是新装的
  3. Phoenix可以建表, 可以批量导数
  4. 但就是不能建二级索引

在CM上配置如下:
hbase-site.xml 的 HBase 客户端高级配置代码段(安全阀):

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

建索引的时候还是报错:
Error: ERROR 1029 (42Y88): Mutable secondary indexes must have the hbase.regionserver.wal.codec property set to org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec in the hbase-sites.xml of every region server. tableName=INCRV8_STD_CONTRACT_INDEX (state=42Y88,code=1029)

我将CM上HBase的配置文件下载下来, 都放到了Phoenix安装目录下, bin目录也放了, 但就是没效果

这是我打印的py脚本中会读取的环境变量:
-- phoenix_class_path =
-- hbase_conf_dir = /etc/hbase/conf
-- current_dir = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin
-- pherf_conf_path = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/config
-- phoenix_jar_path = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/../phoenix-client/target/*
-- phoenix_client_jar = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/../phoenix-4.14.0-cdh5.11.2-client.jar
-- hadoop_conf = /etc/hadoop/conf
-- hadoop_classpath = /etc/hadoop/conf:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop/.//:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/./:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/.//:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-yarn/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-yarn/.//:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/lib/:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/.//
-- hadoop_common_jar_path = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/../phoenix-client/target/*
-- zookeeper =
-- sqlfile =
-- hbase_config_path = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin
-- java_home = /usr/java/jdk1.8.0_151
-- hbase_env_path = /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/hbase-env.sh
-- hbase_env_cmd = bash,-c,source /home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/hbase-env.sh && env
-- hbase_env = {}
-- java_cmd = /usr/java/jdk1.8.0_151/bin/java $PHOENIX_OPTS -cp "/home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin:/etc/hbase/conf:/home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/../phoenix-4.14.0-cdh5.11.2-client.jar:::/etc/hadoop/conf:/etc/hadoop/conf:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop/.//:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/./:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-hdfs/.//:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-yarn/lib/:/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/lib/hadoop/libexec/../../hadoop-yarn/.//:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/lib/:/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/.//
" -Dlog4j.configuration=file:/home/bdmp_test/phoenix/apache-phoenix-4.14.0-cdh5.11.2-bin/bin/log4j.properties sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver -u jdbc:phoenix:'' -n none -p none --color=true --fastConnect=false --verbose=true --incremental=false --isolation=TRANSACTION_READ_COMMITTED

不知道问题出在哪儿, 求各位大神们给看看

分享到
取消 提交回答
全部回答(1)
  • 马铭芳
    2019-07-17 23:12:41

    Error: ERROR 1029 (42Y88): Mutable secondary indexes must have the hbase.regionserver.wal.codec property set to org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
    这个明确说参数没有配置呀
    这是服务端参数,不是放置在客户端的xml中,是regionserver的xml
    cm常见小坑

    0 0