soptless 적용
This commit is contained in:
@@ -85,7 +85,6 @@ public class InferenceResultService {
|
|||||||
@Value("${inference.inference-server-name}")
|
@Value("${inference.inference-server-name}")
|
||||||
private String inferenceServerName;
|
private String inferenceServerName;
|
||||||
|
|
||||||
|
|
||||||
@Value("${file.dataset-dir}")
|
@Value("${file.dataset-dir}")
|
||||||
private String datasetDir;
|
private String datasetDir;
|
||||||
|
|
||||||
@@ -522,13 +521,13 @@ public class InferenceResultService {
|
|||||||
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
||||||
|
|
||||||
String[] serverNames = inferenceServerName.split(",");
|
String[] serverNames = inferenceServerName.split(",");
|
||||||
int serveCnt = serverNames.length;
|
int serveCnt = serverNames.length;
|
||||||
|
|
||||||
List<InferenceServerStatusDto> dtoList =
|
List<InferenceServerStatusDto> dtoList =
|
||||||
inferenceResultCoreService.getInferenceServerStatusList();
|
inferenceResultCoreService.getInferenceServerStatusList();
|
||||||
int size = dtoList.size();
|
int size = dtoList.size();
|
||||||
|
|
||||||
List<InferenceServerStatusDto> serverStatusList = new ArrayList<>();
|
List<InferenceServerStatusDto> serverStatusList = new ArrayList<>();
|
||||||
|
|
||||||
System.out.println("size =" + size);
|
System.out.println("size =" + size);
|
||||||
|
|
||||||
@@ -550,9 +549,8 @@ public class InferenceResultService {
|
|||||||
String srvNm = serverNames[k];
|
String srvNm = serverNames[k];
|
||||||
String srvNmChk = "N";
|
String srvNmChk = "N";
|
||||||
|
|
||||||
Optional<InferenceServerStatusDto> matchingDto = dtoList.stream()
|
Optional<InferenceServerStatusDto> matchingDto =
|
||||||
.filter(dto -> srvNm.equals(dto.getServerName()))
|
dtoList.stream().filter(dto -> srvNm.equals(dto.getServerName())).findFirst();
|
||||||
.findFirst();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int serverChekcCnt =
|
int serverChekcCnt =
|
||||||
@@ -569,14 +567,10 @@ public class InferenceResultService {
|
|||||||
dto.setKbmemused(0L);
|
dto.setKbmemused(0L);
|
||||||
dto.setGpuUtil(0);
|
dto.setGpuUtil(0);
|
||||||
serverStatusList.add(dto);
|
serverStatusList.add(dto);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
serverStatusList.add(matchingDto.get());
|
serverStatusList.add(matchingDto.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
serverStatusList.sort(Comparator.comparing(InferenceServerStatusDto::getServerName));
|
serverStatusList.sort(Comparator.comparing(InferenceServerStatusDto::getServerName));
|
||||||
|
|||||||
@@ -152,8 +152,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
systemMetricEntity.cpuSystem,
|
systemMetricEntity.cpuSystem,
|
||||||
systemMetricEntity.memused,
|
systemMetricEntity.memused,
|
||||||
systemMetricEntity.kbmemused,
|
systemMetricEntity.kbmemused,
|
||||||
gpuMetricEntity.gpuUtil
|
gpuMetricEntity.gpuUtil))
|
||||||
))
|
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.leftJoin(gpuMetricEntity)
|
.leftJoin(gpuMetricEntity)
|
||||||
.on(
|
.on(
|
||||||
@@ -161,9 +160,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
.timestamp
|
.timestamp
|
||||||
.in(latestGpuIds)
|
.in(latestGpuIds)
|
||||||
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
||||||
.where(systemMetricEntity.timestamp.in(latestIds)
|
.where(
|
||||||
//.and(systemMetricEntity.serverName.ne("server2"))
|
systemMetricEntity.timestamp.in(latestIds)
|
||||||
) // In 절 사용
|
// .and(systemMetricEntity.serverName.ne("server2"))
|
||||||
|
) // In 절 사용
|
||||||
.orderBy(systemMetricEntity.serverName.asc())
|
.orderBy(systemMetricEntity.serverName.asc())
|
||||||
.limit(4)
|
.limit(4)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ inference:
|
|||||||
batch-url: http://10.100.0.11:8000/batches
|
batch-url: http://10.100.0.11:8000/batches
|
||||||
geojson-dir: /kamco-nfs/requests/
|
geojson-dir: /kamco-nfs/requests/
|
||||||
jar-path: /kamco-nfs/dataset/shp_exporter-1.0.0.jar
|
jar-path: /kamco-nfs/dataset/shp_exporter-1.0.0.jar
|
||||||
|
inference-server-name: server1,server2,server3,server4
|
||||||
|
|
||||||
gukyuin:
|
gukyuin:
|
||||||
#url: http://localhost:8080
|
#url: http://localhost:8080
|
||||||
|
|||||||
Reference in New Issue
Block a user