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 >> Queries regarding Put and Scanner Result


Copy link to this message
-
Re: Queries regarding Put and Scanner Result
2010/9/23 Imran M Yousuf <[EMAIL PROTECTED]>:
> Hi,
>
>
> Second, when doing object to row, we are mapping a one to many
> relation in a specific column family, e.g. cf1, now when I will update
> the row I will populate cf1 with values set newly, e.g. old values are
> 1,2,3 and new values are 1,3,4, now I will populate cf1 to have 1,3,4.
> Now my first question is what will happen to the value '2'? When I do
> a scan/get on that row will cf1 return 1,3,4 or 1,2,3,4? If the answer
> is 1,2,3,4, when getting cf1 I want to get 1,3,4 only as it was set
> and not 2, what is the best way to achieve it?

How you populate family cf1? 1,2,3,4 = are qualifiers? or you put values
under the same qualifiers?

In case of qualifiers, you should delete qualifier+value explicitly.
This can be done in two ways:
1. delete whole cf for given key
http://hbase.apache.org/docs/r0.20.6/api/org/apache/hadoop/hbase/client/Delete.html#deleteFamily(byte[],
long)

2. get current values, make diff with new value, and delete obsolete value.

>
> Thank you,
>
> --
> Imran M Yousuf
> Twitter: @imyousuf - http://twitter.com/imyousuf
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
>
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