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/02/14 12:45:49 UTC

[GitHub] [incubator-inlong] pocozh opened a new pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

pocozh opened a new pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493


   Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.
   
   ### Title Name: [INLONG-XYZ][component] Title of the pull request
   
   where *XYZ* should be replaced by the actual issue number.
   
   Fixes #2483 
   
   ### Motivation
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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



[GitHub] [incubator-inlong] healchow commented on a change in pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

Posted by GitBox <gi...@apache.org>.
healchow commented on a change in pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493#discussion_r808665232



##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/DataProxyClusterEntityMapper.java
##########
@@ -43,4 +42,6 @@
 
     int updateByPrimaryKey(DataProxyClusterEntity record);
 
+    DataProxyClusterEntity selectByName(String proxyClusterName);

Review comment:
       Its suggested to add `proxyClusterName` into `DataProxyClusterPageRequest`.




-- 
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



[GitHub] [incubator-inlong] healchow commented on a change in pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

Posted by GitBox <gi...@apache.org>.
healchow commented on a change in pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493#discussion_r808666115



##########
File path: inlong-manager/manager-dao/src/main/resources/mappers/DataProxyPulsarMapper.xml
##########
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>

Review comment:
       Is this file still needed?

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/ClusterInfoMapper.java
##########
@@ -42,4 +43,6 @@
 
     List<ClusterInfoEntity> selectByCondition(ClusterRequest request);
 
+    List<ClusterInfoEntity> selectByMqSetName(String mqSetName);

Review comment:
       Its suggested to add `mqSetName` into `ClusterRequest`.

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/DataProxyClusterEntityMapper.java
##########
@@ -43,4 +42,6 @@
 
     int updateByPrimaryKey(DataProxyClusterEntity record);
 
+    DataProxyClusterEntity selectByName(String proxyClusterName);

Review comment:
       Its suggested to add `proxyClusterName` into `DataProxyClusterPageRequest`.




-- 
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



[GitHub] [incubator-inlong] healchow commented on a change in pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

Posted by GitBox <gi...@apache.org>.
healchow commented on a change in pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493#discussion_r807524366



##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/PulsarClusterEntity.java
##########
@@ -19,13 +19,14 @@
 
 import lombok.Data;
 
-/**
- * DataProxy config
- */
+import java.io.Serializable;
+
 @Data
-public class DataProxyConfig {
+public class PulsarClusterEntity implements Serializable {

Review comment:
       Reuse the `ClusterInfoEntity`.

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/ProxyPulsarMapEntity.java
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.dao.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ProxyPulsarMapEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private String proxyClusterName;
+    private String pulsarSetName;
+    private String inlongGroupId;

Review comment:
       Remove this field, and add `proxyClusterId` into `BusinessEntity`.

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/ProxyPulsarMapEntity.java
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.dao.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ProxyPulsarMapEntity implements Serializable {

Review comment:
       Reuse the `DataProxyClusterEntity`.

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/PulsarConfigEntity.java
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.dao.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class PulsarConfigEntity implements Serializable {

Review comment:
       Reuse the `ClusterInfoEntity`.

##########
File path: inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/ProxyPulsarMapEntity.java
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.dao.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ProxyPulsarMapEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private String proxyClusterName;
+    private String pulsarSetName;

Review comment:
       Change it to `mqSetName`.




-- 
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



[GitHub] [incubator-inlong] baomingyu commented on a change in pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

Posted by GitBox <gi...@apache.org>.
baomingyu commented on a change in pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493#discussion_r807456183



##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
##########
@@ -244,10 +270,13 @@ private void checkLocalFile() {
             }
         }
 
-        private boolean checkWithManager(String host) {
+        private boolean checkWithManager(String host, String proxyClusterName) {
             HttpGet httpGet = null;
             try {
-                String url = "http://" + host + "/api/inlong/manager/openapi/dataproxy/getConfig";
+                if (proxyClusterName == null) {

Review comment:
       use StringUtils.isEmpty()

##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/PulsarSink.java
##########
@@ -202,14 +180,14 @@ public Long load(String key) {
         /*
          * stat pulsar performance
          */
-        logger.info("PulsarPerformanceTask!!!!!!");
+        System.out.println("pulsarPerformanceTask!!!!!!");

Review comment:
       why use system.out.println way instead of logger ?

##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
##########
@@ -53,6 +54,8 @@
             new PropertiesConfigHolder("common.properties");
     private final PropertiesConfigHolder topicConfig =
             new PropertiesConfigHolder("topics.properties");
+    private final MxPropertiesHolder pulsarUrl2token =

Review comment:
       why use MxProoertiesHolder




-- 
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



[GitHub] [incubator-inlong] dockerzhang merged pull request #2493: [INLONG-2483] Manager provide metadata interface to Dataproxy, and Dataproxy dynamically get metadata and MQ config from Manager.

Posted by GitBox <gi...@apache.org>.
dockerzhang merged pull request #2493:
URL: https://github.com/apache/incubator-inlong/pull/2493


   


-- 
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