You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Sergey Shelukhin <se...@hortonworks.com> on 2012/10/15 19:58:12 UTC

COMPRESSION_COMPACT bug in shell?

Hi.

I am trying to clean up console code for table create and alter; I am new
to the codebase and see the following behavior in trunk.
When column family specifies COMPRESSION_COMPACT, during alter it's set on
the column descriptor:

          descriptor = hcd(arg, htd)

          if arg[COMPRESSION_COMPACT]
            descriptor.setValue(COMPRESSION_COMPACT,
arg[COMPRESSION_COMPACT])
          end

But during create it's set on the table descriptor:
      # (3) column family spec
              descriptor = hcd(arg, htd)
              htd.setValue(COMPRESSION_COMPACT, arg[COMPRESSION_COMPACT])
if ...

 I see that elsewhere in alter (table_att handling) it's also set on the
table descriptor.

Setting it on the column descriptor looks like a bug...
Is that so, or am I missing something?

Re: COMPRESSION_COMPACT bug in shell?

Posted by Stack <st...@duboce.net>.
On Mon, Oct 15, 2012 at 10:58 AM, Sergey Shelukhin
<se...@hortonworks.com> wrote:
> I am trying to clean up console code for table create and alter;

Thanks for looking into this Sergey.

> When column family specifies COMPRESSION_COMPACT, during alter it's set on
> the column descriptor:
>
>           descriptor = hcd(arg, htd)
>
>           if arg[COMPRESSION_COMPACT]
>             descriptor.setValue(COMPRESSION_COMPACT,
> arg[COMPRESSION_COMPACT])
>           end
>
> But during create it's set on the table descriptor:
>       # (3) column family spec
>               descriptor = hcd(arg, htd)
>               htd.setValue(COMPRESSION_COMPACT, arg[COMPRESSION_COMPACT])
> if ...
>
>  I see that elsewhere in alter (table_att handling) it's also set on the
> table descriptor.
>
> Setting it on the column descriptor looks like a bug...
> Is that so, or am I missing something?

I think setting it in HTableDescriptor is the bug.  I don't see it
being read out of HTableDescriptor anywhere in the code base.

St.Ack