diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java index 7b304a369..9305fffd5 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java @@ -31,13 +31,13 @@ import com.facebook.fb303.FacebookBase; import com.facebook.fb303.fb_status; -import com.google.common.base.Stopwatch; +import com.jcabi.aspects.Loggable; + import com.hotels.bdp.waggledance.conf.WaggleDanceConfiguration; import com.hotels.bdp.waggledance.mapping.model.DatabaseMapping; import com.hotels.bdp.waggledance.mapping.service.MappingEventListener; import com.hotels.bdp.waggledance.mapping.service.impl.NotifyingFederationService; import com.hotels.bdp.waggledance.metrics.Monitored; -import com.jcabi.aspects.Loggable; @Monitored @Component @@ -1383,7 +1383,7 @@ public void alter_table_with_cascade(String dbname, String tbl_name, Table new_t mapping .getClient() .alter_table_with_cascade(mapping.transformInboundDatabaseName(dbname), tbl_name, - mapping.transformInboundTable(new_tbl), cascade); + mapping.transformInboundTable(new_tbl), cascade); } @Override @@ -1616,36 +1616,14 @@ public GetTableResult get_table_req(GetTableRequest req) throws MetaException, N @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public GetTablesResult get_table_objects_by_name_req(GetTablesRequest req) throws MetaException, InvalidOperationException, UnknownDBException, TException { - long total = System.currentTimeMillis(); - StringBuilder message = new StringBuilder(); - Stopwatch stopWatch = Stopwatch.createStarted(); - - message.append("get_table_objects_by_name_req: req=" + req.toString() + ", "); DatabaseMapping mapping = databaseMappingService.databaseMapping(req.getDbName()); - message.append("DatabaseMapping took:" + stopWatch.elapsed().toMillis() + ", "); - stopWatch.reset().start(); - List filteredTables = databaseMappingService.filterTables(req.getDbName(), req.getTblNames(), mapping); req.setTblNames(filteredTables); - message.append("Filtered tables 1st call took: " + stopWatch.elapsed().toMillis() + ", "); - stopWatch.reset().start(); - GetTablesResult result = mapping .getClient() .get_table_objects_by_name_req(mapping.transformInboundGetTablesRequest(req)); - message.append("HMS call took: " + stopWatch.elapsed().toMillis() + ", "); - stopWatch.reset().start(); - result.setTables(mapping.getMetastoreFilter().filterTables(result.getTables())); - message.append("Filtered tables 2nd call took: " + stopWatch.elapsed().toMillis() + ", "); - stopWatch.reset().start(); - - GetTablesResult getTablesResult = mapping.transformOutboundGetTablesResult(result); - message.append("Transform outbound took: " + stopWatch.elapsed().toMillis()+", "); - stopWatch.stop(); - message.append("Total get_table_objects_by_name_req took: " + (System.currentTimeMillis() - total)); - LOG.error(message.toString()); - return getTablesResult; + return mapping.transformOutboundGetTablesResult(result); } @Override