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


结束!

目录
相关文章
|
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.
860 0
|
7月前
|
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...
196 0
【已解决】kex_exchange_identification: Connection closed by remote host fatal: Could not read from
【已解决】kex_exchange_identification: Connection closed by remote host fatal: Could not read from
The transaction associated with this command is not the connection‘s active
The transaction associated with this command is not the connection‘s active
222 0
|
7月前
|
测试技术
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 的解决办法
259 0
|
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
1658 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.
638 0
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.
|
NoSQL MongoDB
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
1083 0
运行 mongo 出现 Error: couldn‘t connect to server 127.0.0.1:27017, connection attempt failed
|
关系型数据库 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.这个是数据库查询报出的错误,所以我们先登录一下数据库,查询看看具体报错
201 0