hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sishen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-890) alter table operation and also related changes in REST interface
Date Fri, 19 Sep 2008 11:30:47 GMT

     [ https://issues.apache.org/jira/browse/HBASE-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

sishen updated HBASE-890:
-------------------------

    Attachment: 890.trunk.alter_table.patch

> alter table operation and also related changes in REST interface
> ----------------------------------------------------------------
>
>                 Key: HBASE-890
>                 URL: https://issues.apache.org/jira/browse/HBASE-890
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: rest, scripts
>    Affects Versions: 0.19.0
>            Reporter: sishen
>         Attachments: 890.trunk.alter_table.patch
>
>
> 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'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message