diff --git serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java index cade8c3..46997f8 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java +++ serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java @@ -163,7 +163,7 @@ public Object deserialize(List columnNames, List columnTypes, reEncoder = new SchemaReEncoder(r.getSchema(), readerSchema); reEncoderCache.put(recordReaderId, reEncoder); } else{ - LOG.info("Adding new valid RRID :" + recordReaderId); + LOG.debug("Adding new valid RRID :" + recordReaderId); noEncodingNeeded.add(recordReaderId); } if(reEncoder != null) { diff --git serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java index efff663..0e4e4c6 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java +++ serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java @@ -84,7 +84,7 @@ public void initialize(Configuration configuration, Properties tableProperties, public void initialize(Configuration configuration, Properties properties) throws SerDeException { // Reset member variables so we don't get in a half-constructed state if (schema != null) { - LOG.info("Resetting already initialized AvroSerDe"); + LOG.debug("Resetting already initialized AvroSerDe"); } schema = null; @@ -110,10 +110,12 @@ public void initialize(Configuration configuration, Properties properties) throw properties.setProperty(AvroSerdeUtils.AvroTableProperties.SCHEMA_LITERAL.getPropName(), schema.toString()); } - LOG.info("Avro schema is " + schema); + if (LOG.isDebugEnabled()) { + LOG.debug("Avro schema is " + schema); + } if (configuration == null) { - LOG.info("Configuration null, not inserting schema"); + LOG.debug("Configuration null, not inserting schema"); } else { configuration.set( AvroSerdeUtils.AvroTableProperties.AVRO_SERDE_SCHEMA.getPropName(), schema.toString(false)); @@ -136,7 +138,10 @@ public static Schema getSchemaFromCols(Properties properties, //Comments are separated by "\0" in columnCommentProperty, see method getSchema //in MetaStoreUtils where this string columns.comments is generated columnComments = Arrays.asList(columnCommentProperty.split("\0")); - LOG.info("columnComments is " + columnCommentProperty); + + if (LOG.isDebugEnabled()) { + LOG.debug("columnComments is " + columnCommentProperty); + } } if (columnNames.size() != columnTypes.size()) { throw new IllegalArgumentException("AvroSerde initialization failed. Number of column " + diff --git serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java index 4edf654..e6e307d 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java +++ serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java @@ -131,8 +131,11 @@ protected static Schema getSchemaFromFS(String schemaFSUrl, fs = FileSystem.get(new URI(schemaFSUrl), conf); } catch (IOException ioe) { //return null only if the file system in schema is not recognized - String msg = "Failed to open file system for uri " + schemaFSUrl + " assuming it is not a FileSystem url"; - LOG.debug(msg, ioe); + if (LOG.isDebugEnabled()) { + String msg = "Failed to open file system for uri " + schemaFSUrl + " assuming it is not a FileSystem url"; + LOG.debug(msg, ioe); + } + return null; } try { diff --git serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java index 866c33d..1c8bc48 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java +++ serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerializer.java @@ -56,8 +56,6 @@ import org.apache.hadoop.io.Writable; class AvroSerializer { - private static final Log LOG = LogFactory.getLog(AvroSerializer.class); - /** * The Schema to use when serializing Map keys. * Since we're sharing this across Serializer instances, it must be immutable;