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/07/27 04:52:47 UTC

[GitHub] [inlong] healchow opened a new pull request, #5230: [INLONG-5224][Agent][DataProxy] Remove unused StreamConfigLog related classes

healchow opened a new pull request, #5230:
URL: https://github.com/apache/inlong/pull/5230

   ### Prepare a Pull Request
   
   - Fixes #5224
   
   ### Motivation
   
   Remove unused StreamConfigLog related classes.
   
   ### Verifying this change
   
   - [x] This change is a trivial rework/code cleanup without any test coverage.
   


-- 
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] [inlong] healchow commented on a diff in pull request #5230: [INLONG-5224][Agent][DataProxy] Remove unused StreamConfigLog related classes

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5230:
URL: https://github.com/apache/inlong/pull/5230#discussion_r930909274


##########
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/BinlogReader.java:
##########
@@ -150,84 +141,54 @@ public void init(JobProfile jobConf) {
         offsetFlushIntervalMs = jobConf.get(JOB_DATABASE_STORE_OFFSET_INTERVAL_MS, "100000");
         databaseStoreHistoryName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
                 tryToInitAndGetHistoryPath()) + "/history.dat" + jobConf.getInstanceId();
-        offsetStoreFileName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
-                tryToInitAndGetHistoryPath()) + "/offset.dat" + jobConf.getInstanceId();
+
         snapshotMode = jobConf.get(JOB_DATABASE_SNAPSHOT_MODE, "");
         includeSchemaChanges = jobConf.get(JOB_DATABASE_INCLUDE_SCHEMA_CHANGES, "false");
         historyMonitorDdl = jobConf.get(JOB_DATABASE_HISTORY_MONITOR_DDL, "false");
         binlogMessagesQueue = new LinkedBlockingQueue<>(jobConf.getInt(JOB_DATABASE_QUEUE_SIZE, 1000));
         instanceId = jobConf.getInstanceId();
         finished = false;
 
-        offset = jobConf.get(JOB_DATABASE_OFFSETS, "");
         specificOffsetFile = jobConf.get(JOB_DATABASE_OFFSET_SPECIFIC_OFFSET_FILE, "");
         specificOffsetPos = jobConf.get(JOB_DATABASE_OFFSET_SPECIFIC_OFFSET_POS, "-1");
+
+        offsetStoreFileName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
+                tryToInitAndGetHistoryPath()) + "/offset.dat" + jobConf.getInstanceId();
         binlogSnapshot = new BinlogSnapshotBase(offsetStoreFileName);
+        String offset = jobConf.get(JOB_DATABASE_OFFSETS, "");
         binlogSnapshot.save(offset);
 
-        enableReportConfigLog =
-                Boolean.parseBoolean(jobConf.get(StreamConfigLogMetric.CONFIG_LOG_REPORT_ENABLE,
-                        "true"));
-
-        inlongGroupId = jobConf.get(CommonConstants.PROXY_INLONG_GROUP_ID,
-                CommonConstants.DEFAULT_PROXY_INLONG_GROUP_ID);
-        inlongStreamId = jobConf.get(CommonConstants.PROXY_INLONG_STREAM_ID,
-                CommonConstants.DEFAULT_PROXY_INLONG_STREAM_ID);
         metricTagName = BINLOG_READER_TAG_NAME + "_" + inlongGroupId + "_" + inlongStreamId;

Review Comment:
   done.



-- 
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] [inlong] healchow merged pull request #5230: [INLONG-5224][Agent][DataProxy] Remove unused StreamConfigLog related classes

Posted by GitBox <gi...@apache.org>.
healchow merged PR #5230:
URL: https://github.com/apache/inlong/pull/5230


-- 
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] [inlong] haibo-duan commented on a diff in pull request #5230: [INLONG-5224][Agent][DataProxy] Remove unused StreamConfigLog related classes

Posted by GitBox <gi...@apache.org>.
haibo-duan commented on code in PR #5230:
URL: https://github.com/apache/inlong/pull/5230#discussion_r930662467


##########
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/reader/BinlogReader.java:
##########
@@ -150,84 +141,54 @@ public void init(JobProfile jobConf) {
         offsetFlushIntervalMs = jobConf.get(JOB_DATABASE_STORE_OFFSET_INTERVAL_MS, "100000");
         databaseStoreHistoryName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
                 tryToInitAndGetHistoryPath()) + "/history.dat" + jobConf.getInstanceId();
-        offsetStoreFileName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
-                tryToInitAndGetHistoryPath()) + "/offset.dat" + jobConf.getInstanceId();
+
         snapshotMode = jobConf.get(JOB_DATABASE_SNAPSHOT_MODE, "");
         includeSchemaChanges = jobConf.get(JOB_DATABASE_INCLUDE_SCHEMA_CHANGES, "false");
         historyMonitorDdl = jobConf.get(JOB_DATABASE_HISTORY_MONITOR_DDL, "false");
         binlogMessagesQueue = new LinkedBlockingQueue<>(jobConf.getInt(JOB_DATABASE_QUEUE_SIZE, 1000));
         instanceId = jobConf.getInstanceId();
         finished = false;
 
-        offset = jobConf.get(JOB_DATABASE_OFFSETS, "");
         specificOffsetFile = jobConf.get(JOB_DATABASE_OFFSET_SPECIFIC_OFFSET_FILE, "");
         specificOffsetPos = jobConf.get(JOB_DATABASE_OFFSET_SPECIFIC_OFFSET_POS, "-1");
+
+        offsetStoreFileName = jobConf.get(JOB_DATABASE_STORE_HISTORY_FILENAME,
+                tryToInitAndGetHistoryPath()) + "/offset.dat" + jobConf.getInstanceId();
         binlogSnapshot = new BinlogSnapshotBase(offsetStoreFileName);
+        String offset = jobConf.get(JOB_DATABASE_OFFSETS, "");
         binlogSnapshot.save(offset);
 
-        enableReportConfigLog =
-                Boolean.parseBoolean(jobConf.get(StreamConfigLogMetric.CONFIG_LOG_REPORT_ENABLE,
-                        "true"));
-
-        inlongGroupId = jobConf.get(CommonConstants.PROXY_INLONG_GROUP_ID,
-                CommonConstants.DEFAULT_PROXY_INLONG_GROUP_ID);
-        inlongStreamId = jobConf.get(CommonConstants.PROXY_INLONG_STREAM_ID,
-                CommonConstants.DEFAULT_PROXY_INLONG_STREAM_ID);
         metricTagName = BINLOG_READER_TAG_NAME + "_" + inlongGroupId + "_" + inlongStreamId;

Review Comment:
   Use string.join may be better.



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