当前位置:网站首页>Flink reads MySQL and PgSQL at the same time, and the program will get stuck without logs
Flink reads MySQL and PgSQL at the same time, and the program will get stuck without logs
2022-04-23 08:48:00 【zs_ bigdata】
One . problem
As the title ,flink The program will always get stuck initialize Stage , And there will be no logs
Two . solve
Read from the program mysql And pgsql The way to use is :
DriverManager.getConnection(URL, USERNAME, PASSWORD);
test , If only mysql, Or just ask pgsql There are normal data , At this point I wonder if there is a problem with this method
hold mysql Request to use the druid to get the connection instead
dataSource = new DruidDataSource();
dataSource.setDriverClassName(MysqlConfig.DriverName);
dataSource.setUrl(MysqlConfig.MYSQL_URL);
dataSource.setUsername(MysqlConfig.USERNAME);
dataSource.setPassword(MysqlConfig.PASSWORD);
dataSource.getConnection();
Restart the program , After discovery, you can request two databases at the same time
3、 ... and . doubt
I don't know whether this method has this limitation or flink Internally caused , I hope you can give me some advice
DriverManager.getConnection(URL, USERNAME, PASSWORD);
版权声明
本文为[zs_ bigdata]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230847378438.html
边栏推荐
猜你喜欢

增强现实技术是什么?能用在哪些地方?

PgSQL wants to implement all kinds of column sub query operations of MySQL

PLC的点表(寄存器地址和点表定义)破解探测方案--方便工业互联网数据采集

Test your machine learning pipeline

idea打包 jar文件

Enterprise wechat application authorization / silent login

STM32 uses Hal library. The overall structure and function principle are introduced

On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched

K210 learning notes (II) serial communication between k210 and stm32

Harbor企业级镜像管理系统实战
随机推荐
ONEFLOW learning notes: from functor to opexprinter
Latex paper typesetting operation
Go语言自学系列 | golang结构体作为函数参数
IDEA导入commons-logging-1.2.jar包
错误: 找不到或无法加载主类
Please arrange star trek in advance to break through the new playing method of chain tour, and the market heat continues to rise
xctf刷题小记
是否完全二叉搜索树 (30 分)
On time atom joins hands with oneos live broadcast, and the oneos system tutorial is fully launched
Harbor企业级镜像管理系统实战
正点原子携手OneOS直播 OneOS系统教程全面上线
面了一圈,整理了这套面试题。。
Introduction to GUI programming swing
请问中衍期货安全靠谱吗?
Stm32f103zet6 [development of standard library functions] - Introduction to library functions
求简单类型的矩阵和
Notes d'apprentissage oneflow: de functor à opexprinterpreter
Excle plus watermark
Star Trek强势来袭 开启元宇宙虚拟与现实的梦幻联动
关于cin,scanf和getline,getchar,cin.getline的混合使用