Have you looked at https://issues.apache.org/jira/browse/HBASE-8753 ?
Cheers On Sep 16, 2013, at 12:37 AM, Ramasubramanian <[email protected]> wrote: > Hi, > > Thanks…but the requirement is to delete the fields for a single row key… can > u pls help? > > regards, > Rams > On 10-Sep-2013, at 4:56 PM, Jean-Marc Spaggiari <[email protected]> > wrote: > >> This? >> >> hbase(main):002:0> help "alter" >> Alter column family schema; pass table name and a dictionary >> specifying new column family schema. Dictionaries are described >> on the main help command output. Dictionary must include name >> of column family to alter. For example, >> >> To change or add the 'f1' column family in table 't1' from defaults >> to instead keep a maximum of 5 cell VERSIONS, do: >> >> hbase> alter 't1', NAME => 'f1', VERSIONS => 5 >> >> To delete the 'f1' column family in table 't1', do: >> >> hbase> alter 't1', NAME => 'f1', METHOD => 'delete' >> >> or a shorter version: >> >> hbase> alter 't1', 'delete' => 'f1' >> >> >> >> 2013/9/10 Ramasubramanian Narayanan <[email protected]> >> >>> Manish, >>> >>> I need to delete all the columns for a particular column family of a given >>> rowkey... I don't want to specify the column name (qualifier name) one by >>> one to delete..... >>> >>> Pls let me know is there any way to delete like that... >>> >>> regards, >>> Rams >>> >>> >>> On Tue, Sep 10, 2013 at 2:06 PM, manish dunani <[email protected]> >>> wrote: >>> >>>> 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 >>>>>> 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.0310 seconds >>>>>> >>>>>> Observation :- >>>>>> ------------------ >>>>>> No records got deleted >>>>>> >>>>>> regards, >>>>>> Rams >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards >>>>> >>>>> *Manish Dunani* >>>>> *Contact No* : +91 9408329137 >>>>> *skype id* : manish.dunani* >>>>> * >>>> >>>> >>>> -- >>>> Regards >>>> >>>> *Manish Dunani* >>>> *Contact No* : +91 9408329137 >>>> *skype id* : manish.dunani* >>>> * >
