You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/08/27 02:11:57 UTC

[jira] [Commented] (PHOENIX-1212) Create table if not exists throws TableNotEnaledException while promoting Hbase Table to Phoenix

    [ https://issues.apache.org/jira/browse/PHOENIX-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14111621#comment-14111621 ] 

James Taylor commented on PHOENIX-1212:
---------------------------------------

I'd just like to clarify when you see the above behavior. Is it only when you open the first connection and the Phoenix client attempts an upgrade from 2.2.x to 3.x? Or is this in general? We do need to disable the HBase table initially as well to add the Phoenix coprocessors, so perhaps it's happening then?

In the clients getting this error, does it cause problems afterwards, or can the exception be ignored and you can issue SQL queries against the new table?

> Create table if not exists throws TableNotEnaledException while promoting Hbase Table to Phoenix
> ------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1212
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1212
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.1
>            Reporter: Ravi Kishore Valeti
>            Priority: Minor
>              Labels: Phoenix
>
> When multiple threads run "create table if not exists" concurrently on a pre-existing HBase Table, only one succeedes and others fail with 
> org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.TableNotEnabledException: TEST_11
> 	at org.apache.hadoop.hbase.master.handler.DisableTableHandler.prepare(DisableTableHandler.java:100)
>       .
>       .
>       .
>       .
> 	at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:101)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:846)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1057)
> 	at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156)
> 	at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422)
> 	at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908)
> 	at com.test.phoenix.PhoenixClient.executeUpdate(PhoenixClient.java:170)
> 	at PhoenixCreateTableTest$TableCreateThread.run(PhoenixCreateTableTest.java:50)
> 	at java.lang.Thread.run(Thread.java:745)
> i) Create a Table from Hbase Shell
> > create "TEST_PHOENIX","cf"
> ii) Run a Test with multiple Threads trying to execute Phoenix Query "create table if not exists" query
> create table if not exists "TEST_PHOENIX" ("role" VARCHAR primary key, "cf"."hosts" VARCHAR)
> Only one thread will succeed and rest all would end up with the above exception



--
This message was sent by Atlassian JIRA
(v6.2#6252)