HDFS-2360. Ugly stacktrce when quota exceeds. (harsh)
This commit is contained in:
parent
56085203c4
commit
046521cd65
@ -321,6 +321,8 @@ Release 2.8.0 - UNRELEASED
|
||||
|
||||
IMPROVEMENTS
|
||||
|
||||
HDFS-2360. Ugly stacktrace when quota exceeds. (harsh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -57,6 +57,7 @@
|
||||
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
|
||||
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream.SyncFlag;
|
||||
import org.apache.hadoop.hdfs.protocol.BlockStoragePolicy;
|
||||
import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
|
||||
import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException;
|
||||
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
|
||||
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||
@ -551,7 +552,13 @@ public void run() {
|
||||
} catch (Throwable e) {
|
||||
// Log warning if there was a real error.
|
||||
if (restartingNodeIndex.get() == -1) {
|
||||
DFSClient.LOG.warn("DataStreamer Exception", e);
|
||||
// Since their messages are descriptive enough, do not always
|
||||
// log a verbose stack-trace WARN for quota exceptions.
|
||||
if (e instanceof QuotaExceededException) {
|
||||
DFSClient.LOG.debug("DataStreamer Quota Exception", e);
|
||||
} else {
|
||||
DFSClient.LOG.warn("DataStreamer Exception", e);
|
||||
}
|
||||
}
|
||||
if (e instanceof IOException) {
|
||||
setLastException((IOException)e);
|
||||
|
Loading…
Reference in New Issue
Block a user