Support Questions

Find answers, ask questions, and share your expertise

failed to create schema in hbase using phoenix java program

New Contributor

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


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");

hbase-site.xml ----------------


please help me.


Expert Contributor

@Vishal Biradar

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 "" 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).

New Contributor

its hbase-site.xml only by mistake i wrote hdfs-site.xml.

Super Collaborator

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.

New Contributor

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 ???

Super Collaborator

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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.