[
https://issues.apache.org/jira/browse/PHOENIX-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15268502#comment-15268502
]
Ankit Singhal commented on PHOENIX-2874:
----------------------------------------
Thanks [~jamestaylor] for the review.
bq. Rather than add another call to deletePriorTablesAndSchemas after the
deletePriorTables call, add the logic to deletePriorTables(long ts, String
tenantId, String url). Feel free to rename it to deletePriorMetaData(). I think
the best approach would be to collect up all the schemas that need to be
deleted while deletePriorTables is running and return this as a Set<String>.
Then you don't need to repeat the boiler plate code and you automatically
wouldn't have the SYSTEM schema returned (as we're not deleting the system
tables).
In the patch , I'm not calling deletePriorTablesAndSchemas() after
deletePriorTables() but actually ,I am replacing deletePriorTables with
deletePriorTablesAndSchemas. It is not necessary to collect schemas for the
tables which are mapped in deletePriorTables as we can directly get it from
DataBaseMetaData with minimal expense. Though, I'll change the name of
deletePriorTablesAndSchemas() to deleteMetaData()
bq. You wouldn't want to catch and ignore the
NewerSchemaAlreadyExistsException, SchemaNotFoundException, or
PhoenixIOException when dropping the schema as that'd be an indication that
something is wrong.
Yes, you are right , I'll remove NewerSchemaAlreadyExistsException and
SchemaNotFoundException but I think ,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().
bq. When you check that all schemas have been dropped, ignore the SYSTEM schema
(QueryConstants.SYSTEM_SCHEMA_NAME)
Yes , I'll ignore the SYSTEM schema from dropPriorSchemas.
> 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
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)