From bfdc771721a42c5ddcee03a013daf8e837c51445 Mon Sep 17 00:00:00 2001 From: kaideng Date: Tue, 20 Apr 2021 20:30:37 +0800 Subject: [PATCH 1/2] add applyId to admin ui --- .../admin/services/provider/ValidateServiceProvider.java | 3 +++ .../ai/fate/serving/core/bean/GrpcConnectionPool.java | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java b/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java index 9a08b3243..a023bb106 100644 --- a/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java +++ b/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java @@ -119,6 +119,9 @@ public Object inference(Context context, InboundPackage data) throws Exception { if (StringUtils.isNotBlank(serviceId)) { inferenceRequest.setServiceId(serviceId); } + if(params.get("serviceId")!=null){ + inferenceRequest.setApplyId(params.get("serviceId").toString()); + } for (Map.Entry entry : featureData.entrySet()) { inferenceRequest.getFeatureData().put(entry.getKey(), entry.getValue()); diff --git a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/GrpcConnectionPool.java b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/GrpcConnectionPool.java index 914342d05..3b7741d24 100644 --- a/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/GrpcConnectionPool.java +++ b/fate-serving-core/src/main/java/com/webank/ai/fate/serving/core/bean/GrpcConnectionPool.java @@ -219,12 +219,11 @@ public synchronized ManagedChannel createManagedChannel(String ip, int port, Net } else { channelBuilder.usePlaintext(); } - return channelBuilder.build(); - } catch (SSLException e) { - throw new SecurityException(e); - } catch (Exception e) { - e.printStackTrace(); + } + catch (Exception e) { + logger.error("create channel error : " ,e); + //e.printStackTrace(); } return null; } From d218d37d74ae04c3a3e575f261a999168885692e Mon Sep 17 00:00:00 2001 From: kaideng Date: Tue, 20 Apr 2021 20:33:43 +0800 Subject: [PATCH 2/2] add applyId --- .../admin/services/provider/ValidateServiceProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java b/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java index a023bb106..8cfdf96d7 100644 --- a/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java +++ b/fate-serving-admin/src/main/java/com/webank/ai/fate/serving/admin/services/provider/ValidateServiceProvider.java @@ -119,8 +119,8 @@ public Object inference(Context context, InboundPackage data) throws Exception { if (StringUtils.isNotBlank(serviceId)) { inferenceRequest.setServiceId(serviceId); } - if(params.get("serviceId")!=null){ - inferenceRequest.setApplyId(params.get("serviceId").toString()); + if(params.get("applyId")!=null){ + inferenceRequest.setApplyId(params.get("applyId").toString()); } for (Map.Entry entry : featureData.entrySet()) {