Skip to content

Commit

Permalink
0006148: Remove individual jobs stats for push and pull and uri handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Dec 6, 2023
1 parent 1a085ba commit f306c63
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,6 @@ private void logDataReceivedFromPush(Node sourceNode, List<IncomingBatch> batchL
log.info("{} data and {} batches loaded during push request from {}",
new Object[] { okDataCount, okBatchesCount, sourceNode.toString() });
}
statisticManager.addJobStats(sourceNode.getNodeId(), 1, "Push Handler",
processInfo.getStartTime().getTime(),
processInfo.getLastStatusChangeTime().getTime(),
okDataCount);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class PullService extends AbstractOfflineDetectorService implements IPull
private INodeCommunicationService nodeCommunicationService;
private IDataLoaderService dataLoaderService;
private IConfigurationService configurationService;
private IStatisticManager statisticManager;

public PullService(IParameterService parameterService, ISymmetricDialect symmetricDialect,
INodeService nodeService, IDataLoaderService dataLoaderService,
Expand All @@ -70,7 +69,6 @@ public PullService(IParameterService parameterService, ISymmetricDialect symmetr
this.nodeCommunicationService = nodeCommunicationService;
this.dataLoaderService = dataLoaderService;
this.configurationService = configurationService;
this.statisticManager = statisticManager;
}

synchronized public RemoteNodeStatuses pullData(boolean force) {
Expand Down Expand Up @@ -131,8 +129,6 @@ public void execute(NodeCommunication nodeCommunication, RemoteNodeStatus status
long lastDataProcessed = 0;
long cumulativeBatchesProcessed = 0;
long cumulativeDataProcessed = 0;
long begin = System.currentTimeMillis();
long end = 0;
do {
log.debug("Pull requested for {}", node);
if (lastBatchesProcessed > 0) {
Expand All @@ -148,15 +144,12 @@ public void execute(NodeCommunication nodeCommunication, RemoteNodeStatus status
} catch (Exception ex) {
fireOffline(ex, node, status);
}
end = System.currentTimeMillis();
lastBatchesProcessed = status.getBatchesProcessed() - cumulativeBatchesProcessed;
lastDataProcessed = status.getDataProcessed() - cumulativeDataProcessed;
if (!status.failed() && (lastDataProcessed > 0 || lastBatchesProcessed > 0)) {
log.info(
"Pull data received from {} on queue {}. {} rows and {} batches were processed. ({})",
new Object[] { node.toString(), nodeCommunication.getQueue(), lastDataProcessed, lastBatchesProcessed, status.getTableSummary() });
statisticManager.addJobStats(node.getNodeId(), 1, "Pull",
begin, end, status.getDataProcessed());
} else if (status.failed()) {
log.debug(
"There was a failure while pulling data from {} on queue {}. {} rows and {} batches were processed. ({})",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ private void pushToNode(Node remote, RemoteNodeStatus status) {
log.info("Push data sent to {}", remote);
List<BatchAck> batchAcks = readAcks(extractedBatches, transport, transportManager, acknowledgeService, dataExtractorService);
status.updateOutgoingStatus(extractedBatches, batchAcks);
statisticManager.addJobStats(remote.getNodeId(), 1, "Push",
processInfo.getStartTime().getTime(), processInfo.getLastStatusChangeTime().getTime(), status.getDataProcessed());
}
if (processInfo.getStatus() != ProcessStatus.ERROR) {
processInfo.setStatus(ProcessStatus.OK);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ private void logDataReceivedFromPull(Node targetNode, List<OutgoingBatch> batchL
}
}
if (batchesCount > 0) {
statisticManager.addJobStats(targetNode.getNodeId(), 1, "Pull Handler",
processInfo.getStartTime().getTime(),
processInfo.getLastStatusChangeTime().getTime(),
dataCount);
log.info(
"{} data and {} batches sent during pull request from {}",
new Object[] { dataCount, batchesCount, targetNode.toString() });
Expand Down

0 comments on commit f306c63

Please sign in to comment.