flink sql client讀取hive時卡住
問題復現如下:
檢視$FLINK_HOME/log/flink-appleyuchi-sql-client-Desktop.log
2020-12-23 11:48:56,811 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Opening socket connection to server Laptop/192.168.0.103:2182. Will not attempt to authenticate using SASL (unknown error)
2020-12-23 11:48:56,814 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Socket error occurred: Laptop/192.168.0.103:2182: Connection refused
2020-12-23 11:48:56,915 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Opening socket connection to server Desktop/192.168.0.102:2181. Will not attempt to authenticate using SASL (unknown error)
2020-12-23 11:48:56,915 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Socket error occurred: Desktop/192.168.0.102:2181: Connection refused
2020-12-23 11:48:57,016 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Opening socket connection to server Laptop/192.168.0.103:2183. Will not attempt to authenticate using SASL (unknown error)
2020-12-23 11:48:57,019 INFO org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.ClientCnxn [] - Socket error occurred: Laptop/192.168.0.103:2183: Connection refused
解決方案:
啟動zookeeper叢集
########################################################################################################################################################################
然後重啟Flink SQL Client發現讀取hive時再次卡住,
再次檢視$FLINK_HOME/log/flink-appleyuchi-sql-client-Desktop.log
2020-12-23 11:01:07,786 WARN org.apache.flink.table.client.cli.CliClient [] - Could not execute SQL statement.
org.apache.flink.table.client.gateway.SqlExecutionException: Error while submitting job.
at org.apache.flink.table.client.gateway.local.LocalExecutor.lambda$executeQueryInternal$7(LocalExecutor.java:554) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.gateway.local.ExecutionContext.wrapClassLoader(ExecutionContext.java:257) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.gateway.local.LocalExecutor.executeQueryInternal(LocalExecutor.java:549) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.gateway.local.LocalExecutor.executeQuery(LocalExecutor.java:365) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.cli.CliClient.callSelect(CliClient.java:634) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.cli.CliClient.callCommand(CliClient.java:324) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
at java.util.Optional.ifPresent(Optional.java:159) [?:1.8.0_131]
at org.apache.flink.table.client.cli.CliClient.open(CliClient.java:216) [flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.SqlClient.openCli(SqlClient.java:141) [flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.SqlClient.start(SqlClient.java:114) [flink-sql-client_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.table.client.SqlClient.main(SqlClient.java:196) [flink-sql-client_2.12-1.12.0.jar:1.12.0]
Caused by: java.util.concurrent.ExecutionException: org.apache.flink.runtime.client.JobSubmissionException: Failed to submit JobGraph.
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[?:1.8.0_131]
at org.apache.flink.table.client.gateway.local.LocalExecutor.lambda$executeQueryInternal$7(LocalExecutor.java:552) ~[flink-sql-client_2.12-1.12.0.jar:1.12.0]
... 10 more
Caused by: org.apache.flink.runtime.client.JobSubmissionException: Failed to submit JobGraph.
at org.apache.flink.client.program.rest.RestClusterClient.lambda$submitJob$7(RestClusterClient.java:366) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:852) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[?:1.8.0_131]
at org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$9(FutureUtils.java:361) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_131]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[?:1.8.0_131]
at org.apache.flink.runtime.concurrent.FutureUtils$Timeout.run(FutureUtils.java:1168) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.runtime.concurrent.DirectExecutorService.execute(DirectExecutorService.java:211) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.runtime.concurrent.FutureUtils.lambda$orTimeout$15(FutureUtils.java:549) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
Caused by: java.util.concurrent.TimeoutException
at org.apache.flink.runtime.concurrent.FutureUtils$Timeout.run(FutureUtils.java:1168) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.runtime.concurrent.DirectExecutorService.execute(DirectExecutorService.java:211) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at org.apache.flink.runtime.concurrent.FutureUtils.lambda$orTimeout$15(FutureUtils.java:549) ~[flink-dist_2.12-1.12.0.jar:1.12.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
解決方案:
看得我一臉蒙比,機緣巧合下手賤
啟動了Flink叢集(HA)
問題解決了.
##########################################################################################################################################################
綜上,Flink操作hive卡住問題有兩種情況
①Flink這邊的問題,
啟動Zookeeper叢集
啟動Flink叢集(HA)
②Hive本身操作表格和schema會卡住
Reference:
[1]Hive drop table時候卡死-各種情況的解決方案(持續更新中)
相關文章
- flink實戰--讀寫Hive(Flink on Hive)Hive
- Flink SQL Client初探SQLclient
- flink定時讀取mysqlMySql
- Flink SQL Client綜合實戰SQLclient
- Flink 1.16:Hive SQL 如何平遷到 Flink SQLHiveSQL
- hive sql語法解讀HiveSQL
- Hive SQL on Flink 構建流批一體引擎HiveSQL
- Flink 1.9 實戰:使用 SQL 讀取 Kafka 並寫入 MySQLKafkaMySql
- flink讀取iceberg v2表
- flink sql 實時同步及離線同步SQL
- SQL* Net message to client 和SQL * Net more data to client等待事件SQLclient事件
- 讀取SQL Server 表結構SQLServer
- Flink實戰之寫Hive效能問題Hive
- hive sql 13位毫秒時間戳轉日期HiveSQL時間戳
- Hive SQL 監控系統 - Hive FalconHiveSQL
- 《從0到1學習Flink》—— Flink 讀取 Kafka 資料批量寫入到 MySQLKafkaMySql
- client快取機制client快取
- SQL*Net break/reset to clientSQLclient
- SQL Server 中讀取當前年月SQLServer
- mysql hive sql 進階MySqlHive
- hive02_SQL操作HiveSQL
- sql server獲取時間格式SQLServer
- flink快速入門(部署+flink-sql)SQL
- java讀取視訊時長Java
- 伍翀 :大資料實時計算Flink SQL解密大資料SQL解密
- CSS-T | Mysql Client 任意檔案讀取攻擊鏈擴充CSSMySqlclient
- SQL*Net message from clientSQLclient
- SQL*Net more data from clientSQLclient
- SQL*Net break/reset to client等待SQLclient
- 訊息推送平臺的實時數倉?!flink消費kafka訊息入到hiveKafkaHive
- Logstash : 從 SQL Server 讀取資料SQLServer
- Hive SQL必刷練習題:同時線上人數問題(*****)HiveSQL
- Hive sql語法詳解HiveSQL
- Hive原始碼閱讀之路Hive原始碼
- Flink的Table以及SQLSQL
- plsql 32位,Oracle Client 64位 無法讀取tnsnames.ora檔案SQLOracleclient
- Hive on Spark和Spark sql on Hive,你能分的清楚麼HiveSparkSQL
- Hive on Spark 和 Spark sql on Hive,你能分的清楚麼HiveSparkSQL