From 683e4fb1dce36417902a2cdc68b89ab56cb45879 Mon Sep 17 00:00:00 2001 From: hecy7 Date: Fri, 11 Aug 2023 12:35:57 +0800 Subject: [PATCH] bugfix to caseId-handle on 2.1.6 Signed-off-by: hecy7 --- .../ai/fate/serving/core/bean/BatchHostFederatedParams.java | 5 ----- .../ai/fate/serving/core/bean/BatchInferenceRequest.java | 4 ---- .../webank/ai/fate/serving/core/bean/InferenceRequest.java | 2 +- .../java/com/webank/ai/fate/serving/core/bean/Request.java | 2 +- .../guest/interceptors/GuestBatchParamInterceptor.java | 4 ++-- .../guest/interceptors/GuestSingleParamInterceptor.java | 4 ++-- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchHostFederatedParams.java b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchHostFederatedParams.java index d9ba07b7e..f53c403fb 100644 --- a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchHostFederatedParams.java +++ b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchHostFederatedParams.java @@ -56,11 +56,6 @@ public void setHostPartyId(String hostPartyId) { this.hostPartyId = hostPartyId; } - @Override - public String getCaseId() { - return caseId; - } - @Override public void setCaseId(String caseId) { this.caseId = caseId; diff --git a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchInferenceRequest.java b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchInferenceRequest.java index c8d257600..3092c6f1d 100644 --- a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchInferenceRequest.java +++ b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/BatchInferenceRequest.java @@ -35,10 +35,6 @@ public void setBatchDataList(List batchDataList) { this.batchDataList = batchDataList; } - public String getCaseId() { - return caseId; - } - @Override public void setCaseId(String caseId) { this.caseId = caseId; diff --git a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/InferenceRequest.java b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/InferenceRequest.java index e6b25d8e0..6e574462a 100644 --- a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/InferenceRequest.java +++ b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/InferenceRequest.java @@ -91,7 +91,7 @@ public void setAppid(String appid) { } @Override - public String getCaseid() { + public String getCaseId() { return caseId; } diff --git a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/Request.java b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/Request.java index 9647aa596..1f0c30037 100644 --- a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/Request.java +++ b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/Request.java @@ -24,7 +24,7 @@ public interface Request { public String getAppid(); - public String getCaseid(); + public String getCaseId(); public String getPartyId(); diff --git a/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestBatchParamInterceptor.java b/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestBatchParamInterceptor.java index 1e076a2c6..d3bece7ff 100644 --- a/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestBatchParamInterceptor.java +++ b/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestBatchParamInterceptor.java @@ -45,10 +45,10 @@ public void doPreProcess(Context context, InboundPackage inboundPackage, Outboun inboundPackage.setBody(batchInferenceRequest); Preconditions.checkArgument(batchInferenceRequest != null, "request message parse error"); Preconditions.checkArgument(StringUtils.isNotBlank(batchInferenceRequest.getServiceId()), "no service id"); - if (batchInferenceRequest.getCaseid() == null || batchInferenceRequest.getCaseid().length() == 0) { + if (batchInferenceRequest.getCaseId() == null || batchInferenceRequest.getCaseId().length() == 0) { batchInferenceRequest.setCaseId(InferenceUtils.generateCaseid()); } - context.setCaseId(batchInferenceRequest.getCaseid()); + context.setCaseId(batchInferenceRequest.getCaseId()); context.setServiceId(batchInferenceRequest.getServiceId()); if (batchInferenceRequest.getApplyId() != null) { context.setApplyId(batchInferenceRequest.getApplyId()); diff --git a/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestSingleParamInterceptor.java b/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestSingleParamInterceptor.java index 975697d63..1346d395b 100644 --- a/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestSingleParamInterceptor.java +++ b/fate-serving-server/src/main/java/com/webank/ai/fate/serving/guest/interceptors/GuestSingleParamInterceptor.java @@ -43,10 +43,10 @@ public void doPreProcess(Context context, InboundPackage inboundPackage, Outboun Preconditions.checkArgument(inferenceRequest.getFeatureData() != null, "no feature data"); Preconditions.checkArgument(inferenceRequest.getSendToRemoteFeatureData() != null, "no send to remote feature data"); Preconditions.checkArgument(StringUtils.isNotBlank(inferenceRequest.getServiceId()), "no service id"); - if (inferenceRequest.getCaseid() == null || inferenceRequest.getCaseid().length() == 0) { + if (inferenceRequest.getCaseId() == null || inferenceRequest.getCaseId().length() == 0) { inferenceRequest.setCaseId(InferenceUtils.generateCaseid()); } - context.setCaseId(inferenceRequest.getCaseid()); + context.setCaseId(inferenceRequest.getCaseId()); context.setServiceId(inferenceRequest.getServiceId()); if (inferenceRequest.getApplyId() != null) { context.setApplyId(inferenceRequest.getApplyId());