You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2019/01/31 00:58:54 UTC

[GitHub] mcvsubbu commented on a change in pull request #3763: Add log for delete table API

mcvsubbu commented on a change in pull request #3763: Add log for delete table API
URL: https://github.com/apache/incubator-pinot/pull/3763#discussion_r252499544
 
 

 ##########
 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,
+        (dropTableFinishTime - removeFromBrokerResourceFinishTime));
 
     // Remove all segments for the table
     _segmentDeletionManager.removeSegmentsFromStore(offlineTableName, getSegmentsFor(offlineTableName));
     ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(_propertyStore, offlineTableName);
+    long removeSegmentFinishTime = System.currentTimeMillis();
+    LOGGER.info("Deleting table {}: Removed segments in {}ms", offlineTableName,
 
 Review comment:
   Removed segment metadata

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org