Reputation: 1229
I am using Phoenix verion :4.10.0-HBase-1.2
I am getting below error while creating new schema:
Inconsistent namespace mapping properites.. Ensure that config phoenix.schema.isNamespaceMappingEnabled is consitent on client and server.
What does mean by ensure on client and server ??
What changes i need to do ??
hbase-site.xml
------------------------
<property>
<name>phoenix.schema.isNamespaceMappingEnabled</name>
<value>true</value>
</property>
Java code :
----------------
Connection connection = setupDbConnection();
statement statement = connection.createStatement();
int status = statement.executeUpdate("CREATE SCHEMA test");
connection.commit();
please give me any suggestions..
Upvotes: 0
Views: 2335
Reputation: 917
If the issue occurs even after setting phoenix.schema.isNamespaceMappingEnabled
to true
make sure you have hbase conf folder on classpath.
Upvotes: 0
Reputation: 1
Set property phoenix.schema.isNamespaceMappingEnabled
as consitent
in hbase-site.xml
Upvotes: -1
Reputation: 1340
You need to modify your setupDbConnection(); method to have the property set like this:
Properties properties = new Properties();
properties.setProperty("phoenix.schema.mapSystemTablesToNamespace", "true");
properties.setProperty("phoenix.schema.isNamespaceMappingEnabled", "true");
Connection connection = DriverManager.getConnection("jdbc:phoenix:...:/hbase", properties);
Upvotes: 3