use of com.dtstack.taier.pluginapi.CustomThreadFactory in project Taier by DTStack.
the class SessionClientFactory method startYarnSessionClientMonitor.
private void startYarnSessionClientMonitor() {
String threadName = String.format("%s-%s", sessionAppNameSuffix, "flink_yarn_monitor");
LOG.warn("ThreadName : [{}] start a yarn session client monitor [{}].", Thread.currentThread().getName(), threadName);
yarnMonitorES = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), new CustomThreadFactory(threadName));
// 启动守护线程---用于获取当前application状态和更新flink对应的application
yarnMonitorES.submit(new AppStatusMonitor(flinkClientBuilder, this));
}
use of com.dtstack.taier.pluginapi.CustomThreadFactory in project Taier by DTStack.
the class AcceptedApplicationMonitor method start.
public static void start(YarnConfiguration yarnConf, String queueName, BaseConfig config) {
AcceptedApplicationMonitor monitor = new AcceptedApplicationMonitor();
monitor.queueName = queueName;
monitor.yarnConf = yarnConf;
monitor.config = config;
String namePrefix = monitor.getClass().getSimpleName() + SPLIT + queueName;
scheduledService = new ScheduledThreadPoolExecutor(1, new CustomThreadFactory(namePrefix));
scheduledService.scheduleWithFixedDelay(monitor, 0, INTERVAL, TimeUnit.MILLISECONDS);
}
Aggregations