hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beeshma r <beeshm...@gmail.com>
Subject Iterate hbase resultscanner
Date Mon, 08 Jun 2015 16:19:54 GMT
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

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