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 SQL Client初探SQLclient
- flink實戰--讀寫Hive(Flink on Hive)Hive
- Flink 1.16:Hive SQL 如何平遷到 Flink SQLHiveSQL
- flink定時讀取mysqlMySql
- Flink SQL Client綜合實戰SQLclient
- Hive SQL on Flink 構建流批一體引擎HiveSQL
- Flink 1.9 實戰:使用 SQL 讀取 Kafka 並寫入 MySQLKafkaMySql
- flink讀取iceberg v2表
- flink sql 實時同步及離線同步SQL
- flink快速入門(部署+flink-sql)SQL
- Logstash : 從 SQL Server 讀取資料SQLServer
- hive sql 13位毫秒時間戳轉日期HiveSQL時間戳
- hive02_SQL操作HiveSQL
- 《從0到1學習Flink》—— Flink 讀取 Kafka 資料批量寫入到 MySQLKafkaMySql
- 伍翀 :大資料實時計算Flink SQL解密大資料SQL解密
- Flink實戰之寫Hive效能問題Hive
- 【等待事件】SQL*Net vector date to client事件SQLclient
- 【等待事件】SQL*Net more data to client事件SQLclient
- Flink的Table以及SQLSQL
- CSS-T | Mysql Client 任意檔案讀取攻擊鏈擴充CSSMySqlclient
- Hive sql語法詳解HiveSQL
- Hive SQL必刷練習題:同時線上人數問題(*****)HiveSQL
- Hive on Spark和Spark sql on Hive,你能分的清楚麼HiveSparkSQL
- Hive on Spark 和 Spark sql on Hive,你能分的清楚麼HiveSparkSQL
- 淺析 Flink Table/SQL APISQLAPI
- Flink SQL之Over 聚合操作SQL
- hive06_SQL最佳化HiveSQL
- 訊息推送平臺的實時數倉?!flink消費kafka訊息入到hiveKafkaHive
- [20201214]再遇SQL*Net break/reset to client.txtSQLclient
- Flink 實踐教程-入門(6):讀取 PG 資料寫入 ClickHouse
- Hive原始碼閱讀之路Hive原始碼
- Hive Tutorial 閱讀記錄Hive
- spark讀取hive異常,java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunningSparkHiveJavaErrorApacheAPISession
- 使用Flink SQL進行實時效能監控:AdTech廣告用例SQL
- spark2.2.0 配置spark sql 操作hiveSparkSQLHive
- SQL-Hive中的Select From解析SQLHive
- Flink SQL管理平臺flink-streaming-platform-web安裝搭建SQLPlatformWeb
- Flink 實踐教程 - 入門(4):讀取 MySQL 資料寫入到 ESMySql