2 Commits

Author SHA1 Message Date
65f9026922 학습서버배포정보 수정 2026-03-06 16:02:18 +09:00
9b79f31d7b 줄맞춤 2026-03-06 16:01:28 +09:00
2 changed files with 11 additions and 10 deletions

View File

@@ -147,7 +147,7 @@ public class GeoJsonValidator {
Set<String> foundUnique = new HashSet<>(); Set<String> foundUnique = new HashSet<>();
// 중복된 scene_id 목록 (샘플 로그 출력용이라 순서 유지 가능한 LinkedHashSet 사용) // 중복된 scene_id 목록 (샘플 로그 출력용이라 순서 유지 가능한 LinkedHashSet 사용)
Set<String> duplicates = new LinkedHashSet<>(); // Set<String> duplicates = new LinkedHashSet<>();
// scene_id가 null 또는 blank인 feature의 개수 (데이터 이상) // scene_id가 null 또는 blank인 feature의 개수 (데이터 이상)
int nullIdCount = 0; int nullIdCount = 0;
@@ -179,9 +179,9 @@ public class GeoJsonValidator {
} }
// foundUnique.add(sceneId)가 false면 "이미 같은 값이 있었다"는 뜻 => 중복 // foundUnique.add(sceneId)가 false면 "이미 같은 값이 있었다"는 뜻 => 중복
if (!foundUnique.add(sceneId)) { // if (!foundUnique.add(sceneId)) {
duplicates.add(sceneId); // duplicates.add(sceneId);
} // }
} }
// ========================================================= // =========================================================
@@ -225,13 +225,13 @@ public class GeoJsonValidator {
requested.size(), // 요청 도엽 유니크 수 requested.size(), // 요청 도엽 유니크 수
foundUnique.size(), // GeoJSON에서 발견된 scene_id 유니크 수 foundUnique.size(), // GeoJSON에서 발견된 scene_id 유니크 수
nullIdCount, // scene_id가 비어있는 feature 수 nullIdCount, // scene_id가 비어있는 feature 수
duplicates.size(), // 중복 scene_id 종류 수 0, // 중복 scene_id 종류 수
missing.size(), // 요청했지만 빠진 도엽 수 missing.size(), // 요청했지만 빠진 도엽 수
extra.size()); // 요청하지 않았는데 들어온 도엽 수 extra.size()); // 요청하지 않았는데 들어온 도엽 수
// 중복/누락/추가 항목은 전체를 다 찍으면 로그 폭발하므로 샘플만 // 중복/누락/추가 항목은 전체를 다 찍으면 로그 폭발하므로 샘플만
if (!duplicates.isEmpty()) // if (!duplicates.isEmpty())
log.warn("duplicates sample: {}", duplicates.stream().limit(20).toList()); // log.warn("duplicates sample: {}", duplicates.stream().limit(20).toList());
if (!missing.isEmpty()) log.warn("missing sample: {}", missing.stream().limit(50).toList()); if (!missing.isEmpty()) log.warn("missing sample: {}", missing.stream().limit(50).toList());
@@ -250,12 +250,12 @@ public class GeoJsonValidator {
// - 요청 문법은 맞지만(파일은 있고 JSON도 읽힘), // - 요청 문법은 맞지만(파일은 있고 JSON도 읽힘),
// 내용(정합성)이 요구사항을 만족하지 못하는 경우에 적합. // 내용(정합성)이 요구사항을 만족하지 못하는 경우에 적합.
// ========================================================= // =========================================================
if (!missing.isEmpty() || !extra.isEmpty() || !duplicates.isEmpty() || nullIdCount > 0) { if (!missing.isEmpty() || !extra.isEmpty() || nullIdCount > 0) {
throw new ResponseStatusException( throw new ResponseStatusException(
HttpStatus.UNPROCESSABLE_ENTITY, HttpStatus.UNPROCESSABLE_ENTITY,
String.format( String.format(
"GeoJSON validation failed: missing=%d, extra=%d, duplicates=%d, nullId=%d", "GeoJSON validation failed: missing=%d, extra=%d, duplicates=%d, nullId=%d",
missing.size(), extra.size(), duplicates.size(), nullIdCount)); missing.size(), extra.size(), 0, nullIdCount));
} }
// 모든 조건을 통과하면 정상 // 모든 조건을 통과하면 정상

View File

@@ -28,7 +28,8 @@ public class ExternalJarRunner {
* @param mode * @param mode
* <p>MERGED - batch-ids 에 해당하는 **모든 데이터를 하나의 Shapefile로 병합 생성, * <p>MERGED - batch-ids 에 해당하는 **모든 데이터를 하나의 Shapefile로 병합 생성,
* <p>MAP_IDS - 명시적으로 전달한 map-ids만 대상으로 Shapefile 생성, * <p>MAP_IDS - 명시적으로 전달한 map-ids만 대상으로 Shapefile 생성,
* <p>RESOLVE - batch-ids 기준으로 **JAR 내부에서 map_ids를 조회**한 뒤 Shapefile 생성 * <p>RESOLVE - batch-ids 기준으로 **JAR 내부에서 map_ids를 조회**한 뒤 Shapefile 생성 java -jar
* build/libs/shp-exporter.jar --spring.profiles.active=prod
*/ */
public void run(String jarPath, String batchIds, String inferenceId, String mapIds, String mode) { public void run(String jarPath, String batchIds, String inferenceId, String mapIds, String mode) {
List<String> args = new ArrayList<>(); List<String> args = new ArrayList<>();