Skip to content

Commit

Permalink
removed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
patduin committed Nov 30, 2023
1 parent 55cb714 commit 7052959
Showing 1 changed file with 4 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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<String> 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
Expand Down

0 comments on commit 7052959

Please sign in to comment.