Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 5892 invoked from network); 26 Jan 2011 09:58:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2011 09:58:05 -0000 Received: (qmail 21610 invoked by uid 500); 26 Jan 2011 09:58:02 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 20642 invoked by uid 500); 26 Jan 2011 09:57:59 -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 20634 invoked by uid 99); 26 Jan 2011 09:57:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 09:57:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryanobjc@gmail.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-iw0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 09:57:51 +0000 Received: by iwn40 with SMTP id 40so750182iwn.14 for ; Wed, 26 Jan 2011 01:57:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=diDwwixOt1abtuo1/foAUiJp89ub5/EK2J0FrTB6rGM=; b=VG8xkVg8SvNC/XOty95UJzOdbawPAC9xC7kNlNrE0wf8hNeVjSBwHKPRao0YJ7+AqB anhlEeP3HdyQlqSHkwQNSAsrDhLEvrYP3Ib/xrViFh+r2qnJG3g02lhuCOSqQfrNOMl1 QpzbpyHX4YttcX0Zr0J1gTaKdqT4orRnYYgF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=c/qoZwxMoXRyEjyi3Ya5XDQ5qGZXU0ICmUfvZ6A7neRcj9cYj5JKzLpKXrusJS8Ty0 JOJ+Z1Y47kiPpTmQb2Qu1j0fYvPhzl/lGb4CN80dxGRwtuIrg2Yur7qNAMSpI/Ra4ATe cAvp9aOk0yLT2udGMq/v53Ua2eCZFtpEaOqok= MIME-Version: 1.0 Received: by 10.231.38.6 with SMTP id z6mr7954373ibd.8.1296035851142; Wed, 26 Jan 2011 01:57:31 -0800 (PST) Received: by 10.231.33.73 with HTTP; Wed, 26 Jan 2011 01:57:31 -0800 (PST) Received: by 10.231.33.73 with HTTP; Wed, 26 Jan 2011 01:57:31 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Jan 2011 01:57:31 -0800 Message-ID: Subject: Re: Data format in HBase From: Ryan Rawson To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=0022152d5d69860784049abcdcae --0022152d5d69860784049abcdcae Content-Type: text/plain; charset=ISO-8859-1 Check out the bytes utility class had methods for converting songs to byte arrays and vice versa. If you have numeric data, you can save on space by using the Bytes.toBytes(int) etc calls, instead of converting to string first. This can make it a bit harder top display in the shell since it will look like a hex dump not a number, but consider a long can have 19 decimal digits, but only takes up 8 bytes, you can see the attraction. At su we use binary storage, but it does make hive interop a little harder. But the savings can be substantial! On Jan 26, 2011 1:47 AM, "Eric" wrote: > I'm wondering what the best way is to store my data in HBase. I'm currently > converting everything to a string and then to a bytes array. > What are others doing? Plain text to to byte arrays and eventually convert > your data back to floats, int, etcetera? --0022152d5d69860784049abcdcae--