WARN hdfs.DFSClient: Caught exception java.lang.InterruptedException

本文探讨了Hadoop中DFSOutputStream存在的一个问题,在某些情况下会导致InterruptedException。该问题在HDFS-9794中得到解决,通过调整日志级别从警告到调试来避免不必要的警告输出。

 

Hadoop 2.7.4

 

image

 

The reason is this: originally, DataStreamer::closeResponder always prints a warning about InterruptedException; since HDFS-9812, DFSOutputStream::closeImpl always forces threads to close, which causes InterruptedException.

A simple fix is to use debug level log instead of warning level.

 

 

In HDFS-9794, it has solved problem of that stream thread leak if failure happens when closing the striped outputstream. And in DFSOutputStream, it also exists the same problem in DFSOutputStream#closeImpl. If failures happen when flushing data blocks, the streamer threads will also not be closed.

 

When closing the DFSStripedOutputStream, if failures happen while flushing out the data/parity blocks, the streamer threads will not be closed.

 

这个是Hadoop的一个bug,大概的意思是:

 

首先是HDFS 9794的bug:

当关闭DFSStripedOutputStream的时候,如果在向data/parity块刷回数据失败的时候,streamer线程不会被关闭。同时在DFSOutputStream#closeImpl中也存在这个问题。

 

DFSOutputStream#closeImpl总是会强制性地关闭线程,会引起InterruptedException。

 

 

解决的方法是:将日志的级别从warning改成debug。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值