执行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;


结束!

目录
相关文章
|
1月前
|
SQL 关系型数据库 MySQL
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
SQL Error (2013): Lost connection to MySQL server at 'waiting for initial communication packet', sys...
|
7月前
|
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.
472 0
|
6月前
The transaction associated with this command is not the connection‘s active
The transaction associated with this command is not the connection‘s active
75 0
|
4月前
|
测试技术
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 的解决办法
130 0
|
11月前
|
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
1102 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.
428 0
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
|
关系型数据库 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.这个是数据库查询报出的错误,所以我们先登录一下数据库,查询看看具体报错
166 0
|
应用服务中间件 nginx
[error] 17755#0: *58522 readv() failed (104: Connection reset by peer) while reading upstream
[error] 17755#0: *58522 readv() failed (104: Connection reset by peer) while reading upstream
4917 0