How exactly are you building the Put? It doesn't have a constructor
that can take byte[] and figure out how it should use it, it only
takes a row key (meaning that if you do new
Put(Result.getBytes().get()), you're passing the whole thing as a row
key which is wrong).

In the HBase code we do the Result => Put conversion here:
https://github.com/apache/hbase/blob/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java#L115

J-D

On Mon, May 21, 2012 at 12:10 PM, Shahsikant Jain
<[email protected]> wrote:
> Hi,
>
> I am trying to store a result that I got out of some scan into another
> Hbase table so that I can read it back via Get and reconstruct.
>
> This is what I am doing....
>
> 1. Result.getBytes().get() -- Get the byte[] and do a Put in HBase
> 2. Then do a get and read the bytes[] as
> new Result(new ImmutableBytesWritable(byte[]))
>
> Now when I try to read some value from this Result it's give me null.
> Wondering what I am doing worng
>
> Regards,
> Shahsikant

Reply via email to