Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.classpath
.settings
.project
1 change: 1 addition & 0 deletions kafka-eagle-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
1 change: 1 addition & 0 deletions kafka-eagle-common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
45 changes: 18 additions & 27 deletions kafka-eagle-common/src/main/resources/system-config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,23 @@
# multi zookeeper & kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=127.0.0.1:2181
cluster1_0_1.zk.list=127.0.0.1:2181/v_1_0_1
cluster2.zk.list=127.0.0.1:2181/plain
cluster3.zk.list=127.0.0.1:2181/scram
cluster4.zk.list=127.0.0.1:2182
cluster1.zk.list=10.100.172.147:2181

######################################
# zookeeper enable acl
######################################
cluster4.zk.acl.enable=false
cluster4.zk.acl.schema=digest
cluster4.zk.acl.username=test
cluster4.zk.acl.password=test123

cluster1.zk.acl.enable=false
cluster1.zk.acl.schema=digest
cluster1.zk.acl.username=kafka
cluster1.zk.acl.password=kafkapasswd
######################################
# broker size online list
######################################
cluster1.kafka.eagle.broker.size=10
cluster1_0_1.kafka.eagle.broker.size=10
cluster4.kafka.eagle.broker.size=10

######################################
# zk client thread limit
######################################
kafka.zk.limit.size=32
kafka.zk.limit.size=1

######################################
# kafka eagle webui port
Expand All @@ -47,10 +39,7 @@ cluster1.kafka.eagle.jmx.truststore.password=ke123456
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka
cluster1_0_1.kafka.eagle.offset.storage=kafka
cluster2.kafka.eagle.offset.storage=kafka
#cluster3.kafka.eagle.offset.storage=kafka
cluster4.kafka.eagle.offset.storage=kafka


######################################
# kafka metrics, 15 days by default
Expand Down Expand Up @@ -83,14 +72,15 @@ kafka.eagle.topic.token=keadmin
######################################
# kafka sasl authenticate
######################################
cluster1.kafka.eagle.sasl.enable=false
cluster1.kafka.eagle.sasl.enable=true
cluster1.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
cluster1.kafka.eagle.sasl.mechanism=SCRAM-SHA-256
cluster1.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="admin" password="admin-secret";
cluster1.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="kafkaadmin" password="kafkaadmin";
cluster1.kafka.eagle.sasl.client.id=
cluster1.kafka.eagle.blacklist.topics=
cluster1.kafka.eagle.sasl.cgroup.enable=false
cluster1.kafka.eagle.sasl.cgroup.topics=kafka20191230,kafka20191217

cluster4.kafka.eagle.sasl.enable=false
cluster4.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
cluster4.kafka.eagle.sasl.mechanism=PLAIN
Expand All @@ -113,11 +103,12 @@ cluster1.kafka.eagle.ssl.cgroup.topics=
######################################
# kafka jdbc driver address
######################################
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456
#kafka.eagle.driver=org.sqlite.JDBC
#kafka.eagle.url=jdbc:sqlite:/Users/dengjie/webserver/hadoop/sqlite/ke.db
#kafka.eagle.driver=com.mysql.jdbc.Driver
#kafka.eagle.url=jdbc:mysql://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#kafka.eagle.username=root
#kafka.eagle.password=root
#kafka.eagle.password=123456

kafka.eagle.driver=org.sqlite.JDBC
kafka.eagle.url=jdbc:sqlite:/Users/jefffeng/kenew.db
kafka.eagle.username=root
kafka.eagle.password=root
139 changes: 139 additions & 0 deletions kafka-eagle-common/src/main/resources/system-config.properties.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
######################################
# multi zookeeper & kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1
<<<<<<< HEAD
cluster1.zk.list=10.100.172.147:2181,10.100.172.171:2181,10.100.172.173:2181
=======
cluster1.zk.list=127.0.0.1:2181
cluster1_0_1.zk.list=127.0.0.1:2181/v_1_0_1
cluster2.zk.list=127.0.0.1:2181/plain
cluster3.zk.list=127.0.0.1:2181/scram
cluster4.zk.list=127.0.0.1:2182

######################################
# zookeeper enable acl
######################################
cluster4.zk.acl.enable=false
cluster4.zk.acl.schema=digest
cluster4.zk.acl.username=test
cluster4.zk.acl.password=test123
>>>>>>> bb39f8fca4bf158986bf8928cd7ee702afef5d71

######################################
# broker size online list
######################################
cluster1.kafka.eagle.broker.size=10

######################################
# zk client thread limit
######################################
kafka.zk.limit.size=32

######################################
# kafka eagle webui port
######################################
kafka.eagle.webui.port=8048

######################################
# kafka jmx acl and ssl authenticate
######################################
cluster1.kafka.eagle.jmx.acl=false
cluster1.kafka.eagle.jmx.user=keadmin
cluster1.kafka.eagle.jmx.password=keadmin123
cluster1.kafka.eagle.jmx.ssl=false
cluster1.kafka.eagle.jmx.truststore.location=/Users/dengjie/workspace/ssl/certificates/kafka.truststore
cluster1.kafka.eagle.jmx.truststore.password=ke123456

######################################
# kafka offset storage
######################################
cluster1.kafka.eagle.offset.storage=kafka


######################################
# kafka metrics, 15 days by default
######################################
kafka.eagle.metrics.charts=true
kafka.eagle.metrics.retain=15

######################################
# master quartz time
######################################
kafka.eagle.quartz.master.time=* */1 * * * ?

######################################
# kafka sql topic records max
######################################
kafka.eagle.sql.topic.records.max=5000
kafka.eagle.sql.worknode.port=8787
kafka.eagle.sql.distributed.enable=false
kafka.eagle.sql.worknode.rpc.timeout=300000
kafka.eagle.sql.worknode.fetch.threshold=5000
kafka.eagle.sql.worknode.fetch.timeout=20000
kafka.eagle.sql.worknode.server.path=/Users/dengjie/workspace/kafka-eagle-plus/kafka-eagle-common/src/main/resources/works


######################################
# delete kafka topic token
######################################
kafka.eagle.topic.token=keadmin

######################################
# kafka sasl authenticate
######################################
cluster1.kafka.eagle.sasl.enable=false
cluster1.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
cluster1.kafka.eagle.sasl.mechanism=SCRAM-SHA-256
#cluster1.kafka.eagle.sasl.mechanism=PLAIN
cluster1.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="kafkaadmin" password="kafkaadmin";
cluster1.kafka.eagle.sasl.client.id=
cluster1.kafka.eagle.blacklist.topics=
cluster1.kafka.eagle.sasl.cgroup.enable=false
<<<<<<< HEAD
cluster1.kafka.eagle.sasl.cgroup.topics=
=======
cluster1.kafka.eagle.sasl.cgroup.topics=kafka20191230,kafka20191217
cluster4.kafka.eagle.sasl.enable=false
cluster4.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
cluster4.kafka.eagle.sasl.mechanism=PLAIN
cluster4.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="admin-secret";
cluster4.kafka.eagle.sasl.client.id=
>>>>>>> bb39f8fca4bf158986bf8928cd7ee702afef5d71

######################################
# kafka ssl authenticate
######################################
cluster1.kafka.eagle.ssl.enable=false
cluster1.kafka.eagle.ssl.protocol=SSL
cluster1.kafka.eagle.ssl.truststore.location=/Users/dengjie/workspace/ssl/certificates/kafka.truststore
cluster1.kafka.eagle.ssl.truststore.password=ke123456
cluster1.kafka.eagle.ssl.keystore.location=/Users/dengjie/workspace/ssl/certificates/kafka.keystore
cluster1.kafka.eagle.ssl.keystore.password=ke123456
cluster1.kafka.eagle.ssl.key.password=ke123456
cluster1.kafka.eagle.ssl.cgroup.enable=false
cluster1.kafka.eagle.ssl.cgroup.topics=

######################################
# kafka jdbc driver address
######################################
<<<<<<< HEAD
#kafka.eagle.driver=com.mysql.jdbc.Driver
#kafka.eagle.url=jdbc:mysql://10.100.172.33:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#kafka.eagle.username=dev
#kafka.eagle.password=123456

kafka.eagle.driver=org.sqlite.JDBC
kafka.eagle.url=jdbc:sqlite:/Users/jefffeng/ke.db
kafka.eagle.username=root
kafka.eagle.password=root
=======
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456
#kafka.eagle.driver=org.sqlite.JDBC
#kafka.eagle.url=jdbc:sqlite:/Users/dengjie/webserver/hadoop/sqlite/ke.db
#kafka.eagle.username=root
#kafka.eagle.password=root
>>>>>>> bb39f8fca4bf158986bf8928cd7ee702afef5d71
1 change: 1 addition & 0 deletions kafka-eagle-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import org.apache.kafka.common.TopicPartition;
import org.smartloli.kafka.eagle.common.protocol.*;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.Map;
import java.util.Properties;
Expand Down Expand Up @@ -91,10 +94,8 @@ public interface KafkaService {
*/
public Map<Integer, Long> getKafkaOffset(String clusterAlias, String group, String topic, Set<Integer> partitionids);

/**
* Use kafka console comand to create topic.
*/
public Map<String, Object> create(String clusterAlias, String topicName, String partitions, String replic);
/** Use kafka console comand to create topic. */
public Map<String, Object> create(String clusterAlias, String topicName, String partitions, String replic, String username);

/**
* Use kafka console command to delete topic.
Expand Down Expand Up @@ -259,5 +260,17 @@ public interface KafkaService {
* Set kafka ssl acl.
*/
public void ssl(Properties props, String clusterAlias);

/**
* Get kafka acls .
*/
public JSONArray getKafkaAcl(String clusterAlias);

public JSONArray getKafkaAclBYTopicName(String clusterAlias, String topicname);

Map<String, Object> createGroup(String clusterAlias, String userName, String groupName);

String deleteAcl(String clusterAlias, JSONObject jsonObject);


}
Loading