Hi Ted

I declared Listclass as
public static List<Listclass> map_list_main=new ArrayList<Listclass>();

i know my logic is correct .only issue is adding my result to this
Listclass.Also my conversion works perfectly .i checked  this based on
print out put results.

only issue is why final element of Listclass updated for all elements in
list

I am using hbase version hbase-0.98.6.1
Hadoop -2.5.1

Also i using finagle client ,server module.So can u advise  How do i debug
this?

Thanks
Beeshma





On Mon, Jun 8, 2015 at 9:24 AM, Ted Yu <yuzhih...@gmail.com> wrote:

> From your description, the conversion inside for(Result rs:ListofResult)
> loop was correct.
>
> Since Listclass is custom, probably you need to show us how it is
> implemented.
>
> Which hbase release are you using ?
>
> On Mon, Jun 8, 2015 at 9:19 AM, beeshma r <beeshm...@gmail.com> wrote:
>
> > HI
> >
> > I have weired issue with Hbase Result Scanner
> >
> > This is my scenario
> >
> >     i have a list of Resultscanner(ListofScanner)
> >     from this Resultscanner list i want extract all results as list of
> > result(ListofResult)
> >     and from result list i want iterate all cell values add to custom
> class
> > list (Listclass)
> >
> > So i coded like this
> >
> > for(ResultScanner resca:ListofScanner)
> > {
> > for(Result Res:resca)
> >     {
> >
> >     ListofResult.add(Res);
> >
> >
> >     }
> > }
> >
> >
> > for(Result rs:ListofResult)
> > {
> >
> >    Listclass.add(Conver(rs));//Conver is function that converts results
> and
> > return as a my class object
> >
> > }
> >
> > Here is the O/p
> >
> > suppose i expect this result form Listclass if a print a all values
> >
> > gattner
> > lisa
> > Miely
> > luzz
> >
> > But actual list i got
> >
> > luzz
> > luzz
> > luzz
> > luzz
> >
> > The last element of Listclass is got updated to all values
> >
> > I checked for each Result output after conversion ( Conver(rs) ) it
> returns
> > as expected. But only issue adding Listofclass.
> >
> > Also i run with maven exec:java  command(org.codehaus.mojo) .Break point
> > also not working for me  :(
> > Please give me advice how to debug this.
> >
> >
> >
> > Thanks
> > Beeshma
> >
>



--

Reply via email to