Hadoop 尝试创建表时出现Phoenix错误

Hadoop 尝试创建表时出现Phoenix错误,hadoop,hbase,phoenix,Hadoop,Hbase,Phoenix,当我在phoenix中登录到sqlline.py或尝试通过api在phoenix中创建表时,我会遇到一个异常 由于我对phenix的了解有限,我无法理解为什么phoenix在创建System.Catalog表之前就检查它。任何帮助都将不胜感激 堆栈跟踪: *2018年4月11日06:07:18警告客户端。HConnectionManager$HConnectionImplementation:预回迁元表时遇到问题: org.apache.hadoop.hbase.TableNotFoundExc

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

由于我对phenix的了解有限,我无法理解为什么phoenix在创建System.Catalog表之前就检查它。任何帮助都将不胜感激

堆栈跟踪:

*2018年4月11日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*

检查你的hdfs://.../hbase/data/default/ 是否存在SYSTEM.CATALOG?

如果没有,则必须尝试使用bin/hbase clean--cleanZk
在使用该命令之前,必须停止hbase主服务器和RegionServer,但仍保持ZK的活动状态。

您是否创建了该表?执行“显示表”检查您的hbase主服务器和从服务器也可能尚未启动主服务器和区域服务器正在运行;我可以从hbase创建一个表;它无法建立到hbase的连接。它是远程连接吗?我只是在hadoop上用hbase从头开始安装phoenix,因为没有遇到任何错误。您使用的是独立的还是伪分布式hbase?