Timeout of 60000ms expired before the position for partition tv_log-1 could be determined
大概意思:消费kafka,在某个分区连接超时超时了60000ms
这个时候要检查:C:\Windows\System32\drivers\etc\目录下的hosts是否添加了相应的映射信息,还要要看设置Flink分区的数量是否与Kafka集群的分区数量一直
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(3);//注意:数量要与kafka分区对应
Properties props = new Properties();
props.setProperty("bootstrap.servers", "hadoop111:9092,hadoop112:9092,hadoop113:9092");//集群地址
我这里有3个分区,所以setParallelism
设置成了3