2

我正在使用 Apache Phoenix 并尝试创建模式。

以下是使用的版本(伪分布式安装)

  1. Hadoop - 2.6.4
  2. Hbase - 1.1.2
  3. 凤凰城 - 4.7.0
  4. Sqlline - 1.1.8
  5. Zookeper- 3.4.6(Hbase 默认/托管)

我很乐意创建模式

hbase-site.xml

<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://{{HOST}}:8020/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/testuser/zookeeper</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>{{HOST}}</value> </property> <property> <name>zookeeper.znode.parent</name> <value>/hbase</value> <source>hbase-site.xml</source> </property> <property> <name>phoenix.schema.isNamespaceMappingEnabled</name> <value>true</value> </property> </configuration>

出现以下错误

0: jdbc:phoenix:hdp1.hw.com:2181> !tables +------------+--------------+-------------+---------------+----------+---------+ | TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | REMARKS | TYPE_NA | +------------+--------------+-------------+---------------+----------+---------+ | | SYSTEM | CATALOG | SYSTEM TABLE | | | | | SYSTEM | FUNCTION | SYSTEM TABLE | | | | | SYSTEM | SEQUENCE | SYSTEM TABLE | | | | | SYSTEM | STATS | SYSTEM TABLE | | | +------------+--------------+-------------+---------------+----------+---------+ 0: jdbc:phoenix:hdp1.hw.com:2181> create schema test; Error: ERROR 601 (42P00): Syntax error. Encountered "schema" at line 1, column 8. (state=42P00,code=601) org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered "schema" at line 1, column 8. at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33) at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111) at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1185) at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1268) at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1339) at sqlline.Commands.execute(Commands.java:822) at sqlline.Commands.sql(Commands.java:732) at sqlline.SqlLine.dispatch(SqlLine.java:808) at sqlline.SqlLine.begin(SqlLine.java:681) at sqlline.SqlLine.start(SqlLine.java:398) at sqlline.SqlLine.main(SqlLine.java:292) Caused by: NoViableAltException(98@[]) at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:650) at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500) at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108) ... 9 more

但是,使用phoenix 4.14.0我可以使用相同的配置成功创建架构。

4

0 回答 0