Skip to content

Commit

Permalink
[apache#1686] feat(netty): Support pending tasks number metrics for N…
Browse files Browse the repository at this point in the history
…etty EventLoopGroup
  • Loading branch information
rickyma committed May 9, 2024
1 parent a057f2e commit c11dee7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public class StreamServer implements ServerInterface {
private ShuffleServerConf shuffleServerConf;
private ChannelFuture channelFuture;

private final ScheduledExecutorService nettyPendingTasksTracker =
private final ScheduledExecutorService nettyPendingTasksNumTracker =
Executors.newSingleThreadScheduledExecutor(
ThreadUtils.getThreadFactory("NettyPendingTasksTracker"));
ThreadUtils.getThreadFactory("NettyPendingTasksNumTracker"));
/** Interval to poll for Netty pending tasks number for Netty metrics, in milliseconds */
private final long pendingTasksNumMetricsPollingInterval;

Expand Down Expand Up @@ -98,7 +98,7 @@ public StreamServer(ShuffleServer shuffleServer) {
}

private void startMonitoringPendingTasks() {
nettyPendingTasksTracker.scheduleAtFixedRate(
nettyPendingTasksNumTracker.scheduleAtFixedRate(
() -> {
int pendingTasksNumForBossGroup = getPendingTasksForEventLoopGroup(shuffleBossGroup);
shuffleServer
Expand Down Expand Up @@ -219,8 +219,8 @@ public void stop() {
shuffleBossGroup = null;
shuffleWorkerGroup = null;
}
if (!nettyPendingTasksTracker.isShutdown()) {
nettyPendingTasksTracker.shutdown();
if (!nettyPendingTasksNumTracker.isShutdown()) {
nettyPendingTasksNumTracker.shutdown();
}
}

Expand Down

0 comments on commit c11dee7

Please sign in to comment.