Vishal Biradar
Vishal Biradar

Reputation: 1229

unable to create schema in hbase using phoenix

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

Answers (3)

Kapil
Kapil

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

Lokesh G
Lokesh G

Reputation: 1

Set property phoenix.schema.isNamespaceMappingEnabled as consitent in hbase-site.xml

Upvotes: -1

Art
Art

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

Related Questions