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:
[email protected]