You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/17 03:00:30 UTC

[GitHub] [incubator-inlong] kipshi commented on a diff in pull request #4681: [INLONG-4674][Manager] Refactor the client by using the Retrofit framework

kipshi commented on code in PR #4681:
URL: https://github.com/apache/incubator-inlong/pull/4681#discussion_r899722556


##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/InnerInlongManagerClient.java:
##########
@@ -56,40 +58,57 @@
 import org.apache.inlong.manager.common.pojo.workflow.form.NewGroupProcessForm;
 import org.apache.inlong.manager.common.util.AssertUtils;
 import org.apache.inlong.manager.common.util.JsonUtils;
+import retrofit2.Call;
+import retrofit2.Retrofit;
+import retrofit2.converter.jackson.JacksonConverterFactory;
 
+import java.io.IOException;
 import java.util.List;
+import java.util.Map;
 
 /**
  * InnerInlongManagerClient is used to invoke http api of inlong manager.
  */
 @Slf4j
 public class InnerInlongManagerClient {
 
-    protected static final String HTTP_PATH = "api/inlong/manager";
-    private static final MediaType APPLICATION_JSON = MediaType.parse("application/json; charset=utf-8");
-    protected final OkHttpClient httpClient;
-    protected final String host;
-    protected final int port;
-    protected final String uname;
-    protected final String passwd;
     private final ObjectMapper objectMapper = new ObjectMapper();
 
+    private final InlongStreamApi inlongStreamApi;
+    private final InlongGroupApi inlongGroupApi;
+    private final StreamSourceApi streamSourceApi;
+    private final StreamTransformApi streamTransformApi;
+    private final StreamSinkApi streamSinkApi;
+    private final WorkflowApi workflowApi;
+
     public InnerInlongManagerClient(ClientConfiguration configuration) {
-        this.host = configuration.getBindHost();

Review Comment:
   serviceUrl can be set as host1:port1,host2:port2,   so host, port is needed here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org