You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Omar ali (Jira)" <ji...@apache.org> on 2020/03/04 06:57:00 UTC

[jira] [Commented] (PHOENIX-597) Detect if HBase table exists and is not split as expected when DDL run

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

Omar ali commented on PHOENIX-597:
----------------------------------

Ho

> Detect if HBase table exists and is not split as expected when DDL run
> ----------------------------------------------------------------------
>
>                 Key: PHOENIX-597
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-597
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: James R. Taylor
>
> Currently, if you create an unsplit or unsalted table like this:
>       CREATE TABLE t (k VARCHAR PRIMARY KEY);
> and then drop it:
>       DROP TABLE k;
> and the create it again, either salted or split:
>       CREATE TABLE t (k VARCHAR PRIMARY KEY) SALT_BUCKETS=10;
> Then it's not going to work properly, since the second CREATE will not pre-split the table since the HBase table already exists (as we currently never drop HBase metadata).
> We should either drop the HBase metadata on DROP TABLE, or we should at a minimum detect this case and throw.
> As a workaround, when creating a salted or split table, make sure to disable and drop it from the HBase shell if it already exists.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)