Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52DAE18B4E for ; Tue, 25 Aug 2015 21:28:39 +0000 (UTC) Received: (qmail 13116 invoked by uid 500); 25 Aug 2015 21:28:33 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 13019 invoked by uid 500); 25 Aug 2015 21:28:33 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 10995 invoked by uid 99); 25 Aug 2015 21:28:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 21:28:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E94CBE7D9E; Tue, 25 Aug 2015 21:28:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sershe@apache.org To: commits@hive.apache.org Date: Tue, 25 Aug 2015 21:29:17 -0000 Message-Id: <31f2562b9b1949efadb087668eca97f6@git.apache.org> In-Reply-To: <262b3785a26c4068913ec704c574f42e@git.apache.org> References: <262b3785a26c4068913ec704c574f42e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [47/50] [abbrv] hive git commit: HIVE-11469 : Update doc for InstanceCache to clearly define the contract on the SeedObject (Swarnim Kulkarni via Ashutosh Chauhan) HIVE-11469 : Update doc for InstanceCache to clearly define the contract on the SeedObject (Swarnim Kulkarni via Ashutosh Chauhan) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/dd2bdfc6 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/dd2bdfc6 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/dd2bdfc6 Branch: refs/heads/llap Commit: dd2bdfc6702f8ecb88255c4258e4449aa9b75af5 Parents: 7796dd6 Author: Swarnim Kulkarni Authored: Fri Aug 7 09:53:00 2015 -0800 Committer: Ashutosh Chauhan Committed: Mon Aug 24 10:30:16 2015 -0700 ---------------------------------------------------------------------- .../hadoop/hive/serde2/avro/InstanceCache.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/dd2bdfc6/serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java ---------------------------------------------------------------------- diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java b/serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java index c7289cb..8f6a911 100644 --- a/serde/src/java/org/apache/hadoop/hive/serde2/avro/InstanceCache.java +++ b/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);