Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57BDF9B65 for ; Mon, 28 Nov 2011 23:50:46 +0000 (UTC) Received: (qmail 31875 invoked by uid 500); 28 Nov 2011 23:50:45 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 31849 invoked by uid 500); 28 Nov 2011 23:50:45 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 31841 invoked by uid 99); 28 Nov 2011 23:50:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 23:50:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 74.125.83.41 as permitted sender) Received: from [74.125.83.41] (HELO mail-ee0-f41.google.com) (74.125.83.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 23:50:39 +0000 Received: by eeaq46 with SMTP id q46so1040190eea.14 for ; Mon, 28 Nov 2011 15:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=l/hlGCzLdKq5G4g4dbBXtXrFL0M1dxuwI3HwIREso8g=; b=jhWlnomvlWUffwSdTr/Q1uWhHZeJnKDfebgox4Ge4eSXnx9EeOqXbhXqDajZsuEDwg ErJ1H16JD4nqz9IU3EVG83l+x2ZlO6h0rnCRSiVxy1rbmYdgLUNjDLoQZ/ozHk6hMCVG RYlUuS5zs3zphknOjmwfK18FoEjKTa3zyogUg= MIME-Version: 1.0 Received: by 10.227.197.212 with SMTP id el20mr14770631wbb.7.1322524219253; Mon, 28 Nov 2011 15:50:19 -0800 (PST) Received: by 10.217.4.137 with HTTP; Mon, 28 Nov 2011 15:50:19 -0800 (PST) In-Reply-To: References: Date: Mon, 28 Nov 2011 15:50:19 -0800 Message-ID: Subject: Re: Compression.Algorithm extensibility? From: Ted Yu To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=0015174c13124ba79104b2d42a56 X-Virus-Checked: Checked by ClamAV on apache.org --0015174c13124ba79104b2d42a56 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable https://issues.apache.org/jira/browse/HBASE-4887 has been created. On Mon, Nov 28, 2011 at 3:42 PM, Doug Meil w= rote: > > I'd vote for the full enum name in the file too instead of the ordinal. > > > > On 11/28/11 5:58 PM, "Todd Lipcon" wrote: > > >Seems like we're doing some over-optimization here using ordinals. Why > >not just write out the full enum name into the file? A few extra bytes > >in the header of a multi-MB HFile hardly seems expensive. > > > >Could probably switch this over in a backward-compatible manner pretty > >easily if someone has time to do the patch. > > > >-Todd > > > >On Mon, Nov 28, 2011 at 9:57 AM, Stack wrote: > >> On Mon, Nov 28, 2011 at 8:26 AM, Doug Meil > >> wrote: > >>> Hi folks- > >>> > >>> In Compression.java there is this comment=C5=A0 > >>> > >>> > >>> /** > >>> > >>> * Compression algorithms. The ordinal of these cannot change or els= e > >>>you > >>> > >>> * risk breaking all existing HFiles out there. Even the ones that > >>>are > >>> > >>> * not compressed! (They use the NONE algorithm) > >>> > >>> */ > >>> > >>> public static enum Algorithm { > >>> > >>> =C5=A0 which makes the prospect of adding new instances slightly > >>>terrifying. Has anybody considered changing the constructor to supply > >>>an ordinal value, and that way if anybody adds a custom one they could > >>>supply a value like 9999999 or something hopefully never used by HBase= ? > >>> > >>> > >> > >> The comment is just to warn against damage if ordinals are removed or > >> reordered. Do whatever it is you need to make it work Doug. It > >> should be possible to insert other compressors w/o gymnastics. > >> St.Ack > >> > > > > > > > >-- > >Todd Lipcon > >Software Engineer, Cloudera > > > > > --0015174c13124ba79104b2d42a56--