hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans" <jdcry...@apache.org>
Subject Re: [patch] alter table operation and also related changes in REST interface
Date Fri, 19 Sep 2008 11:23:18 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message