Commit f7289562 by 吴延飞

flink工具类读取配置文件不再从命令行获取,直接从当前路径获取kafka.properties

parent aa367e57
......@@ -83,9 +83,10 @@ public class FlinkUtils {
private static ParameterTool initParameterToolByArgs(String[] args) {
// 获取Kafka配置文件
ParameterTool finkArgs = ParameterTool.fromArgs(args);
String kafkaConfigPath = finkArgs.getRequired("kafka.conf");
// 获取Kafka配置文件, 直接读取当前程序目录下的
// ParameterTool finkArgs = ParameterTool.fromArgs(args);
// String kafkaConfigPath = finkArgs.getRequired("kafka.conf");
String kafkaConfigPath = "kafka.properties";
ParameterTool kafkaTool;
try {
kafkaTool = ParameterTool.fromPropertiesFile(kafkaConfigPath);
......
bootstrap.servers=10.100.32.173:9092
kafka.input.topics=trips_info
auto.offset.reset=latest
group.id=wuyanfei
\ No newline at end of file
group.id=wuyanfei
checkpoint.path=file:///f/workspace/flink/state
checkpoint.interval=5000
\ No newline at end of file
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