diff --git serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java index c7289cb..8f6a911 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java +++ serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java @@ -17,20 +17,21 @@ */ package org.apache.hadoop.hive.serde2.avro; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import java.util.HashMap; import java.util.Map; import java.util.Set; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + /** - * Cache for objects whose creation only depends on some other set of objects - * and therefore can be used against other equivalent versions of those - * objects. Essentially memoizes instance creation. + * Cache for objects whose creation only depends on some other set of objects and therefore can be + * used against other equivalent versions of those objects. Essentially memoizes instance creation. * - * @param Object that determines the instance - * @param Instance that will be created from SeedObject. + * @param Object that determines the instance. The cache uses this object as a key for + * its hash which is why it is imperative to have appropriate equals and hashcode + * implementation for this object for the cache to work properly + * @param Instance that will be created from SeedObject. */ public abstract class InstanceCache { private static final Log LOG = LogFactory.getLog(InstanceCache.class);