From 6bf6c602b38237d93f1068e55d7b963202544712 Mon Sep 17 00:00:00 2001 From: Luke Sikina Date: Thu, 28 Dec 2023 09:32:30 -0500 Subject: [PATCH] wow we scattered this logic around, huh --- .../hms/dbmi/avillach/hpds/service/PicSureService.java | 6 ++++-- .../hms/dbmi/avillach/hpds/service/QueryService.java | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java index 66d267ed..a0606f0a 100644 --- a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java +++ b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/PicSureService.java @@ -228,7 +228,8 @@ private QueryStatus convertToQueryStatus(AsyncResult entity) { status.setStatus(entity.status.toPicSureStatus()); Map metadata = new HashMap(); - metadata.put("picsureQueryId", UUIDv5.UUIDFromString(entity.query.toString())); + queryUUIDGen.setId(entity.query); + metadata.put("picsureQueryId", entity.query.getId()); status.setResultMetadata(metadata); return status; } @@ -432,6 +433,7 @@ private Response _querySync(QueryRequest resultRequest) throws IOException { } private ResponseBuilder queryOkResponse(Object obj, Query incomingQuery) { - return Response.ok(obj).header(QUERY_METADATA_FIELD, UUIDv5.UUIDFromString(incomingQuery.toString())); + queryUUIDGen.setId(incomingQuery); + return Response.ok(obj).header(QUERY_METADATA_FIELD, incomingQuery.getId()); } } diff --git a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/QueryService.java b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/QueryService.java index 3d718943..7d3ec69f 100644 --- a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/QueryService.java +++ b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/QueryService.java @@ -126,7 +126,8 @@ private AsyncResult initializeResult(Query query) throws ClassNotFoundException, AsyncResult result = new AsyncResult(query, p.getHeaderRow(query)); result.status = AsyncResult.Status.PENDING; result.queuedTime = System.currentTimeMillis(); - result.id = UUIDv5.UUIDFromString(query.toString()).toString(); + queryUUIDGen.setId(query); + result.id = query.getId(); result.processor = p; queryUUIDGen.setId(query); results.put(result.id, result);