执行HQL直接被退出:Remote side unexpectedly closed network connection

简介: 执行HQL直接被退出:Remote side unexpectedly closed network connection

执行HQL直接被退出:Remote side unexpectedly closed network connection


a53fa7633514475fa766316fab7a2e3e.jpeg



HQL语句

select city,layer, avg(total/size)from(select city,houseinfo[0] layer,substring(houseinfo[4],0,length(houseinfo[4])-2)as size,total from tb_ke_house 
) t
groupby city,layer;


执行情况描述

执行上述HQL,当执行到Map阶段时候,直接退出了当前执行语句,hdfs集群页一并被强制停止了。


原因

隐式转换 带来的问题,修改HQL语句将size在子查询中做cast强制转换


正确HQL

select city,layer, avg(total/size)from(select city,houseinfo[0] layer,cast(substring(houseinfo[4],0,length(houseinfo[4])-2)asint)as size,total from tb_ke_house 
) t
groupby city,layer;


结束!

目录
相关文章
|
6月前
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
464 0
|
5月前
The transaction associated with this command is not the connection‘s active
The transaction associated with this command is not the connection‘s active
72 0
|
3月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
128 0
|
10月前
|
jenkins 持续交付 网络安全
2. 成功解决 BUG:Exception when publishing, ...[Failed to connect and initialize SSH connection...
SSH: Connecting from host [WIN-...] SSH: Connecting with configuration [192.168....] ... ERROR: Exception when publishing, exception message [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [192.168....]. Message [java.net.ConnectException: Connection
1045 0
|
10月前
|
关系型数据库 MySQL 数据库连接
一文全解决 数据库连接报错Communications link failure,create connection SQLException
一文全解决 数据库连接报错Communications link failure,create connection SQLException
2128 0
|
Linux
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
416 0
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
|
网络协议 Java
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
330 0
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
|
关系型数据库 MySQL 数据库
【mysql错误 Mac】ERR_WHEN_INSERT_TO_DB\nError:Connection lost: The server closed the connection.
ERR_WHEN_INSERT_TO_DB\nError:Connection lost: The server closed the connection.这个是数据库查询报出的错误,所以我们先登录一下数据库,查询看看具体报错
164 0
|
数据库连接 数据库管理
报错 XAConnectionFactory: failed to create pooled connection - DBMS down or unreachable?
报错 XAConnectionFactory: failed to create pooled connection - DBMS down or unreachable?
532 0
报错 XAConnectionFactory: failed to create pooled connection - DBMS down or unreachable?

热门文章

最新文章