You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/11/30 14:10:16 UTC

[GitHub] [incubator-eventmesh] vinayakghatul opened a new pull request, #2324: [ISSUE #1111] Variable for Client Pool

vinayakghatul opened a new pull request, #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324

   
   Fixes #<1111>.
   
   
   ### Modifications
   
   Use of random function with MIN and MAX limit for client pool
   
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] vinayakghatul commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
vinayakghatul commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1036955493


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int)(Math.random()*(MAX_LIMIT-MIN_LIMIT+1)+MIN_LIMIT);

Review Comment:
   updated



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1039273022


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int) (RandomUtils.nextInt(MIN_LIMIT, MAX_LIMIT);

Review Comment:
   here miss the ')' at the end of the line



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1037738701


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int)(Math.random() * (MAX_LIMIT - MIN_LIMIT + 1) + MIN_LIMIT);

Review Comment:
   this checkSytle error for the typecast `(int)` , need a whitespace after this



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1036881625


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int)(Math.random()*(MAX_LIMIT-MIN_LIMIT+1)+MIN_LIMIT);

Review Comment:
   please split the `*`, `-`, `+` with the white space



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
horoc commented on code in PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#discussion_r1037084996


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/EventMeshGrpcServer.java:
##########
@@ -262,7 +266,8 @@ private void initThreadPool() {
 
     private void initHttpClientPool() {
         httpClientPool = new LinkedList<>();
-        for (int i = 0; i < 8; i++) {
+        int clientPool = (int)(Math.random() * (MAX_LIMIT - MIN_LIMIT + 1) + MIN_LIMIT);

Review Comment:
   <img width="1370" alt="image" src="https://user-images.githubusercontent.com/63457588/205059786-a0603863-b65d-4f8c-8526-5130d747ad97.png">
   
   Still has checkStyle error in this line, maybe you can just use ```RandomUtils``` to get a random integer within that range.



-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324#issuecomment-1337005456

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324?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 [#2324](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (893aaf8) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/8c31f73ffa7a2ad5e02273cd9d4aa7128bd05a4c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c31f73) will **increase** coverage by `0.04%`.
   > The diff coverage is `19.47%`.
   
   > :exclamation: Current head 893aaf8 differs from pull request most recent head ff31965. Consider uploading reports for the commit ff31965 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2324      +/-   ##
   ============================================
   + Coverage     11.72%   11.77%   +0.04%     
   - Complexity      894      902       +8     
   ============================================
     Files           471      469       -2     
     Lines         27810    27784      -26     
     Branches       3007     3016       +9     
   ============================================
   + Hits           3262     3272      +10     
   + Misses        24248    24216      -32     
   + Partials        300      296       -4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...che/eventmesh/common/protocol/tcp/codec/Codec.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC90Y3AvY29kZWMvQ29kZWMuamF2YQ==) | `61.79% <0.00%> (ø)` | |
   | [...ve/cloudevent/impl/KnativeBinaryMessageReader.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1rbmF0aXZlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL2tuYXRpdmUvY2xvdWRldmVudC9pbXBsL0tuYXRpdmVCaW5hcnlNZXNzYWdlUmVhZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...connector/knative/config/ConfigurationWrapper.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1rbmF0aXZlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL2tuYXRpdmUvY29uZmlnL0NvbmZpZ3VyYXRpb25XcmFwcGVyLmphdmE=) | `52.63% <0.00%> (ø)` | |
   | [...mesh/connector/knative/domain/NonStandardKeys.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1rbmF0aXZlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL2tuYXRpdmUvZG9tYWluL05vblN0YW5kYXJkS2V5cy5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...tmesh/connector/knative/producer/ProducerImpl.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1rbmF0aXZlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL2tuYXRpdmUvcHJvZHVjZXIvUHJvZHVjZXJJbXBsLmphdmE=) | `51.21% <0.00%> (+1.21%)` | :arrow_up: |
   | [...pl/consumer/ConsumeMessageConcurrentlyService.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1yb2NrZXRtcS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY2xpZW50L2ltcGwvY29uc3VtZXIvQ29uc3VtZU1lc3NhZ2VDb25jdXJyZW50bHlTZXJ2aWNlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...nector/standalone/consumer/StandaloneConsumer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvY29uc3VtZXIvU3RhbmRhbG9uZUNvbnN1bWVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ventmesh/metrics/api/model/HttpSummaryMetrics.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLW1ldHJpY3MtcGx1Z2luL2V2ZW50bWVzaC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL21ldHJpY3MvYXBpL21vZGVsL0h0dHBTdW1tYXJ5TWV0cmljcy5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...eventmesh/metrics/api/model/TcpSummaryMetrics.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLW1ldHJpY3MtcGx1Z2luL2V2ZW50bWVzaC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL21ldHJpY3MvYXBpL21vZGVsL1RjcFN1bW1hcnlNZXRyaWNzLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...col/http/resolver/HttpRequestProtocolResolver.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/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-ZXZlbnRtZXNoLXByb3RvY29sLXBsdWdpbi9ldmVudG1lc2gtcHJvdG9jb2wtaHR0cC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL3Byb3RvY29sL2h0dHAvcmVzb2x2ZXIvSHR0cFJlcXVlc3RQcm90b2NvbFJlc29sdmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | ... and [80 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/2324/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 merged pull request #2324: [ISSUE #1111] Variable for Client Pool

Posted by GitBox <gi...@apache.org>.
xwm1992 merged PR #2324:
URL: https://github.com/apache/incubator-eventmesh/pull/2324


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org