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/01/20 08:03:26 UTC

[GitHub] [incubator-tubemq] EMsnap opened a new pull request #405: [TUBEMQ-530] create a cluster in manager

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


   [TUBEMQ-530] create a cluster in manager


----------------------------------------------------------------
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 a change in pull request #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/pom.xml
##########
@@ -54,6 +54,12 @@
             <version>4.3</version>
         </dependency>
 
+        <dependency>

Review comment:
       21.0




----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/ClusterEntry.java
##########
@@ -0,0 +1,47 @@
+/**
+ * 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.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import lombok.Data;
+
+/**
+ * cluster machine for tube cluster. broker/master/standby
+ */
+@Entity
+@Table(name = "cluster")
+@Data
+public class ClusterEntry {
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private int clusterId;
+
+    private String clusterName;

Review comment:
       cluster name should be marked as uniq key.




----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java
##########
@@ -32,8 +32,8 @@
 @Data
 public class NodeEntry {
     @Id
-    @GeneratedValue(strategy= GenerationType.AUTO)
-    private long brokerId;
+    @GeneratedValue(strategy= GenerationType.IDENTITY)

Review comment:
       what if clusters have conflicted broker ids. 
   for example A cluster has broker which id is num_a, meanwhile B cluster also has broker with the same id.
   It seems better that we need create a colume called brokerId without any annotation.




----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=h1) Report
   > Merging [#405](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=desc) (5895a7c) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/00e4c94de35fe1a99ea53942423caf8ded6499fa?el=desc) (00e4c94) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/405/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #405      +/-   ##
   ===============================================
   - Coverage          7.96%   7.94%   -0.02%     
     Complexity          464     464              
   ===============================================
     Files               249     249              
     Lines             27125   27125              
     Branches           4441    4441              
   ===============================================
   - Hits               2161    2156       -5     
   - Misses            24502   24505       +3     
   - Partials            462     464       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../java/org/apache/flume/sink/tubemq/TubemqSink.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvbm5lY3RvcnMvdHViZW1xLWNvbm5lY3Rvci1mbHVtZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZmx1bWUvc2luay90dWJlbXEvVHViZW1xU2luay5qYXZh) | `51.42% <0.00%> (-4.00%)` | `14.00% <0.00%> (ø%)` | |
   | [...bemq/server/common/heartbeat/HeartbeatManager.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL3NlcnZlci9jb21tb24vaGVhcnRiZWF0L0hlYXJ0YmVhdE1hbmFnZXIuamF2YQ==) | `45.23% <0.00%> (+2.38%)` | `13.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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/405?src=pr&el=footer). Last update [00e4c94...5895a7c](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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 #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/pom.xml
##########
@@ -54,6 +54,12 @@
             <version>4.3</version>
         </dependency>
 
+        <dependency>

Review comment:
       seems useless in this patch




----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=h1) Report
   > Merging [#405](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=desc) (bc52fa5) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/00e4c94de35fe1a99ea53942423caf8ded6499fa?el=desc) (00e4c94) will **increase** coverage by `0.06%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/405/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #405      +/-   ##
   ===============================================
   + Coverage          7.96%   8.02%   +0.06%     
   - Complexity          464     467       +3     
   ===============================================
     Files               249     249              
     Lines             27125   27125              
     Branches           4441    4441              
   ===============================================
   + Hits               2161    2178      +17     
   + Misses            24502   24476      -26     
   - Partials            462     471       +9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../producer/qltystats/DefaultBrokerRcvQltyStats.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL2NsaWVudC9wcm9kdWNlci9xbHR5c3RhdHMvRGVmYXVsdEJyb2tlclJjdlFsdHlTdGF0cy5qYXZh) | `45.31% <0.00%> (-0.40%)` | `20.00% <0.00%> (-1.00%)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `44.57% <0.00%> (+2.05%)` | `35.00% <0.00%> (+1.00%)` | |
   | [...bemq/server/common/heartbeat/HeartbeatManager.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL3NlcnZlci9jb21tb24vaGVhcnRiZWF0L0hlYXJ0YmVhdE1hbmFnZXIuamF2YQ==) | `45.23% <0.00%> (+2.38%)` | `13.00% <0.00%> (ø%)` | |
   | [.../apache/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `40.00% <0.00%> (+3.33%)` | `9.00% <0.00%> (+2.00%)` | |
   | [...pache/tubemq/corebase/policies/FlowCtrlResult.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJlc3VsdC5qYXZh) | `60.00% <0.00%> (+60.00%)` | `1.00% <0.00%> (+1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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/405?src=pr&el=footer). Last update [00e4c94...bc52fa5](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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 pull request #405: [TUBEMQ-530] create a cluster in manager

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


   +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] yuanboliu commented on a change in pull request #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/pom.xml
##########
@@ -54,6 +54,12 @@
             <version>4.3</version>
         </dependency>
 
+        <dependency>

Review comment:
       seems useless in this patch

##########
File path: tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java
##########
@@ -32,8 +32,8 @@
 @Data
 public class NodeEntry {
     @Id
-    @GeneratedValue(strategy= GenerationType.AUTO)
-    private long brokerId;
+    @GeneratedValue(strategy= GenerationType.IDENTITY)

Review comment:
       what if clusters have conflicted broker ids. 
   for example A cluster has broker which id is num_a, meanwhile B cluster also has broker with the same id.
   It seems better that we need create a colume called brokerId without any annotation.

##########
File path: tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/ClusterEntry.java
##########
@@ -0,0 +1,47 @@
+/**
+ * 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.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import lombok.Data;
+
+/**
+ * cluster machine for tube cluster. broker/master/standby
+ */
+@Entity
+@Table(name = "cluster")
+@Data
+public class ClusterEntry {
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    private int clusterId;
+
+    private String clusterName;

Review comment:
       cluster name should be marked as uniq key.




----------------------------------------------------------------
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 a change in pull request #405: [TUBEMQ-530] create a cluster in manager

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



##########
File path: tubemq-manager/pom.xml
##########
@@ -54,6 +54,12 @@
             <version>4.3</version>
         </dependency>
 
+        <dependency>

Review comment:
       21.0




----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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


   


----------------------------------------------------------------
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 #405: [TUBEMQ-530] create a cluster in manager

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


   # [Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=h1) Report
   > Merging [#405](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=desc) (bc52fa5) into [TUBEMQ-421](https://codecov.io/gh/apache/incubator-tubemq/commit/00e4c94de35fe1a99ea53942423caf8ded6499fa?el=desc) (00e4c94) will **increase** coverage by `0.06%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-tubemq/pull/405/graphs/tree.svg?width=650&height=150&src=pr&token=1EUK92O9K2)](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree)
   
   ```diff
   @@               Coverage Diff               @@
   ##             TUBEMQ-421    #405      +/-   ##
   ===============================================
   + Coverage          7.96%   8.02%   +0.06%     
   - Complexity          464     467       +3     
   ===============================================
     Files               249     249              
     Lines             27125   27125              
     Branches           4441    4441              
   ===============================================
   + Hits               2161    2178      +17     
   + Misses            24502   24476      -26     
   - Partials            462     471       +9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-tubemq/pull/405?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [.../producer/qltystats/DefaultBrokerRcvQltyStats.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL2NsaWVudC9wcm9kdWNlci9xbHR5c3RhdHMvRGVmYXVsdEJyb2tlclJjdlFsdHlTdGF0cy5qYXZh) | `45.31% <0.00%> (-0.40%)` | `20.00% <0.00%> (-1.00%)` | |
   | [.../tubemq/corebase/policies/FlowCtrlRuleHandler.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJ1bGVIYW5kbGVyLmphdmE=) | `44.57% <0.00%> (+2.05%)` | `35.00% <0.00%> (+1.00%)` | |
   | [...bemq/server/common/heartbeat/HeartbeatManager.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdHViZW1xL3NlcnZlci9jb21tb24vaGVhcnRiZWF0L0hlYXJ0YmVhdE1hbmFnZXIuamF2YQ==) | `45.23% <0.00%> (+2.38%)` | `13.00% <0.00%> (ø%)` | |
   | [.../apache/tubemq/corebase/policies/FlowCtrlItem.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybEl0ZW0uamF2YQ==) | `40.00% <0.00%> (+3.33%)` | `9.00% <0.00%> (+2.00%)` | |
   | [...pache/tubemq/corebase/policies/FlowCtrlResult.java](https://codecov.io/gh/apache/incubator-tubemq/pull/405/diff?src=pr&el=tree#diff-dHViZW1xLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3R1YmVtcS9jb3JlYmFzZS9wb2xpY2llcy9GbG93Q3RybFJlc3VsdC5qYXZh) | `60.00% <0.00%> (+60.00%)` | `1.00% <0.00%> (+1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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/405?src=pr&el=footer). Last update [00e4c94...bc52fa5](https://codecov.io/gh/apache/incubator-tubemq/pull/405?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