Skip to content

Commit f563dcd

Browse files
committed
removes unnecessary debug output
1 parent 4700d59 commit f563dcd

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

server/src/main/java/org/elasticsearch/common/util/concurrent/TaskExecutionTimeTrackingPerIndexEsThreadPoolExecutor.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,4 @@ protected void trackExecutionTime(Runnable r, long taskTime) {
118118
runnableToIndexName.remove(r);
119119
}
120120
}
121-
122-
// TODO Remove these methods once the NodeConstruction#searchLoadMetricsReporter is deleted
123-
/**
124-
* Gets the map of index execution times.
125-
*
126-
* @return the map of index execution times
127-
*/
128-
public ConcurrentHashMap<String, Tuple<LongAdder, ExponentiallyWeightedMovingAverage>> getIndexExecutionTime() {
129-
return indexExecutionTime;
130-
}
131-
132-
/**
133-
* Gets the map of runnable tasks to index names.
134-
*
135-
* @return the map of runnable tasks to index names
136-
*/
137-
public ConcurrentHashMap<Runnable, String> getRunnableToIndexName() {
138-
return runnableToIndexName;
139-
}
140121
}

server/src/main/java/org/elasticsearch/node/NodeConstruction.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ private void construct(
716716

717717
var executor = (TaskExecutionTimeTrackingPerIndexEsThreadPoolExecutor) threadPool.executor(ThreadPool.Names.SEARCH);
718718
clusterService.addListener(new SearchIndexTimeTrackingCleanupService(executor));
719-
searchLoadMetricsReporter(executor);
720719

721720
modules.bindToInstance(DocumentParsingProvider.class, documentParsingProvider);
722721

@@ -1282,26 +1281,6 @@ public Map<String, String> searchFields() {
12821281
postInjection(clusterModule, actionModule, clusterService, transportService, featureService);
12831282
}
12841283

1285-
private void searchLoadMetricsReporter(TaskExecutionTimeTrackingPerIndexEsThreadPoolExecutor executor) {
1286-
Timer timer = new Timer();
1287-
TimerTask task = new TimerTask() {
1288-
@Override
1289-
public void run() {
1290-
if (executor.getIndexExecutionTime().size() > 0) {
1291-
logger.info("Number of reported indices: {}", executor.getIndexExecutionTime().size());
1292-
logger.info("Number of runnables: {}", executor.getRunnableToIndexName().size());
1293-
executor.getIndexExecutionTime().forEach((index, tuple) -> {
1294-
logger.info("Index: {}, Total execution time: {}, EWMA: {}", index, tuple.v1().sum(), tuple.v2().getAverage());
1295-
});
1296-
logger.info("Total task execution time: {}", executor.getTotalTaskExecutionTime());
1297-
logger.info("----------------------------------------------------------------------------------");
1298-
}
1299-
}
1300-
};
1301-
1302-
timer.scheduleAtFixedRate(task, 0, 4000);
1303-
}
1304-
13051284
/**
13061285
* For each "component" (getter) <em>c</em> of a {@link Record},
13071286
* calls {@link org.elasticsearch.injection.Injector#addInstance(Object) Injector.addInstance}

0 commit comments

Comments
 (0)