HDFS-12094. Log torrent when none isa-l EC is used. Contributed by LiXin Ge.

This commit is contained in:
Wei-Chiu Chuang 2017-07-21 12:24:09 -07:00
parent 4a771d9010
commit 465c213439
2 changed files with 14 additions and 5 deletions

View File

@ -178,8 +178,10 @@ private static RawErasureEncoder createRawEncoderWithFallback(
}
} catch (LinkageError | Exception e) {
// Fallback to next coder if possible
LOG.warn("Failed to create raw erasure encoder " + rawCoderName +
", fallback to next codec if possible", e);
if (LOG.isDebugEnabled()) {
LOG.debug("Failed to create raw erasure encoder " + rawCoderName +
", fallback to next codec if possible", e);
}
}
}
throw new IllegalArgumentException("Fail to create raw erasure " +
@ -198,12 +200,14 @@ private static RawErasureDecoder createRawDecoderWithFallback(
}
} catch (LinkageError | Exception e) {
// Fallback to next coder if possible
LOG.warn("Failed to create raw erasure decoder " + rawCoderName +
", fallback to next codec if possible", e);
if (LOG.isDebugEnabled()) {
LOG.debug("Failed to create raw erasure decoder " + rawCoderName +
", fallback to next codec if possible", e);
}
}
}
throw new IllegalArgumentException("Fail to create raw erasure " +
"encoder with given codec: " + codecName);
"decoder with given codec: " + codecName);
}
private static ErasureCodec createCodec(Configuration conf,

View File

@ -50,6 +50,11 @@ public final class ErasureCodeNative {
}
LOADING_FAILURE_REASON = problem;
}
if (LOADING_FAILURE_REASON != null) {
LOG.warn("ISA-L support is not available in your platform... " +
"using builtin-java codec where applicable");
}
}
private ErasureCodeNative() {}