Commit dfe49283 authored by chenfm's avatar chenfm

修改为使用华为云数据

parent 64a1dfa7
......@@ -60,10 +60,10 @@ public class StreamingJob {
ParameterTool params = ParameterTool.fromArgs(new String[0]);
env.getConfig().setGlobalJobParameters(params);
String brokerUrl = params.get("brokerUrl", "tcp://192.168.31.248:1883");
String postgresqlInfo = params.get("postgresqlInfo", "jdbc:postgresql://192.168.31.248:5432/iot$$iot$$123456");
String redisInfo = params.get("redisInfo", "192.168.31.248");
String mysqlInfo = params.get("mysqlInfo", "192.168.31.248:3306$$data_center$$123456");
String brokerUrl = params.get("brokerUrl", "tcp://192.168.0.122:1883");
String postgresqlInfo = params.get("postgresqlInfo", "jdbc:postgresql://192.168.0.17:54321/iot$$iot$$123456");
String redisInfo = params.get("redisInfo", "192.168.0.17");
String mysqlInfo = params.get("mysqlInfo", "192.168.0.17:3306/iot$$iot$$123456");
log.info("load param brokerUrl: {}", brokerUrl);
log.info("load param postgresqlInfo: {}", postgresqlInfo);
log.info("load param redisInfo: {}", redisInfo);
......
......@@ -53,7 +53,7 @@ public class AlarmRedisSinkFunction extends RichSinkFunction<EmqData> {
try {
String[] infoArray = this.mysqlInfo.split("\\$\\$");
//数据库链接
String url = "jdbc:mysql://" + infoArray[0] + "/data_center?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false";
String url = "jdbc:mysql://" + infoArray[0] + "?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false";
String user = infoArray[1];
String password = infoArray[2];
//数据库连接信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment