From 457e3334eba5d413546a21529814b1d7075bd781 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Tue, 5 Jul 2022 18:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E5=BA=8F=E5=9B=BE=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- design_com.puml | 13 +++++++++---- design_main_1.puml | 5 +++++ .../com/yuandian/dataflow/grpc/CollectPackets.java | 7 +------ 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 design_main_1.puml diff --git a/design_com.puml b/design_com.puml index 2abd880..d817116 100644 --- a/design_com.puml +++ b/design_com.puml @@ -8,10 +8,15 @@ package "探针组" { } node "数据流" { - grpc1 --> [数据流1] - grpc2 --> [数据流2] - grpc3 --> [数据流3] - grpc4 --> [数据流4] + grpc1 --> [数据流master] + grpc2 --> [数据流master] + grpc3 --> [数据流master] + grpc4 --> [数据流master] + + [数据流master] --> [数据流master] + [数据流master] --> [数据流slave1] + [数据流master] --> [数据流slave2] + [数据流master] --> [数据流slave3] } node "配置中心" { diff --git a/design_main_1.puml b/design_main_1.puml new file mode 100644 index 0000000..67ea067 --- /dev/null +++ b/design_main_1.puml @@ -0,0 +1,5 @@ +@startuml 细节图 + + + +@enduml \ No newline at end of file diff --git a/src/main/java/com/yuandian/dataflow/grpc/CollectPackets.java b/src/main/java/com/yuandian/dataflow/grpc/CollectPackets.java index 9967ad7..dd41e53 100644 --- a/src/main/java/com/yuandian/dataflow/grpc/CollectPackets.java +++ b/src/main/java/com/yuandian/dataflow/grpc/CollectPackets.java @@ -111,11 +111,6 @@ public class CollectPackets extends CollectPacketsServerImplBase { }); - - - - - // private final ManagedChannelBuilder managedChannelBuilder; // private final CollectPacketsServerStub blockingStub; @@ -131,7 +126,7 @@ public class CollectPackets extends CollectPacketsServerImplBase { // MyThing.Response response = blockingStub.sayHi(request); // System.out.println(response.getName()); // } - var managedChannelBuilder = ManagedChannelBuilder.forAddress("10.1.1.117", 60010); + var managedChannelBuilder = ManagedChannelBuilder.forAddress("10.1.1.117", 60017); var channel = managedChannelBuilder.usePlaintext().build(); var stub = CollectPacketsServerGrpc.newBlockingStub(channel); // stub.withCompression("snappy");