|
11 | 11 |
|
12 | 12 | import org.apache.logging.log4j.LogManager;
|
13 | 13 | import org.apache.logging.log4j.Logger;
|
14 |
| -import org.elasticsearch.action.ActionListener; |
15 | 14 | import org.elasticsearch.action.ActionType;
|
16 | 15 | import org.elasticsearch.action.FailedNodeException;
|
17 | 16 | import org.elasticsearch.action.support.ActionFilters;
|
@@ -46,8 +45,9 @@ public class TransportNodeUsageStatsForThreadPoolsAction extends TransportNodesA
|
46 | 45 |
|
47 | 46 | private static final Logger logger = LogManager.getLogger(TransportNodeUsageStatsForThreadPoolsAction.class);
|
48 | 47 |
|
49 |
| - public static final ActionType<NodeUsageStatsForThreadPoolsAction.Response> TYPE = |
50 |
| - new ActionType<>(NodeUsageStatsForThreadPoolsAction.NAME); |
| 48 | + public static final ActionType<NodeUsageStatsForThreadPoolsAction.Response> TYPE = new ActionType<>( |
| 49 | + NodeUsageStatsForThreadPoolsAction.NAME |
| 50 | + ); |
51 | 51 |
|
52 | 52 | private final ThreadPool threadPool;
|
53 | 53 | private final ClusterService clusterService;
|
@@ -107,13 +107,16 @@ protected NodeUsageStatsForThreadPoolsAction.NodeResponse nodeOperation(
|
107 | 107 | ThreadPoolUsageStats threadPoolUsageStats = new ThreadPoolUsageStats(
|
108 | 108 | trackingForWriteExecutor.getMaximumPoolSize(),
|
109 | 109 | (float) trackingForWriteExecutor.pollUtilization(
|
110 |
| - TaskExecutionTimeTrackingEsThreadPoolExecutor.UtilizationTrackingPurpose.ALLOCATION), |
| 110 | + TaskExecutionTimeTrackingEsThreadPoolExecutor.UtilizationTrackingPurpose.ALLOCATION |
| 111 | + ), |
111 | 112 | trackingForWriteExecutor.getMaxQueueLatencyMillisSinceLastPollAndReset()
|
112 | 113 | );
|
113 | 114 |
|
114 | 115 | Map<String, ThreadPoolUsageStats> perThreadPool = new HashMap<>();
|
115 | 116 | perThreadPool.put(ThreadPool.Names.WRITE, threadPoolUsageStats);
|
116 | 117 | return new NodeUsageStatsForThreadPoolsAction.NodeResponse(
|
117 |
| - localNode, new NodeUsageStatsForThreadPools(ThreadPool.Names.WRITE, perThreadPool)); |
| 118 | + localNode, |
| 119 | + new NodeUsageStatsForThreadPools(ThreadPool.Names.WRITE, perThreadPool) |
| 120 | + ); |
118 | 121 | }
|
119 | 122 | }
|
0 commit comments