HDFS-11943. [Erasure coding] Warn log frequently print to screen in doEncode/doDecode functions. Contributed by liaoyuxiangqin
This commit is contained in:
parent
a594f96fb1
commit
379f19a2c7
|
@ -19,6 +19,7 @@ package org.apache.hadoop.io.erasurecode.rawcoder;
|
|||
|
||||
import org.apache.hadoop.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.io.erasurecode.ErasureCoderOptions;
|
||||
import org.apache.hadoop.util.PerformanceAdvisory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -66,7 +67,7 @@ abstract class AbstractNativeRawDecoder extends RawErasureDecoder {
|
|||
|
||||
@Override
|
||||
protected void doDecode(ByteArrayDecodingState decodingState) {
|
||||
LOG.warn("convertToByteBufferState is invoked, " +
|
||||
PerformanceAdvisory.LOG.debug("convertToByteBufferState is invoked, " +
|
||||
"not efficiently. Please use direct ByteBuffer inputs/outputs");
|
||||
|
||||
ByteBufferDecodingState bbdState = decodingState.convertToByteBufferState();
|
||||
|
@ -78,6 +79,11 @@ abstract class AbstractNativeRawDecoder extends RawErasureDecoder {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preferDirectBuffer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// To link with the underlying data structure in the native layer.
|
||||
// No get/set as only used by native codes.
|
||||
private long nativeCoder;
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.hadoop.io.erasurecode.rawcoder;
|
|||
|
||||
import org.apache.hadoop.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.io.erasurecode.ErasureCoderOptions;
|
||||
import org.apache.hadoop.util.PerformanceAdvisory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -63,7 +64,7 @@ abstract class AbstractNativeRawEncoder extends RawErasureEncoder {
|
|||
|
||||
@Override
|
||||
protected void doEncode(ByteArrayEncodingState encodingState) {
|
||||
LOG.warn("convertToByteBufferState is invoked, " +
|
||||
PerformanceAdvisory.LOG.debug("convertToByteBufferState is invoked, " +
|
||||
"not efficiently. Please use direct ByteBuffer inputs/outputs");
|
||||
|
||||
ByteBufferEncodingState bbeState = encodingState.convertToByteBufferState();
|
||||
|
@ -75,6 +76,11 @@ abstract class AbstractNativeRawEncoder extends RawErasureEncoder {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preferDirectBuffer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// To link with the underlying data structure in the native layer.
|
||||
// No get/set as only used by native codes.
|
||||
private long nativeCoder;
|
||||
|
|
Loading…
Reference in New Issue