Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78AF711D6F for ; Tue, 10 Jun 2014 12:35:44 +0000 (UTC) Received: (qmail 16790 invoked by uid 500); 10 Jun 2014 12:35:42 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 16737 invoked by uid 500); 10 Jun 2014 12:35:41 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 16726 invoked by uid 99); 10 Jun 2014 12:35:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 12:35:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.192.169 as permitted sender) Received: from [209.85.192.169] (HELO mail-pd0-f169.google.com) (209.85.192.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 12:35:36 +0000 Received: by mail-pd0-f169.google.com with SMTP id w10so6077247pde.28 for ; Tue, 10 Jun 2014 05:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=yJkMD2+jay43vQ8xdxpSWEd+9wPBY7yQ5QN31ExYhK8=; b=gztVes0GBrOGmmh7Lyljo1VgH/Au0a7Xg+DJojdPis36VS9wzNOVm1CTkmbe2hhmYD tAjRUk3HymswcfghOy71tgYE/fRUbYsce7/SnY4nUx93wQiAZ2iJaM0UVXFg6+7zw/1Z BnlNq+NemTZ3rB9C4h4c+BFGrrkkIT7WxoHkRuGZDiaTLY6A1gQK49C8KJfg6t+QBXKC qaksUj0C4sg0z/8Iz/3RwfaeRzR0IWnwpViBjgoMJkCtBEQPxANOVv/itgHZ+Cg6k2o6 SoV+WOkP4f61BTfJ3iBrDVLgK+K9326EMQG3Kw/BT3LFuj54fLXtMECAsidLuGX9U9Iz CZTw== X-Received: by 10.68.135.100 with SMTP id pr4mr11603262pbb.46.1402403716413; Tue, 10 Jun 2014 05:35:16 -0700 (PDT) Received: from [192.168.0.13] (c-24-130-236-83.hsd1.ca.comcast.net. [24.130.236.83]) by mx.google.com with ESMTPSA id zx1sm69343890pbc.60.2014.06.10.05.35.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 05:35:15 -0700 (PDT) References: <0DB8B1B8-AAC6-456A-95F5-C551782E625E@gmail.com> <5396D8D5.6040100@pragsis.com> Mime-Version: 1.0 (1.0) In-Reply-To: <5396D8D5.6040100@pragsis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: "user@hbase.apache.org" X-Mailer: iPhone Mail (10B146) From: Ted Yu Subject: Re: Delete rowKey in hexadecimal array bytes. Date: Tue, 10 Jun 2014 05:35:15 -0700 To: "user@hbase.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Can you pastebin your junit test ? Thanks On Jun 10, 2014, at 3:07 AM, gortiz wrote: > I think we are in different points :). >=20 > The problem is when the comparation of the keys when I use Hex.decode >=20 > I emit keyValues on this way and works, but it spends double of memory to s= tore keys. >=20 > rowKey =3D Bytes.toBytes(DigestUtils.*shaHex*(pOutput.getRow())); > KeyValue kv =3D > new KeyValue(Bytes.toBytes(pOutput.getRow()), family, n= ull, ts, type, null); >=20 > If I use for rowKey: > rowKey =3D DigestUtils.*sha*(pOutput.getRow()); > it doesn't work, I don't know why, since it's an byte array. But, I coded s= ome Junit test and it never deletes the keys. >=20 >=20 >=20 >=20 > On 09/06/14 13:43, Ted Yu wrote: >> Decode rowkey has timestamp. >> KeyValue has timestamp field. >>=20 >> Do these two timestamps carry the same value ? >>=20 >> Cheers >>=20 >> On Jun 9, 2014, at 2:02 AM, Guillermo Ortiz wrote:= >>=20 >>> Hi, >>>=20 >>> I'm generating key with SHA1, as it's a hex representation after generat= ing >>> the keys, I use Hex.decode to save memory since I could store them in ha= lf >>> space. >>>=20 >>> I have a MapReduce process which deletes some of these keys, the problem= >>> it's that it's that when I try to delete them, but I don't get it. If I >>> don't do the parse to Hex, it works. >>>=20 >>> So, For example, I put the keys in SHA like >>> b343664e210e7a7abff3625a005e65e2b0d4616 works, but if I parse this key w= ith >>> Hex.decode to *\xB3CfN!\x0Ezz\xBF\xF3bZ\x00^e\xE2\xB0\ *column=3Dl:dd, >>> timestamp=3D1384317115000 .... it doesn't. >>>=20 >>> I have been checked the code a lot but I think it's right, plus, if I >>> comments the decode to Hex it works. >>>=20 >>> Any clue about it? is there any problem with I am trying to?? >=20 >=20 > --=20 > *Guillermo Ortiz* > /Big Data Developer/ >=20 > Telf.: +34 917 680 490 > Fax: +34 913 833 301 > C/ Manuel Tovar, 49-53 - 28034 Madrid - Spain >=20 > _http://www.bidoop.es_ >=20