diff --git serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java index 982e6d3..275b064 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java +++ serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java @@ -27,6 +27,7 @@ public class LazyBinary extends LazyPrimitive { private static final Log LOG = LogFactory.getLog(LazyBinary.class); + private static final boolean DEBUG_LOG_ENABLED = LOG.isDebugEnabled(); LazyBinary(LazyBinaryObjectInspector oi) { super(oi); @@ -55,7 +56,7 @@ public void init(ByteArrayRef bytes, int start, int length) { // todo this should be configured in serde private byte[] decodeIfNeeded(byte[] recv) { boolean arrayByteBase64 = Base64.isArrayByteBase64(recv); - if (arrayByteBase64) { + if (DEBUG_LOG_ENABLED && arrayByteBase64) { LOG.debug("Data only contains Base64 alphabets only so try to decode the data."); } return arrayByteBase64 ? Base64.decodeBase64(recv) : recv;