hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Zappert <fzapp...@gmail.com>
Subject Re: Getting Data From HBase
Date Sun, 22 Aug 2010 16:13:10 GMT
Shuja,

AFAIK, (caveats here) if you want distinct rows for each of these entries,
you should probably create a time stamp as the last segment of your primary
compound key.

You may be expecting to have defined a table in the traditional RDBMS style
- that is not the case here - you have one row, with versions.

You can get the expected traditional behavior by collecting all rows that
have n-1 out of the n compound key segments.

Fred.

On Sun, Aug 22, 2010 at 8:47 AM, Jeff Zhang <zjffdu@gmail.com> wrote:

> Shuja,
>
> By default get command will get the latest version data, if you want
> to get the old version, you can use the java client api. I am afraid
> hbase shell do not support this.
>
>
>
> On Sun, Aug 22, 2010 at 3:36 AM, Shuja Rehman <shujamughal@gmail.com>
> wrote:
> > but can't i get the data w.r.t time stamp?  e.g in this example the row
> key
> > is same but contents has different data w.r.t time stamp so in my case, i
> > have inserted different data in same column but there timestamp should be
> > different.is it not so?
> >
> > *Row Key*
> >
> > *Time Stamp*
> >
> > *Column* *"contents:"*
> >
> > *Column* *"anchor:"*
> >
> > *Column* *"mime:"*
> >
> > "com.cnn.www"
> >
> > t9
> >
> > "anchor:cnnsi.com"
> >
> > "CNN"
> >
> > t8
> >
> > "anchor:my.look.ca"
> >
> > "CNN.com"
> >
> > t6
> >
> > "<html>..."
> >
> > "text/html"
> >
> > t5
> >
> > "<html>..."
> >
> > t3
> >
> > "<html>..."
> >
> >
> > On Sun, Aug 22, 2010 at 3:23 PM, Jeff Zhang <zjffdu@gmail.com> wrote:
> >
> >> Of course, there's only one row. Your two put command has the same row
> >> key and same column
> >>
> >>
> >>
> >> On Sun, Aug 22, 2010 at 3:05 AM, Shuja Rehman <shujamughal@gmail.com>
> >> wrote:
> >> > Hi
> >> > I have a question about getting the data from hbase.
> >> >
> >> > I have created a table and adding rows like this
> >> >
> >> > put "blogposts","post1","post:author","MyAuthoor"
> >> > put "blogposts","post1","post:author","MyAuthoor2"
> >> >
> >> > but when i getting the data using scan "blogposts", it only returns
> the
> >> > single row
> >> >
> >> > ROW                           COLUMN+CELL
> >> >  post1                        column=post:author,
> >> timestamp=1282470167449,
> >> > value=MyAuthoor2
> >> >
> >> > I want to get all the rows.How i can get all the rows?
> >> >
> >> > Thanks
> >> > --
> >> > Regards
> >> > Shuja-ur-Rehman Baig
> >> > http://pk.linkedin.com/in/shujamughal
> >> > Cell: +92 3214207445
> >> >
> >>
> >>
> >>
> >> --
> >> Best Regards
> >>
> >> Jeff Zhang
> >>
> >
> >
> >
> > --
> > Regards
> > Shuja-ur-Rehman Baig
> > http://pk.linkedin.com/in/shujamughal
> > Cell: +92 3214207445
> >
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message