refactor(info-query): 优化参数
This commit is contained in:
@@ -3,21 +3,22 @@ package com.lanyuanxiaoyao.service.configuration.entity.info;
|
||||
import com.eshore.odcp.hudi.connector.entity.FlinkJob;
|
||||
import com.eshore.odcp.hudi.connector.entity.TableMeta;
|
||||
import java.util.List;
|
||||
import org.eclipse.collections.api.list.ImmutableList;
|
||||
|
||||
/**
|
||||
* flink job 和 table meta
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2023-04-24
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
public class JobAndMetas {
|
||||
private FlinkJob job;
|
||||
private List<TableMeta> metas;
|
||||
private ImmutableList<TableMeta> metas;
|
||||
|
||||
public JobAndMetas() {
|
||||
}
|
||||
|
||||
public JobAndMetas(FlinkJob job, List<TableMeta> metas) {
|
||||
public JobAndMetas(FlinkJob job, ImmutableList<TableMeta> metas) {
|
||||
this.job = job;
|
||||
this.metas = metas;
|
||||
}
|
||||
@@ -26,7 +27,7 @@ public class JobAndMetas {
|
||||
return job;
|
||||
}
|
||||
|
||||
public List<TableMeta> getMetas() {
|
||||
public ImmutableList<TableMeta> getMetas() {
|
||||
return metas;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ public class InfoService {
|
||||
@Cacheable(value = "job-metas", sync = true)
|
||||
@Retryable(Throwable.class)
|
||||
public ImmutableList<JobAndMetas> jobAndMetas() {
|
||||
return databaseService.findAllFlinkJob().collect(job -> new JobAndMetas(job, databaseService.findTableMeta(job.getId()).toList()));
|
||||
return databaseService.findAllFlinkJob().collect(job -> new JobAndMetas(job, databaseService.findTableMeta(job.getId())));
|
||||
}
|
||||
|
||||
@Cacheable(value = "flink-jobs", sync = true)
|
||||
|
||||
Reference in New Issue
Block a user