HDFS-14187. Make warning message more clear when there are not enough data nodes for EC write. Contributed by Kitti Nanasi.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
Kitti Nanasi 2019-01-31 16:06:45 -08:00 committed by Wei-Chiu Chuang
parent f738b397ae
commit 0ab7fc9200

View File

@ -497,7 +497,10 @@ private void allocateNewBlock() throws IOException {
// Set exception and close streamer as there is no block locations // Set exception and close streamer as there is no block locations
// found for the parity block. // found for the parity block.
LOG.warn("Cannot allocate parity block(index={}, policy={}). " + LOG.warn("Cannot allocate parity block(index={}, policy={}). " +
"Not enough datanodes? Exclude nodes={}", i, ecPolicy.getName(), "Exclude nodes={}. There may not be enough datanodes or " +
"racks. You can check if the cluster topology supports " +
"the enabled erasure coding policies by running the command " +
"'hdfs ec -verifyClusterSetup'.", i, ecPolicy.getName(),
excludedNodes); excludedNodes);
si.getLastException().set( si.getLastException().set(
new IOException("Failed to get parity block, index=" + i)); new IOException("Failed to get parity block, index=" + i));