Inconsistent namespace mapping properties.

当遇到Phoenix报错Inconsistent namespace mapping properties导致无法初始化连接时,可以按照以下步骤解决:1.移除phoenix和hbase配置文件中关于命名空间开启的属性;2.重启HBase;3.在HBase shell中,将SYSTEM:CATALOG表重命名为SYSTEM.CATALOG;4.再次重启HBase。此问题通常由于命名空间映射不一致引起。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

phoenix报错:Inconsistent namespace mapping properties.

com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(593)|MyHikariCP - Exception during pool initialization.
java.sql.SQLException: ERROR 726 (43M10): Inconsistent namespace mapping properties. Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

在这里插入图片描述

解决方式如下:
①将phoenix和hbase的hbase-site.xml文件里的开启命名空间一项去掉。

    <!--
    <property>
        <name>phoenix.schema.isNamespaceMappingEnabled</name>
        <value>true</value>
        <description>命名空间开启</description>
	</property>
    
	<property>
        <name>phoenix.schema.mapSystemTablesToNamespace</name>
        <value>true</value>
	</property>
	-->

②重启hbase
③进入hbase shell,将SYSTEM:CATALOG改为SYSTEM.CATALOG,操作如下

disable 'SYSTEM:CATALOG'
snapshot 'SYSTEM:CATALOG','cata_tableSnapshot'
clone_snapshot 'cata_tableSnapshot','SYSTEM.CATALOG'
drop 'SYSTEM:CATALOG'

④再次重启hbase即可

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:607) at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:217) at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:1731) at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1460) at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1939) at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:3090) at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1117) at org.apache.phoenix.compile.CreateTableCompiler$CreateTableMutationPlan.execute(CreateTableCompiler.java:420) at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:443) at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:425) at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:424) at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:412) at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1990) at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3312) at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3266) at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76) at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:3266) at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255) at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:144) at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221) at sqlline.DatabaseConnection.connect(DatabaseConnection.java:135) at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:192) at sqlline.Commands.connect(Commands.java:1364) at sqlline.Commands.connect(Commands.java:1244) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38) at sqlline.SqlLine.dispatch(SqlLine.java:730) at sqlline.SqlLine.initArgs(SqlLine.java:410) at sqlline.SqlLine.begin(SqlLine.java:515) at sqlline.SqlLine.start(SqlLine.java:267) at sqlline.SqlLine.main(SqlLine.java:206) sqlline version 1.9.0
最新发布
03-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值