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:44:48 UTC

[GitHub] [incubator-inlong] EMsnap commented on a change in pull request #2943: [INLONG-2912][Manager] Add fields for the binlog task

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