2

I am using Apache Phoenix and trying to create schema.

Following are the versions used (psuedo-distributed installation)

  1. Hadoop - 2.6.4
  2. Hbase - 1.1.2
  3. Phoenix - 4.7.0
  4. Sqlline - 1.1.8
  5. Zookeper- 3.4.6 (Hbase default/ managed)

I am ale to create schemas

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>

an getting following error

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

However using phoenix 4.14.0 i am able to create schema's successfully with same configuration.

Ekansh Rastogi
  • 2,418
  • 2
  • 14
  • 23

0 Answers0