dengzhhu653 commented on code in PR #5851:
URL: https://github.com/apache/hive/pull/5851#discussion_r2646388076
##########
standalone-metastore/metastore-client/src/main/java/org/apache/hadoop/hive/metastore/client/ThriftHiveMetaStoreClient.java:
##########
@@ -1679,7 +1678,22 @@ public void dropTable(String catName, String dbname,
String name, boolean delete
dropTableReq.setCatalogName(catName);
dropTableReq.setDropPartitions(true);
dropTableReq.setEnvContext(envContext);
- client.drop_table_req(dropTableReq);
+ dropTableReq.setAsyncDrop(!isLocalMetaStore());
+ AsyncOperationResp resp = client.drop_table_req(dropTableReq);
+ dropTableReq.setId(resp.getId());
+ try {
+ while (!resp.isFinished() && !Thread.currentThread().isInterrupted()) {
+ resp = client.drop_table_req(dropTableReq);
+ if (resp.getMessage() != null) {
+ LOG.info(resp.getMessage());
+ }
+ }
+ } finally {
+ if (!resp.isFinished()) {
+ dropTableReq.setCancel(true);
+ client.drop_table_req(dropTableReq);
Review Comment:
If the original Metastore crashes, a fresh new drop_database_req will be
sent to the new instance after the client reconnects
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]