Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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,
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB