laijunlin_data 2023-03-23 17:42 采纳率: 58.3%
浏览 17
已结题

phoenix 连接 hbase, 使用不同 namespace 的报错

想通过 phoenix 操作 hbase 的不同 namespace 时报错

  1. 在 hbase-site.xml 配置文件添加了:
    <property>
     <name>phoenix.schema.isNamespaceMappingEnabled</name>
     <value>true</value>
    </property>
    <property>
     <name>phoenix.schema.mapSystemTablesToNamespace</name>
     <value>true</value>
    </property>
    
  2. phoenix 客户端连接时报错信息:
    Error: ERROR 726 (43M10):  Inconsistent namespace mapping properties. Ensure that config phoenix.schema.isNamespaceMappingEnabled is consistent on client and server. (state=43M10,code=726)
    java.sql.SQLException: ERROR 726 (43M10):  Inconsistent namespace mapping properties. Ensure that config phoenix.schema.isNamespaceMappingEnabled is consistent on client and server.
      at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:497)
      at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:1319)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1102)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1502)
      at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2721)
      at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
      at org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:198)
      at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
      at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
      at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
      at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2570)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2533)
      at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
      at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2533)
      at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
      at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
      at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
      at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
      at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
      at sqlline.Commands.close(Commands.java:906)
      at sqlline.Commands.closeall(Commands.java:880)
      at sqlline.SqlLine.begin(SqlLine.java:714)
      at sqlline.SqlLine.start(SqlLine.java:398)
      at sqlline.SqlLine.main(SqlLine.java:291)
    
  3. 怎么解决?
  • 写回答

1条回答 默认 最新

  • IT_service_mesh 2023-03-23 17:49
    关注

    参考GPT和自己的思路:

    根据报错信息,看起来是客户端和服务器的配置不一致导致的,你可以检查一下以下几点:

    1. 确保你的客户端和服务器的 phoenix.schema.isNamespaceMappingEnabled 都是设置成 true。它表示将Phoenix schema和HBase namespace进行映射。

    2. 检查你的客户端的 hbase-site.xml 和服务器的 hbase-site.xml 是否一致,特别是检查 phoenix.schema.isNamespaceMappingEnabled 和 phoenix.schema.mapSystemTablesToNamespace 配置是否一致。

    3. 确认客户端和服务器的 Phoenix 版本是否一致。一个更老的版本可能没有这些配置,或者使用不同的默认配置。

    如果以上步骤都没有解决问题,你可能需要查看更详细的日志信息,进一步分析原因并解决问题。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 6月29日
  • 已采纳回答 6月21日
  • 创建了问题 3月23日

悬赏问题

  • ¥15 如何让子窗口鼠标滚动独立,不要传递消息给主窗口
  • ¥15 如何能达到用ping0.cc检测成这样?如图
  • ¥15 关于#DMA固件#的问题,请各位专家解答!
  • ¥15 matlab生成的x1图不趋于稳定,之后的图像是稳定的水平线
  • ¥15 请问华为OD岗位的内部职业发展通道都有哪些,以及各个级别晋升的要求
  • ¥20 微信小程序 canvas 问题
  • ¥15 系统 24h2 专业工作站版,浏览文件夹的图库,视频,图片之类的怎样删除?
  • ¥15 怎么把512还原为520格式
  • ¥15 MATLAB的动态模态分解出现错误,以CFX非定常模拟结果为快照
  • ¥15 求高通平台Softsim调试经验