执行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.
735 0
|
2月前
|
网络安全
client_loop: send disconnect: Connection reset by peerB/s4-5
client_loop: send disconnect: Connection reset by peerB/s4-5
|
4月前
|
网络协议 网络安全 数据库
【已解决】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
201 0
|
6月前
|
测试技术
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 的解决办法
232 0
|
网络协议 安全 Linux
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
如何修复 SSH Client_loop: send disconnect: Broken pipe Error
3161 1
|
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
1548 0
|
关系型数据库 MySQL 数据库连接
一文全解决 数据库连接报错Communications link failure,create connection SQLException
一文全解决 数据库连接报错Communications link failure,create connection SQLException
5311 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.
604 0
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.