hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cosmin Lehene <cleh...@adobe.com>
Subject Re: How to add a column family from hirb?
Date Tue, 16 Sep 2008 13:05:36 GMT

Here's the alter implementation:

    def alter(tableName, args)
      now = Time.now
      raise TypeError.new("Table name must be of type String") \
        unless tableName.instance_of? String
      descriptor = hcd(args)
      @admin.modifyColumn(tableName, descriptor.getNameAsString(), descriptor);

It looks like it needs some logic to add a new column family @admin.addColumn
I could implement it, however if I were to send a patch I'd need to know the syntax philosophy.
Currently there's only one verb per command and for alter... Add column we would have two
verbs: alter and add. Should this be something like alter 'table', {COLUMN => 'new_family_name'}
{NEW_COLUMN => ..} etc, or should we pass the add verb somehow as an argument?


On 9/16/08 3:35 PM, "Samuel Guo" <guosijie@gmail.com> wrote:

"alter" just do the *modification* operation.

I think that you can write some functions in *HBase.rb* to implements "add
families" operations:)

On Tue, Sep 16, 2008 at 7:51 PM, Cosmin Lehene <clehene@adobe.com> wrote:

> Hi,
> I've been trying to add a column family from the new shell. The
> documentation doesn't really expose this. Is it still possible to do this?
> It appears alter only deals with existing column families, not tables.
> Any hints?
> Thanks,
> Cosmin

View raw message