[
https://issues.apache.org/jira/browse/PHOENIX-4603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16363015#comment-16363015
]
James Taylor commented on PHOENIX-4603:
---------------------------------------
Please review, [~tdsilva] and/or [~samarthjain]. The client-side cache is
populated based on the client-side state, so if table already exists which is
encoded, then Phoenix would think it's not encoded. I've filed PHOENIX-4604 to
do the verification on the server-side if the table already exists.
> Remove check for table existence in MetaDataClient.createTableInternal()
> ------------------------------------------------------------------------
>
> Key: PHOENIX-4603
> URL: https://issues.apache.org/jira/browse/PHOENIX-4603
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: James Taylor
> Priority: Major
> Fix For: 4.14.0
>
> Attachments: PHOENIX-4603_v1.patch
>
>
> Found some strange code in that should be removed. If a table is being
> created but the HBase metadata already exists, we can't assume one way or the
> other that it's encoded or not encoded. It's on the user to supply the
> correct existing encoding in that case.
> {code}
> byte[] tableNameBytes =
> SchemaUtil.getTableNameAsBytes(schemaName, tableName);
> boolean tableExists = true;
> try {
> HTableDescriptor tableDescriptor =
> connection.getQueryServices().getTableDescriptor(tableNameBytes);
> if (tableDescriptor == null) { // for connectionless
> tableExists = false;
> }
> } catch (org.apache.phoenix.schema.TableNotFoundException e) {
> tableExists = false;
> }
> if (tableExists) {
> encodingScheme = NON_ENCODED_QUALIFIERS;
> immutableStorageScheme = ONE_CELL_PER_COLUMN;
> } else ...
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)