增加细节修改

This commit is contained in:
zeek 2020-05-05 16:36:32 +08:00
parent 73f793e11b
commit 48eda8f46d
2 changed files with 3 additions and 2 deletions

View File

@ -73,6 +73,7 @@ public class SourceFromMySQL extends RichSourceFunction<Student> {
@Override
public void cancel() {
}
private static Connection getConnection() {

View File

@ -34,7 +34,7 @@ public class KafkaUtils {
Map<String, Object> fields = new HashMap<>();
tags.put("cluster", "zhisheng");
tags.put("host_ip", "101.147.022.106");
tags.put("host_ip", "127.0.0.1");
fields.put("used_percent", 90d);
fields.put("max", 27244873d);
@ -53,8 +53,8 @@ public class KafkaUtils {
public static void main(String[] args) throws InterruptedException {
while (true) {
Thread.sleep(300);
writeToKafka();
Thread.sleep(3000);
}
}