Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 16008 invoked from network); 22 Oct 2009 21:54:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 21:54:23 -0000 Received: (qmail 18005 invoked by uid 500); 22 Oct 2009 21:54:22 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 17950 invoked by uid 500); 22 Oct 2009 21:54:22 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 17940 invoked by uid 99); 22 Oct 2009 21:54:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 21:54:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 21:54:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 64485234C045 for ; Thu, 22 Oct 2009 14:53:59 -0700 (PDT) Message-ID: <482548244.1256248439395.JavaMail.jira@brutus> Date: Thu, 22 Oct 2009 21:53:59 +0000 (UTC) From: "Jonathan Gray (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-1930) Put.setTimeStamp misleading (doesn't change timestamp on existing KeyValues, not copied in copy constructor) In-Reply-To: <1750581611.1256244059540.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768927#action_12768927 ] Jonathan Gray commented on HBASE-1930: -------------------------------------- Good catch. Patch looks good, Dave. Will run it through tests tomorrow and commit if no one else does before me. Thanks. > Put.setTimeStamp misleading (doesn't change timestamp on existing KeyValues, not copied in copy constructor) > ------------------------------------------------------------------------------------------------------------ > > Key: HBASE-1930 > URL: https://issues.apache.org/jira/browse/HBASE-1930 > Project: Hadoop HBase > Issue Type: Bug > Components: client > Affects Versions: 0.20.0, 0.20.1 > Reporter: Dave Latham > Priority: Minor > Fix For: 0.21.0 > > Attachments: 1930.patch > > > In the process of migrating some code from 0.19, and was changing BatchUpdate's to Put's. I was hit by a bit of a gotcha. In the old code, I populated the BatchUpdate, then set the timestamp. However, this doesn't wotk for Put, because Put creates KeyValue's with the currently set timestamp when adding values. Setting the timestamp at the end has no effect. Also, the copy constructor doesn't copy the timestamp (or writeToWAL) setting. > One option would be to simply update the javadoc to make it clear that the timestamp needs to be set prior to adding values. I'm attaching a proposed patch which moves the timestamp setting to constructor only so that it isn't possible to trigger the confusing case at all. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.