HDFS-2360. Ugly stacktrce when quota exceeds. (harsh)
(cherry picked from commit 046521cd65
)
This commit is contained in:
parent
9f227ad696
commit
cbb8858367
|
@ -8,6 +8,8 @@ Release 2.8.0 - UNRELEASED
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
HDFS-2360. Ugly stacktrace when quota exceeds. (harsh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -57,6 +57,7 @@ import org.apache.hadoop.fs.Syncable;
|
||||||
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
|
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
|
||||||
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream.SyncFlag;
|
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream.SyncFlag;
|
||||||
import org.apache.hadoop.hdfs.protocol.BlockStoragePolicy;
|
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.DSQuotaExceededException;
|
||||||
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
|
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
|
||||||
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||||
|
@ -550,7 +551,13 @@ public class DFSOutputStream extends FSOutputSummer
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
// Log warning if there was a real error.
|
// Log warning if there was a real error.
|
||||||
if (restartingNodeIndex.get() == -1) {
|
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) {
|
if (e instanceof IOException) {
|
||||||
setLastException((IOException)e);
|
setLastException((IOException)e);
|
||||||
|
|
Loading…
Reference in New Issue