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/09 08:19:08 UTC

[GitHub] [incubator-inlong] luchunliang opened a new pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of new cache message protocol.

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


   ### Title Name: [INLONG-2379][Inlong-DataProxy] DataProxy support Pulsar sink of new cache message protocol.
   
   Fixes #2379 
   
   ### 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] dockerzhang commented on pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on pull request #2424:
URL: https://github.com/apache/incubator-inlong/pull/2424#issuecomment-1040068274


   duplicate with  https://github.com/apache/incubator-inlong/pull/2502, close it.


-- 
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 commented on pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on pull request #2424:
URL: https://github.com/apache/incubator-inlong/pull/2424#issuecomment-1040068274


   duplicate with  https://github.com/apache/incubator-inlong/pull/2502, close it.


-- 
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 closed pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

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


   


-- 
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] imvan commented on a change in pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

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



##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/dispatch/DispatchManager.java
##########
@@ -0,0 +1,160 @@
+/**
+ * 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.dataproxy.dispatch;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.flume.Context;
+import org.apache.inlong.sdk.commons.protocol.ProxyEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * DispatchManager
+ */
+public class DispatchManager {
+
+    public static final Logger LOG = LoggerFactory.getLogger(DispatchManager.class);
+    public static final String KEY_DISPATCH_TIMEOUT = "dispatchTimeout";
+    public static final String KEY_DISPATCH_MAX_PACKCOUNT = "dispatchMaxPackCount";
+    public static final String KEY_DISPATCH_MAX_PACKSIZE = "dispatchMaxPackSize";
+    public static final long DEFAULT_DISPATCH_TIMEOUT = 2000;
+    public static final long DEFAULT_DISPATCH_MAX_PACKCOUNT = 256;
+    public static final long DEFAULT_DISPATCH_MAX_PACKSIZE = 327680;
+    public static final long MINUTE_MS = 60L * 1000;
+
+    private LinkedBlockingQueue<DispatchProfile> dispatchQueue;

Review comment:
       should be defined after *final* params




-- 
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] codecov-commenter commented on pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of new cache message protocol.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2424:
URL: https://github.com/apache/incubator-inlong/pull/2424#issuecomment-1033487636


   # [Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2424](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1037f00) into [master](https://codecov.io/gh/apache/incubator-inlong/commit/5f10edaa92a83d83f5ea16ef2b7c23a558e6e245?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5f10eda) will **increase** coverage by `0.05%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-inlong/pull/2424/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2424      +/-   ##
   ============================================
   + Coverage     12.49%   12.54%   +0.05%     
   - Complexity     1212     1220       +8     
   ============================================
     Files           420      420              
     Lines         36240    36255      +15     
     Branches       5670     5674       +4     
   ============================================
   + Hits           4527     4550      +23     
   + Misses        30914    30895      -19     
   - Partials        799      810      +11     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...inlong/tubemq/manager/controller/TubeMQResult.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL2NvbnRyb2xsZXIvVHViZU1RUmVzdWx0LmphdmE=) | `60.00% <0.00%> (-3.16%)` | :arrow_down: |
   | [...long/tubemq/manager/service/MasterServiceImpl.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL3NlcnZpY2UvTWFzdGVyU2VydmljZUltcGwuamF2YQ==) | `5.79% <0.00%> (-0.87%)` | :arrow_down: |
   | [...ager/controller/cluster/request/AddClusterReq.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL2NvbnRyb2xsZXIvY2x1c3Rlci9yZXF1ZXN0L0FkZENsdXN0ZXJSZXEuamF2YQ==) | `75.00% <0.00%> (ø)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `34.07% <0.00%> (+1.10%)` | :arrow_up: |
   | [.../inlong/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `38.88% <0.00%> (+2.22%)` | :arrow_up: |
   | [...inlong/tubemq/manager/service/TaskServiceImpl.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL3NlcnZpY2UvVGFza1NlcnZpY2VJbXBsLmphdmE=) | `8.53% <0.00%> (+4.87%)` | :arrow_up: |
   | [.../manager/controller/cluster/ClusterController.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL2NvbnRyb2xsZXIvY2x1c3Rlci9DbHVzdGVyQ29udHJvbGxlci5qYXZh) | `26.08% <0.00%> (+5.15%)` | :arrow_up: |
   | [...ong/tubemq/manager/service/ClusterServiceImpl.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtbWFuYWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9tYW5hZ2VyL3NlcnZpY2UvQ2x1c3RlclNlcnZpY2VJbXBsLmphdmE=) | `55.55% <0.00%> (+5.55%)` | :arrow_up: |
   | [...nlong/tubemq/corebase/policies/FlowCtrlResult.java](https://codecov.io/gh/apache/incubator-inlong/pull/2424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5sb25nLXR1YmVtcS90dWJlbXEtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW5sb25nL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJlc3VsdC5qYXZh) | `60.00% <0.00%> (+60.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [67b5039...1037f00](https://codecov.io/gh/apache/incubator-inlong/pull/2424?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] luchunliang commented on a change in pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

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



##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/dispatch/DispatchManager.java
##########
@@ -0,0 +1,160 @@
+/**
+ * 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.dataproxy.dispatch;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.flume.Context;
+import org.apache.inlong.sdk.commons.protocol.ProxyEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * DispatchManager
+ */
+public class DispatchManager {
+
+    public static final Logger LOG = LoggerFactory.getLogger(DispatchManager.class);
+    public static final String KEY_DISPATCH_TIMEOUT = "dispatchTimeout";
+    public static final String KEY_DISPATCH_MAX_PACKCOUNT = "dispatchMaxPackCount";
+    public static final String KEY_DISPATCH_MAX_PACKSIZE = "dispatchMaxPackSize";
+    public static final long DEFAULT_DISPATCH_TIMEOUT = 2000;
+    public static final long DEFAULT_DISPATCH_MAX_PACKCOUNT = 256;
+    public static final long DEFAULT_DISPATCH_MAX_PACKSIZE = 327680;
+    public static final long MINUTE_MS = 60L * 1000;
+
+    private LinkedBlockingQueue<DispatchProfile> dispatchQueue;

Review comment:
       fixed it.




-- 
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 closed pull request #2424: [INLONG-2379] DataProxy support Pulsar sink of PB compression cache message protocol.

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


   


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