Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - Command to delete based on column Family + rowkey


Copy link to this message
-
Re: Command to delete based on column Family + rowkey
manish dunani 2013-09-10, 08:36
If you want to delete rowkey for particular columnfamily then you need to
mention individually::>>>

>delete 'ttttt','333','TWO:qualifier_name'

This will definitely delete the records which you are looking for.
Please revert back if it is not work.
On Tue, Sep 10, 2013 at 1:40 PM, manish dunani <[EMAIL PROTECTED]> wrote:

> hey rama,
>
> Try this::
>
> >*deleteall 'ttttt','333'*
> *
> *
> I hope it will definitely works for you!!
>
>
>
>
> On Tue, Sep 10, 2013 at 1:31 PM, Ramasubramanian Narayanan <
> [EMAIL PROTECTED]> wrote:
>
>> Dear All,
>>
>> Requirement is to delete all columns which belongs to a column family and
>> for a particular rowkey.
>>
>> Have tried with the below command but record is not getting deleted.
>>
>> *  hbase> deleteall 't1', 'r1', 'c1'*
>> *
>> *
>> *Test result :*
>> *
>> *
>> 3) Scan the table 'ttttt'
>>
>> hbase(main):025:0> scan 'ttttt'
>> ROW                                           COLUMN+CELL
>>  111                                          column=ONE:ename,
>> timestamp=1378459582478, value=aaaa
>>  111                                          column=ONE:eno,
>> timestamp=1378459582335, value=1000
>>  111                                          column=ONE:sal,
>> timestamp=1378459582515, value=1500
>>  111                                          column=TWO:ename,
>> timestamp=1378459582655, value=dddd
>>  111                                          column=TWO:eno,
>> timestamp=1378459582631, value=4000
>>  222                                          column=ONE:ename,
>> timestamp=1378459582702, value=bbbb
>>  222                                          column=ONE:eno,
>> timestamp=1378459582683, value=2000
>>  222                                          column=ONE:sal,
>> timestamp=1378459582723, value=2500
>>  222                                          column=TWO:ename,
>> timestamp=1378459582779, value=gggg
>>  222                                          column=TWO:eno,
>> timestamp=1378459582754, value=4000
>>  222                                          column=TWO:sal,
>> timestamp=1378459582798, value=7500
>>  333                                          column=ONE:ename,
>> timestamp=1378459582880, value=sss
>>  333                                          column=ONE:eno,
>> timestamp=1378459582845, value=9000
>>  333                                          column=ONE:sal,
>> timestamp=1378459582907, value=6500
>>  333                                          column=TWO:ename,
>> timestamp=1378459582950, value=zzz
>>  333                                          column=TWO:eno,
>> timestamp=1378459582931, value=6666
>>  333                                          column=TWO:sal,
>> timestamp=1378459582968, value=6500
>> 3 row(s) in 0.0440 seconds
>>
>>
>> -------------------------------------------------------------------------------------------------------------------------------------
>> 4) Delete the records from the table 'ttttt' in the rowkey '333' in the
>> column family 'TWO'
>>
>>
>> hbase(main):027:0> deleteall 'ttttt','333','TWO'
>> 0 row(s) in 0.0060 seconds
>>
>>
>> -------------------------------------------------------------------------------------------------------------------------------------
>>
>> 5) After deleting scan the table
>>
>> hbase(main):028:0> scan 'ttttt'
>> ROW                                           COLUMN+CELL
>>  111                                          column=ONE:ename,
>> timestamp=1378459582478, value=aaaa
>>  111                                          column=ONE:eno,
>> timestamp=1378459582335, value=1000
>>  111                                          column=ONE:sal,
>> timestamp=1378459582515, value=1500
>>  111                                          column=TWO:ename,
>> timestamp=1378459582655, value=dddd
>>  111                                          column=TWO:eno,
>> timestamp=1378459582631, value=4000
>>  222                                          column=ONE:ename,
>> timestamp=1378459582702, value=bbbb
Regards

*Manish Dunani*
*Contact No* : +91 9408329137
*skype id* : manish.dunani*
*