You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by GitBox <gi...@apache.org> on 2021/03/03 09:12:49 UTC

[GitHub] [incubator-tubemq] EMsnap opened a new pull request #438: [TUBEMQ-566] manage brokers in region

EMsnap opened a new pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438


   [TUBEMQ-566] manage brokers in region


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

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



[GitHub] [incubator-tubemq] codecov-io commented on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-789594494


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=h1) Report
   > Merging [#438](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=desc) (e5a2d52) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/e6c16731b0ac4487cae9af1a247ea4537696abe3?el=desc) (e6c1673) will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/438/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #438      +/-   ##
   ===============================================
   + Coverage          7.42%   7.44%   +0.02%     
     Complexity          476     476              
   ===============================================
     Files               268     268              
     Lines             29620   29620              
     Branches           4866    4866              
   ===============================================
   + Hits               2199    2206       +7     
   + Misses            26942   26936       -6     
   + Partials            479     478       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../java/org/apache/flume/sink/tubemq/TubemqSink.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvbm5lY3RvcnMvdHViZW1xLWNvbm5lY3Rvci1mbHVtZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZmx1bWUvc2luay90dWJlbXEvVHViZW1xU2luay5qYXZh) | `55.42% <0.00%> (+4.00%)` | `14.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=footer). Last update [e6c1673...e5a2d52](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



[GitHub] [incubator-tubemq] codecov-io edited a comment on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-789594494


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=h1) Report
   > Merging [#438](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=desc) (edd4d99) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/e6c16731b0ac4487cae9af1a247ea4537696abe3?el=desc) (e6c1673) will **increase** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/438/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #438      +/-   ##
   ===============================================
   + Coverage          7.42%   7.43%   +0.01%     
   + Complexity          476     473       -3     
   ===============================================
     Files               268     268              
     Lines             29620   29620              
     Branches           4866    4866              
   ===============================================
   + Hits               2199    2202       +3     
   + Misses            26942   26938       -4     
   - Partials            479     480       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../apache/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `38.88% <0.00%> (-1.12%)` | `8.00% <0.00%> (-1.00%)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `43.98% <0.00%> (-0.59%)` | `34.00% <0.00%> (-1.00%)` | |
   | [.../producer/qltystats/DefaultBrokerRcvQltyStats.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL2NsaWVudC9wcm9kdWNlci9xbHR5c3RhdHMvRGVmYXVsdEJyb2tlclJjdlFsdHlTdGF0cy5qYXZh) | `45.31% <0.00%> (-0.40%)` | `20.00% <0.00%> (-1.00%)` | |
   | [.../java/org/apache/flume/sink/tubemq/TubemqSink.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvbm5lY3RvcnMvdHViZW1xLWNvbm5lY3Rvci1mbHVtZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZmx1bWUvc2luay90dWJlbXEvVHViZW1xU2luay5qYXZh) | `55.42% <0.00%> (+4.00%)` | `14.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=footer). Last update [e6c1673...edd4d99](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



[GitHub] [incubator-tubemq] EMsnap commented on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
EMsnap commented on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-789659980


   > It would be great if we could add some unit tests for this change.
   
   would be done soon, thanks


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

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



[GitHub] [incubator-tubemq] yuanboliu commented on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
yuanboliu commented on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-790264815


   +1 


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

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



[GitHub] [incubator-tubemq] codecov-io edited a comment on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-789594494


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=h1) Report
   > Merging [#438](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=desc) (bd13b16) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/e6c16731b0ac4487cae9af1a247ea4537696abe3?el=desc) (e6c1673) will **increase** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/438/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #438      +/-   ##
   ===============================================
   + Coverage          7.42%   7.43%   +0.01%     
   + Complexity          476     474       -2     
   ===============================================
     Files               268     268              
     Lines             29620   29620              
     Branches           4866    4866              
   ===============================================
   + Hits               2199    2203       +4     
   + Misses            26942   26938       -4     
     Partials            479     479              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../apache/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `38.88% <0.00%> (-1.12%)` | `8.00% <0.00%> (-1.00%)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `43.98% <0.00%> (-0.59%)` | `34.00% <0.00%> (-1.00%)` | |
   | [.../java/org/apache/flume/sink/tubemq/TubemqSink.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvbm5lY3RvcnMvdHViZW1xLWNvbm5lY3Rvci1mbHVtZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZmx1bWUvc2luay90dWJlbXEvVHViZW1xU2luay5qYXZh) | `55.42% <0.00%> (+4.00%)` | `14.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=footer). Last update [e6c1673...bd13b16](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



[GitHub] [incubator-tubemq] codecov-io edited a comment on pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#issuecomment-789594494


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=h1) Report
   > Merging [#438](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=desc) (418cd67) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/e6c16731b0ac4487cae9af1a247ea4537696abe3?el=desc) (e6c1673) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/438/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #438      +/-   ##
   ===============================================
   - Coverage          7.42%   7.41%   -0.02%     
   + Complexity          476     474       -2     
   ===============================================
     Files               268     268              
     Lines             29620   29620              
     Branches           4866    4866              
   ===============================================
   - Hits               2199    2196       -3     
   - Misses            26942   26944       +2     
   - Partials            479     480       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../apache/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `38.88% <0.00%> (-1.12%)` | `8.00% <0.00%> (-1.00%)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-tubemq/pull/438/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `43.98% <0.00%> (-0.59%)` | `34.00% <0.00%> (-1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=footer). Last update [e6c1673...edd4d99](https://codecov.io/gh/apache/incubator-tubemq/pull/438?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



[GitHub] [incubator-tubemq] yuanboliu commented on a change in pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
yuanboliu commented on a change in pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438#discussion_r586321389



##########
File path: tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/RegionEntry.java
##########
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.tubemq.manager.entry;
+
+
+import java.util.Date;
+import javax.persistence.Entity;
+import javax.persistence.EntityListeners;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
+import lombok.Data;
+import org.apache.tubemq.manager.utils.ValidateUtils;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+@Entity
+@Table(name = "region", uniqueConstraints=
+    {
+        @UniqueConstraint(columnNames={"clusterId", "regionId"}),
+        @UniqueConstraint(columnNames={"id"})
+    })
+@Data
+@EntityListeners(AuditingEntityListener.class)
+public class RegionEntry {
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private Long id;
+
+    private Long regionId;
+
+    private String name;
+
+    @CreatedDate
+    private Date createDate;
+
+    @LastModifiedDate
+    private Date modifyDate;
+
+    private String createUser;
+
+    private String modifyUser;
+
+    private Long clusterId;
+
+    public boolean legal() {

Review comment:
       use annotation instead of function to valid clusterId;




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

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



[GitHub] [incubator-tubemq] yuanboliu merged pull request #438: [TUBEMQ-566] manage brokers in region

Posted by GitBox <gi...@apache.org>.
yuanboliu merged pull request #438:
URL: https://github.com/apache/incubator-tubemq/pull/438


   


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

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