hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Yoon (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-2339) [Hbase Shell] Delete command with no WHERE clause
Date Tue, 04 Dec 2007 07:47:43 GMT

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

Edward Yoon updated HADOOP-2339:
--------------------------------

    Attachment: 2339_v02.patch

Ok. Drop has a different mean.
So,...
column_name1[, column_name2, ...] or COLUMNFAMILIES(column1[, column2]) 

ex.
DELETE column:, column:a, column:b FROM table;   // delete the specified columns
DELETE COLUMNFAMILIES(column1, column2) FROM table; // delete the columnfamilies
DELETE * FROM table;


{code}
hql > select * from udanax;
+-------------------------+-------------------------+-------------------------+
| Row                     | Column                  | Cell                    |
+-------------------------+-------------------------+-------------------------+
| a                       | b:                      | bb3                     |
+-------------------------+-------------------------+-------------------------+
| a                       | c:                      | cc                      |
+-------------------------+-------------------------+-------------------------+
| b                       | b:                      | bb2                     |
+-------------------------+-------------------------+-------------------------+
| b                       | c:                      | cc2                     |
+-------------------------+-------------------------+-------------------------+
| c                       | b:aa                    | aa                      |
+-------------------------+-------------------------+-------------------------+
| c                       | c:                      | bb                      |
+-------------------------+-------------------------+-------------------------+
6 row(s) in set. (0.06 sec)
hql > delete 'b:aa' from udanax;
1 Column(s) deleted successfully. (0.03 sec)
hql > select * from udanax;
+-------------------------+-------------------------+-------------------------+
| Row                     | Column                  | Cell                    |
+-------------------------+-------------------------+-------------------------+
| a                       | b:                      | bb3                     |
+-------------------------+-------------------------+-------------------------+
| a                       | c:                      | cc                      |
+-------------------------+-------------------------+-------------------------+
| b                       | b:                      | bb2                     |
+-------------------------+-------------------------+-------------------------+
| b                       | c:                      | cc2                     |
+-------------------------+-------------------------+-------------------------+
| c                       | c:                      | bb                      |
+-------------------------+-------------------------+-------------------------+
5 row(s) in set. (0.06 sec)
hql > delete columnfamilies(c) from udanax;
delete columnfamilies(c) from udanax;
Dropping c:... Please wait.
07/12/04 16:36:38 INFO hbase.HBaseAdmin: Disabled table udanax
07/12/04 16:36:38 INFO hbase.HBaseAdmin: Enabled table udanax
1 columnfamily(s) deleted successfully. (10.12 sec)
hql > select * from udanax;
select * from udanax;
+-------------------------+-------------------------+-------------------------+
| Row                     | Column                  | Cell                    |
+-------------------------+-------------------------+-------------------------+
| a                       | b:                      | bb3                     |
+-------------------------+-------------------------+-------------------------+
| b                       | b:                      | bb2                     |
+-------------------------+-------------------------+-------------------------+
2 row(s) in set. (0.07 sec)
hql > 
{code}

> [Hbase Shell] Delete command with no WHERE clause
> -------------------------------------------------
>
>                 Key: HADOOP-2339
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2339
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: contrib/hbase
>    Affects Versions: 0.16.0
>            Reporter: Edward Yoon
>            Assignee: Edward Yoon
>             Fix For: 0.16.0
>
>         Attachments: 2339.patch, 2339_v02.patch
>
>
> using HbaseAdmin.deleteColumn() method.
> {code}
> DELETE column_name FROM table_name;
> {code}

-- 
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