jackjlli commented on a change in pull request #3763: Add log for delete table
API
URL: https://github.com/apache/incubator-pinot/pull/3763#discussion_r252501302
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -1324,47 +1324,80 @@ public IdealState apply(@Nullable IdealState
idealState) {
}, RetryPolicies.exponentialBackoffRetryPolicy(5, 500L, 2.0f));
}
- public void deleteOfflineTable(String tableName) {
- String offlineTableName =
TableNameBuilder.OFFLINE.tableNameWithType(tableName);
+ public void deleteOfflineTable(String rawTableName) {
+ String offlineTableName =
TableNameBuilder.OFFLINE.tableNameWithType(rawTableName);
+ LOGGER.info("Deleting table {}: Start", offlineTableName);
+ long startTime = System.currentTimeMillis();
// Remove the table from brokerResource
HelixHelper.removeResourceFromBrokerIdealState(_helixZkManager,
offlineTableName);
+ long removeFromBrokerResourceFinishTime = System.currentTimeMillis();
+ LOGGER.info("Deleting table {}: Removed from broker resource in {}ms",
offlineTableName,
+ (removeFromBrokerResourceFinishTime - startTime));
// Drop the table
if
(_helixAdmin.getResourcesInCluster(_helixClusterName).contains(offlineTableName))
{
_helixAdmin.dropResource(_helixClusterName, offlineTableName);
}
+ long dropTableFinishTime = System.currentTimeMillis();
+ LOGGER.info("Deleting table {}: Dropped table in {}ms", offlineTableName,
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]