hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dingding Ye" <yedingd...@gmail.com>
Subject Re: [patch] alter table operation and also related changes in REST interface
Date Fri, 19 Sep 2008 11:31:39 GMT
Thanks,  J-D.  It works now.  Hardly to find the link before.

On Fri, Sep 19, 2008 at 7:23 PM, Jean-Daniel Cryans <jdcryans@apache.org> wrote:
> You tried here?
>
> https://issues.apache.org/jira/secure/Dashboard.jspa
>
> J-D
>
> On Fri, Sep 19, 2008 at 6:02 AM, Dingding Ye <yedingding@gmail.com> wrote:
>
>> Hi, guys.
>>
>> I can find the link to create an issue on JIRA and even can't login.
>> Don't know why, :(
>>
>> I have made some changes to the alter operation on the hbase shell.
>> Now we can add, update, delete the column families. Also, make the
>> changes to the TableHandler in REST interface.
>>
>> changes to the hbase shell:
>>
>> > alter 'table', {NAME => 'cf', VERSIONS => 3}
>>
>> This command will try to find the column family named 'cf' at first.
>> If has, it will modifyColumn, if not, add the column
>>
>> > alter 'table', {NAME => 'cf', 'method' => 'delete'}
>>
>> This command will delete the column family named 'cf'.
>>
>> To achieve this goal,  i also add a method to the HBaseAdmin.java
>>
>> public TableDescriptor getTableDescriptor(byte[] tableName);
>>
>>
>> changes to the TableHandler in REST interface.
>>
>> > curl -X PUT -T - http://localhost:60050/api/tablename
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <table>
>>  <name>tables</name>
>>  <columnfamilies>
>>    <columnfamily>
>>      <name>cf1</name>
>>      <max-versions>2</max-versions>
>>      <compression>NONE</compression>
>>      <in-memory>false</in-memory>
>>      <block-cache>true</block-cache>
>>    </columnfamily>
>>  </columnfamilies>
>> </table>
>>
>> It will check the column family 'cf1'. If exists, modifyColumn, if
>> not,  addColumn
>>
>> > curl -X DELETE http://localhost:60050/api/tablename?column=cf1
>>
>> It will deleteColumn 'cf1'.
>>
>>
>> The patch is attached.
>>
>>
>> Best regards.
>>
>> sishen
>>
>

Mime
View raw message