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/03/06 07:13:05 UTC

[GitHub] [incubator-inlong] healchow opened a new pull request #2943: [INLONG-2912][Manager] Add fields for the binlog task

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


   ### Title Name: [INLONG-2912][Manager] Add fields for the binlog task
   
   Fixes #2912 
   
   ### Motivation
   
   Add fields for the binlog task.
   
   ### Verifying this change
   
   - [X] Make sure that the change passes the CI checks.
   


-- 
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 #2943: [INLONG-2912][Manager] Add fields for the binlog task

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



##########
File path: inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
##########
@@ -176,13 +176,25 @@ private TaskResult getTaskResult(TaskRequest request) {
         List<DataConfig> dataConfigs = Lists.newArrayList();
         List<StreamSourceEntity> entityList = sourceMapper.selectByIpAndUuid(agentIp, uuid);
         for (StreamSourceEntity entity : entityList) {
+            // Change 20x to 30x
+            int id = entity.getId();
+            int status = entity.getStatus();
+            int op = status % 100;

Review comment:
       Fixed.




-- 
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 merged pull request #2943: [INLONG-2912][Manager] Add fields for the binlog task

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


   


-- 
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] EMsnap commented on a change in pull request #2943: [INLONG-2912][Manager] Add fields for the binlog task

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



##########
File path: inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongStreamSourceTransfer.java
##########
@@ -160,23 +178,27 @@ private static KafkaSourceRequest createKafkaSourceRequest(KafkaSource kafkaSour
 
     private static BinlogSourceRequest createBinlogSourceRequest(MySQLBinlogSource binlogSource,
             InlongStreamInfo streamInfo) {
-        BinlogSourceRequest binlogSourceRequest = new BinlogSourceRequest();
-        binlogSourceRequest.setSourceName(binlogSource.getSourceName());
-        binlogSourceRequest.setInlongGroupId(streamInfo.getInlongGroupId());
-        binlogSourceRequest.setInlongStreamId(streamInfo.getInlongStreamId());
-        binlogSourceRequest.setSourceType(binlogSource.getSourceType().name());
+        BinlogSourceRequest sourceRequest = new BinlogSourceRequest();

Review comment:
       Use builder might be better 

##########
File path: inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
##########
@@ -176,13 +176,25 @@ private TaskResult getTaskResult(TaskRequest request) {
         List<DataConfig> dataConfigs = Lists.newArrayList();
         List<StreamSourceEntity> entityList = sourceMapper.selectByIpAndUuid(agentIp, uuid);
         for (StreamSourceEntity entity : entityList) {
+            // Change 20x to 30x
+            int id = entity.getId();
+            int status = entity.getStatus();
+            int op = status % 100;

Review comment:
       magic num




-- 
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 #2943: [INLONG-2912][Manager] Add fields for the binlog task

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



##########
File path: inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongStreamSourceTransfer.java
##########
@@ -160,23 +178,27 @@ private static KafkaSourceRequest createKafkaSourceRequest(KafkaSource kafkaSour
 
     private static BinlogSourceRequest createBinlogSourceRequest(MySQLBinlogSource binlogSource,
             InlongStreamInfo streamInfo) {
-        BinlogSourceRequest binlogSourceRequest = new BinlogSourceRequest();
-        binlogSourceRequest.setSourceName(binlogSource.getSourceName());
-        binlogSourceRequest.setInlongGroupId(streamInfo.getInlongGroupId());
-        binlogSourceRequest.setInlongStreamId(streamInfo.getInlongStreamId());
-        binlogSourceRequest.setSourceType(binlogSource.getSourceType().name());
+        BinlogSourceRequest sourceRequest = new BinlogSourceRequest();

Review comment:
       Because the request is a subclass, to use the builder, you need to write the construction method of all the parameters and modify the parent class, which does not conform to the open-closed principle.




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