Created 06-21-2017 05:25 AM
HBase version : 1.2.6 Phoenix Version : 4.10.0-HBase-1.2.0
While creating schema or table I am getting this error:
Failed to move working directory snapshot
{ ss=_UPGRADING_TABLE_SYSTEM.MUTEX table=SYSTEM.MUTEX type=DISABLED }
So because of this error it is not creating the schema or table.
java-program: ------------------
Properties connectionProps = new Properties(); connectionProps.put("phoenix.schema.isNamespaceMappingEnabled", "true"); connectionProps.put("phoenix.schema.mapSystemTablesToNamespace", "true"); connection = DriverManager.getConnection("jdbc:phoenix:localhost",connectionProps); statement = connection.createStatement(); statement.executeUpdate("CREATE SCHEMA MYSCHEMA"); connection.commit();
hbase-site.xml ----------------
<property> <name>phoenix.schema.isNamespaceMappingEnabled</name> <value>true</value> </property> <property> <name>phoenix.schema.mapSystemTablesToNamespace</name> <value>true</value> </property>
please help me.
Created 06-21-2017 08:20 AM
You must add the isNamespaceMappingEnabled property to hbase-site.xml, not to hdfs-site.xml. Also, don't forget to restart HBase after that.
Could you please try the "sqlline.py" utility to create your schema to check if it works that way? It's under /usr/hdp/current/phoenix/bin or /usr/hdp/current/phoenix-client/bin (depending on your HDP version).
Created 06-22-2017 03:48 AM
its hbase-site.xml only by mistake i wrote hdfs-site.xml.
Created 06-21-2017 06:37 PM
Are you using HDP? SYSTEM.MUTEX is not used in Phoenix 4.7 which is part of HDP packages. If your question is about the release from Apache site, please be more specific about the version.
Created 06-22-2017 03:50 AM
Its not working properly on windows ??
But on mac its working fine..
Do I need to add any env. variables on windows related to hbase and phoenix..
Anyone is using hbase and phoenix on windows ???
Created 06-22-2017 07:03 PM
make sure that you are using the correct version of phoenix-client.jar . For any OS it's highly recommended to have hbase-site.xml the same as the server has and set HBASE_CONF_DIR pointing to the directory where this file is located.