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/08/02 03:30:27 UTC

[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #5318: [INLONG-5312][Sort] Add unified inlong.metric parameter injection support for nodes

yunqingmoswu commented on code in PR #5318:
URL: https://github.com/apache/inlong/pull/5318#discussion_r935081757


##########
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/parser/impl/FlinkSqlParser.java:
##########
@@ -159,6 +162,23 @@ private void parseStream(StreamInfo streamInfo) {
         log.info("parse stream success, streamId:{}", streamInfo.getStreamId());
     }
 
+    /**
+     * Inject the `inlong.metric` for ExtractNode or LoadNode
+     *
+     * @param streamInfo The encapsulation of nodes and node relations
+     */
+    private void injectInLongMetric(StreamInfo streamInfo) {
+        streamInfo.getNodes().stream().filter(node -> node instanceof InLongMetric).forEach(node -> {
+            Map<String, String> properties = node.getProperties();
+            if (properties == null) {
+                properties = new LinkedHashMap<>();
+            }

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