Skip to content

Commit

Permalink
[zeta][telemetry] fix job thread metrics bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-up authored and TyrantLucifer committed Aug 9, 2023
1 parent 284dd33 commit d307fea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.seatunnel.engine.server.execution.TaskGroupLocation;
import org.apache.seatunnel.engine.server.service.slot.DefaultSlotService;
import org.apache.seatunnel.engine.server.service.slot.SlotService;
import org.apache.seatunnel.engine.server.telemetry.metrics.entity.ThreadPoolStatus;

import com.hazelcast.internal.services.ManagedService;
import com.hazelcast.internal.services.MembershipAwareService;
Expand Down Expand Up @@ -253,4 +254,8 @@ private void printExecutionInfo() {
coordinatorService.printJobDetailInfo();
}
}

public ThreadPoolStatus getThreadPoolStatusMetrics() {
return coordinatorService.getThreadPoolStatusMetrics();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.seatunnel.engine.server.telemetry.metrics.exports;

import org.apache.seatunnel.engine.server.CoordinatorService;
import org.apache.seatunnel.engine.server.telemetry.metrics.AbstractCollector;
import org.apache.seatunnel.engine.server.telemetry.metrics.entity.ThreadPoolStatus;

Expand All @@ -40,11 +39,10 @@ public JobThreadPoolStatusExports(Node node) {
@Override
public List<MetricFamilySamples> collect() {
List<MetricFamilySamples> mfs = new ArrayList();
CoordinatorService coordinatorService = getCoordinatorService();

List<String> labelValues = labelValues(localAddress());

ThreadPoolStatus threadPoolStatusMetrics = coordinatorService.getThreadPoolStatusMetrics();
ThreadPoolStatus threadPoolStatusMetrics = getServer().getThreadPoolStatusMetrics();
List<String> labelNames = clusterLabelNames(ADDRESS);

GaugeMetricFamily activeCount =
Expand Down

0 comments on commit d307fea

Please sign in to comment.