Skip to content

Commit 3c37f9d

Browse files
authored
Merge pull request #88 from xaecbd/dev
Dev
2 parents bc5400f + fa91f7d commit 3c37f9d

File tree

204 files changed

+7189
-4603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+7189
-4603
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 2.3.0 (2020-9-26)
2+
###Features / Enhancements
3+
* add new home page
4+
* add topic file size
5+
* enhance producer monitor
6+
* rebuilt cluster module
7+
### Bug Fixes
8+
* fix some bug
19
# 2.2.0 (2020-7-31)
210
###Features / Enhancements
311
* add monitor consumer lag api

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/constant/Constant.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
*/
66
public class Constant {
77

8-
public class ELASTICSEARCH{
8+
public class Elasticsearch {
99
public static final String HITS ="hits";
1010
public static final String AGGREGATIONS = "aggregations";
1111
public static final String SCROLL_ID="_scroll_id";
1212
}
1313

14-
public class SEARCH{
14+
public class Search {
1515
public static final String SEARCH_SCROLL="/_search/scroll";
1616
public static final String SEARCH_SCROLL_1M = "/_search?scroll=1m";
17-
public static final String _SEARCH="/_search";
17+
public static final String SEARCH_ ="/_search";
1818
}
1919

20-
public class ENCRYPTION{
20+
public class Encryption {
2121
public static final String MD5 = "MD5";
2222
}
23-
public class NUM{
23+
public class Num {
2424
public static final String ZERO = "0";
2525
}
2626
}

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/ConsumerTypeEnum.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/GroupTopicConsumerState.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
package org.nesc.ec.bigdata.common.model;
22

3-
import java.util.List;
4-
53
import org.apache.kafka.common.ConsumerGroupState;
64

5+
import java.util.List;
6+
77
/**
88
*
99
* @author jc1e
1010
*
1111
* 2019年5月14日
1212
*/
1313
public class GroupTopicConsumerState {
14+
private String group;
1415
private String topic;
1516
private String consumerMethod;
1617
private List<PartitionAssignmentState> partitionAssignmentStates;
17-
18+
private KafkaCenterGroupState kafkaCenterGroupState;
1819
private ConsumerGroupState consumerGroupState;
1920
private boolean isSimpleConsumerGroup = false ;
2021

2122
private boolean hasMembers;
2223

24+
25+
public GroupTopicConsumerState(String group,String topic,String consumerMethod){
26+
this.group = group;
27+
this.topic = topic;
28+
this.consumerMethod = consumerMethod;
29+
}
30+
2331
public boolean isHasMembers() {
2432
return hasMembers;
2533
}
@@ -67,4 +75,20 @@ public String getTopic() {
6775
public void setTopic(String topic) {
6876
this.topic = topic;
6977
}
78+
79+
public KafkaCenterGroupState getKafkaCenterGroupState() {
80+
return kafkaCenterGroupState;
81+
}
82+
83+
public void setKafkaCenterGroupState(KafkaCenterGroupState kafkaCenterGroupState) {
84+
this.kafkaCenterGroupState = kafkaCenterGroupState;
85+
}
86+
87+
public String getGroup() {
88+
return group;
89+
}
90+
91+
public void setGroup(String group) {
92+
this.group = group;
93+
}
7094
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.nesc.ec.bigdata.common.model;
2+
3+
/**
4+
* @author Truman.P.Du
5+
* @date 2020/08/14
6+
* @description KafkaCenter 定义消费组状态,区别于 ConsumerGroupState、
7+
* ConsumerGroupState 是kafka对group状态的定义
8+
* KafkaCenterGroupState是KafkaCenter对group状态的定义
9+
*/
10+
public enum KafkaCenterGroupState {
11+
12+
ACTIVE, DEAD, UNKNOWN;
13+
14+
15+
}

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/MeterMetric.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,16 @@ public MeterMetric(Long count, Double meanRate, Double oneMinuteRate, Double fiv
5050
private String location;
5151
private String clusterName;
5252
private String metricName;
53-
54-
55-
53+
private String topic;
54+
55+
public String getTopic() {
56+
return topic;
57+
}
58+
59+
public void setTopic(String topic) {
60+
this.topic = topic;
61+
}
62+
5663
public String getClusterName() {
5764
return clusterName;
5865
}

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/PartitionAssignmentState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @version 1.0
77
*/
88
public class PartitionAssignmentState {
9-
private String group; // groupId
9+
private String group;
1010
private String topic;
1111
private int partition;
1212
private long offset;

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/TopicConsumerGroupState.java

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package org.nesc.ec.bigdata.common.model;
22

3-
import java.util.List;
4-
53
import org.apache.kafka.common.ConsumerGroupState;
64

5+
import java.util.List;
6+
77
/**
88
* @author Truman.P.Du
99
* @date 2019年4月10日 下午4:12:17
@@ -16,6 +16,7 @@ public class TopicConsumerGroupState {
1616
*/
1717
private String consumerMethod;
1818
private List<PartitionAssignmentState> partitionAssignmentStates;
19+
private KafkaCenterGroupState kafkaCenterGroupState;
1920
/**
2021
* Dead:组内已经没有任何成员的最终状态,组的元数据也已经被coordinator移除了。这种状态响应各种请求都是一个response:UNKNOWN_MEMBER_ID
2122
* Empty:组内无成员,但是位移信息还没有过期。这种状态只能响应JoinGroup请求
@@ -24,11 +25,21 @@ public class TopicConsumerGroupState {
2425
* Stable:rebalance完成!可以开始消费了~
2526
*/
2627
private ConsumerGroupState consumerGroupState;
27-
private boolean isSimpleConsumerGroup = false ;//false:api 根据member信息判断状态,true 状态直接置黄,给提示("SimpleConsumerGroup无法判断其状态")低级
28+
/**
29+
* isSimpleConsumerGroup false:api 根据member信息判断状态,true 状态直接置黄,给提示("SimpleConsumerGroup无法判断其状态")低级
30+
*/
31+
private boolean isSimpleConsumerGroup = false ;
2832

29-
//组内是否有members
33+
/**
34+
* 组内是否有members
35+
*/
3036
private boolean hasMembers = true;
3137

38+
public TopicConsumerGroupState(String groupId,String consumerMethod){
39+
this.groupId = groupId;
40+
this.consumerMethod = consumerMethod;
41+
}
42+
3243

3344
public boolean isHasMembers() {
3445
return hasMembers;
@@ -77,4 +88,12 @@ public boolean isSimpleConsumerGroup() {
7788
public void setSimpleConsumerGroup(boolean isSimpleConsumerGroup) {
7889
this.isSimpleConsumerGroup = isSimpleConsumerGroup;
7990
}
91+
92+
public KafkaCenterGroupState getKafkaCenterGroupState() {
93+
return kafkaCenterGroupState;
94+
}
95+
96+
public void setKafkaCenterGroupState(KafkaCenterGroupState kafkaCenterGroupState) {
97+
this.kafkaCenterGroupState = kafkaCenterGroupState;
98+
}
8099
}

KafkaCenter-Base/src/main/java/org/nesc/ec/bigdata/common/model/TopicGroup.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)