Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 83700 invoked from network); 23 Oct 2009 01:46:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 01:46:23 -0000 Received: (qmail 60958 invoked by uid 500); 23 Oct 2009 01:46:22 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 60914 invoked by uid 500); 23 Oct 2009 01:46: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 60904 invoked by uid 99); 23 Oct 2009 01:46:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 01:46: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; Fri, 23 Oct 2009 01:46:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6014D234C045 for ; Thu, 22 Oct 2009 18:45:59 -0700 (PDT) Message-ID: <684857062.1256262359379.JavaMail.jira@brutus> Date: Fri, 23 Oct 2009 01:45:59 +0000 (UTC) From: "Dave Latham (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Updated: (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:all-tabpanel ] Dave Latham updated HBASE-1930: ------------------------------- Attachment: 1930-2.patch You're absolutely right, Stack. That's what I get to revising the constructors too many times. Here's a revised patch. > 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-2.patch, 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.