2017-06-19 42 views
0
I am using Phoenix verion :4.10.0-HBase-1.2 

I am getting below error while creating new schema: 

不一致的命名空间映射性质在..确保配置 phoenix.schema.isNamespaceMappingEnabled是在客户端和服务器 到consitent创建HBase的架构。无法使用凤

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代码:
----------------
Connection connection = setupDbConnection();
statement statement = connection.createStatement();
int status = statement.executeUpdate(“CREATE SCHEMA test”);
connection.commit();

please give me any suggestions.. 

回答

0

您需要修改setupDbConnection();方法来使属性像这样设置:

Properties properties = new Properties();  
properties.setProperty("phoenix.schema.mapSystemTablesToNamespace", "true");   
properties.setProperty("phoenix.schema.isNamespaceMappingEnabled", "true"); 
Connection connection = DriverManager.getConnection("jdbc:phoenix:...:/hbase", properties);