[
https://issues.apache.org/jira/browse/PHOENIX-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15269344#comment-15269344
]
James Taylor commented on PHOENIX-2874:
---------------------------------------
bq. I need to keep PhoenixIOException( wrapped over constraintException of
tables present in namespace ) as there will be tables present in the namespace
which we are not deleting from hbase during dropPriorTable as they are getting
deleted under dropNonSystemTables()
Does the dropping of a schema also drop/delete the HBase namespace? And does
that fail if there are tables defined in the namespace? Tests typically have
the QueryServices.DROP_METADATA_ATTRIB set to false to prevent the HBase admin
call that drops the metadata (as that call is very expensive). Only the update
to the SYSTEM.CATALOG table is done instead. The DROP SCHEMA call should
respect the QueryServices.DROP_METADATA_ATTRIB parameter as well.
Minor nit, but how about comparing the SYSTEM schema name before you escape it,
as that'd improve code readability IMHO:
{code}
+ String schemaName =
rs.getString(PhoenixDatabaseMetaData.TABLE_SCHEM);
+
if(schemaName.equals(PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME)){
+ continue;
+ }
+ String ddl = "DROP SCHEMA " +
SchemaUtil.getEscapedArgument(schemaName);
{code}
> Delete schemas also during clean up after test
> -----------------------------------------------
>
> Key: PHOENIX-2874
> URL: https://issues.apache.org/jira/browse/PHOENIX-2874
> Project: Phoenix
> Issue Type: Bug
> Reporter: Ankit Singhal
> Assignee: Ankit Singhal
> Attachments: PHOENIX-2874.patch, PHOENIX-2874_v1.patch,
> PHOENIX-2874_v2.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)