当前位置: 首页 > 知识库问答 >
问题:

试图创建表时发生Phoenix错误

姬衡
2023-03-14

当我在phoenix中登录sqlline.py或试图通过API在phoenix中创建表时,我会遇到一个异常。

由于我对phenix的知识有限,我无法弄清楚为什么phoenix在创建System.Catalog表之前就要检查它。

StackTrace:

*4/11/18 06:07:18警告客户端。HConnectionManager$HConnectionImplementation:预取元表时遇到问题:

org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: SYSTEM.CATALOG, row=SYSTEM.CATALOG,\x00SYSTEM\x00CATALOG,99999999999999
    at org.apache.hadoop.hbase.client.MetaScanner.metaScan(MetaScanner.java:151)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.prefetchRegionCache(HConnectionManager.java:1059)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1121)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1001)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:958)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:914)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1053)
    at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156)
    at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
    at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1351)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
    at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
    at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
    at sqlline.SqlLine.dispatch(SqlLine.java:817)
    at sqlline.SqlLine.initArgs(SqlLine.java:633)
    at sqlline.SqlLine.begin(SqlLine.java:680)
    at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
    at sqlline.SqlLine.main(SqlLine.java:424)
Error: SYSTEM.CATALOG (state=08000,code=101)
org.apache.phoenix.exception.PhoenixIOException: SYSTEM.CATALOG
    at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:97)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:935)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1053)
    at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156)
    at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
    at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1351)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
    at sqlline.SqlLine$DatabaseConnection.connect(SqlLine.java:4650)
    at sqlline.SqlLine$DatabaseConnection.getConnection(SqlLine.java:4701)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3942)
    at sqlline.SqlLine$Commands.connect(SqlLine.java:3851)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sqlline.SqlLine$ReflectiveCommandHandler.execute(SqlLine.java:2810)
    at sqlline.SqlLine.dispatch(SqlLine.java:817)
    at sqlline.SqlLine.initArgs(SqlLine.java:633)
    at sqlline.SqlLine.begin(SqlLine.java:680)
    at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
    at sqlline.SqlLine.main(SqlLine.java:424)
Caused by: org.apache.hadoop.hbase.TableNotFoundException: SYSTEM.CATALOG
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:1139)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:1001)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:958)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:914)
    ... 23 more*

共有1个答案

濮阳繁
2023-03-14

如果没有,则必须尝试使用bin/hbase clean--cleanzk,在使用命令之前,必须停止hbase Master和regionServers,但仍要保持ZK的活动。

 类似资料:
  • 我不知道该怎么办!感谢任何帮助! 另外,我是否应该在安装HBase之前配置Zookeeper?我的教程没有这么说。

  • 我用shell在Hbase中创建了一个表,其中包含两个列族。我可以用Hbase客户端API写进去。我正在使用phoenix JDBC驱动程序从中查询数据。我了解到HBase和Phoenix表之间没有一对一的映射。因此,我为现有的表创建了一个视图,但是每当我运行代码时,我会得到

  • 我试图从使用FileAppender切换到使用log4j2的RollingFileAppender(在beta3和beta4 jar中都会发生)。 看起来好像正在读取配置文件,并且appender正在试图创建,但不确定我做错了什么。 我尝试过剪切和粘贴其他人的RollingFileAppender配置,但我仍然得到上面的错误。 谢了。

  • 我想知道如果我在现有的hbase表上创建phoenix表,它是复制(或复制)hbase表中存在的数据,还是phoenix表只是链接到hbase中存在的现有数据? 我的phoenix版本是<4.12.0,所以这个错误仍然适用于我的版本&因此不能在现有的hbase表上创建视图。

  • 使用此代码在Mariadb中创建表时 我得到了这个错误。 #1064年的今天,您的SQL语法出现错误;查看与您的MariaDB服务器版本对应的手册,以了解第2行“Grade TINYINT UNSIGNED,Subject VARCHAR(20),yearteached YEAR)”附近使用的正确语法 我不知道语法有什么问题。谢谢你。