You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Ranjini Rathinam <ra...@gmail.com> on 2013/12/31 07:01:43 UTC

LookUp in mapreduce

Hi,

I want to compare the value from one hbase table to another hbase table
value , and need to add one column as valid indicator

if value is matching mark the field has 0 or not matching means 1.

i have used Filter command in mapreduce code

but the column is not printing in hbase table.

if(Bytes.toBytes(kv1.getValue).equals("RRR")){
put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
}
else{
 put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
}


but the column valid_ind is not printing.

Please help with sample code to fix .

thanks in advance

Ranjini.R

Re: LookUp in mapreduce

Posted by Harsh J <ha...@cloudera.com>.
-user@hadoop (bcc)

Please ask HBase questions on its own lists (user@hbase.apache.org,
you may have to subscribe)

You're constructing a Put object. Do you then call table.put(obj) to
actually send it to the table?

On Tue, Dec 31, 2013 at 11:31 AM, Ranjini Rathinam
<ra...@gmail.com> wrote:
> Hi,
>
> I want to compare the value from one hbase table to another hbase table
> value , and need to add one column as valid indicator
>
> if value is matching mark the field has 0 or not matching means 1.
>
> i have used Filter command in mapreduce code
>
> but the column is not printing in hbase table.
>
> if(Bytes.toBytes(kv1.getValue).equals("RRR")){
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
> }
> else{
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
> }
>
>
> but the column valid_ind is not printing.
>
> Please help with sample code to fix .
>
> thanks in advance
>
> Ranjini.R
>



-- 
Harsh J

Re: LookUp in mapreduce

Posted by Harsh J <ha...@cloudera.com>.
-user@hadoop (bcc)

Please ask HBase questions on its own lists (user@hbase.apache.org,
you may have to subscribe)

You're constructing a Put object. Do you then call table.put(obj) to
actually send it to the table?

On Tue, Dec 31, 2013 at 11:31 AM, Ranjini Rathinam
<ra...@gmail.com> wrote:
> Hi,
>
> I want to compare the value from one hbase table to another hbase table
> value , and need to add one column as valid indicator
>
> if value is matching mark the field has 0 or not matching means 1.
>
> i have used Filter command in mapreduce code
>
> but the column is not printing in hbase table.
>
> if(Bytes.toBytes(kv1.getValue).equals("RRR")){
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
> }
> else{
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
> }
>
>
> but the column valid_ind is not printing.
>
> Please help with sample code to fix .
>
> thanks in advance
>
> Ranjini.R
>



-- 
Harsh J

Re: LookUp in mapreduce

Posted by Harsh J <ha...@cloudera.com>.
-user@hadoop (bcc)

Please ask HBase questions on its own lists (user@hbase.apache.org,
you may have to subscribe)

You're constructing a Put object. Do you then call table.put(obj) to
actually send it to the table?

On Tue, Dec 31, 2013 at 11:31 AM, Ranjini Rathinam
<ra...@gmail.com> wrote:
> Hi,
>
> I want to compare the value from one hbase table to another hbase table
> value , and need to add one column as valid indicator
>
> if value is matching mark the field has 0 or not matching means 1.
>
> i have used Filter command in mapreduce code
>
> but the column is not printing in hbase table.
>
> if(Bytes.toBytes(kv1.getValue).equals("RRR")){
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
> }
> else{
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
> }
>
>
> but the column valid_ind is not printing.
>
> Please help with sample code to fix .
>
> thanks in advance
>
> Ranjini.R
>



-- 
Harsh J

Re: LookUp in mapreduce

Posted by Harsh J <ha...@cloudera.com>.
-user@hadoop (bcc)

Please ask HBase questions on its own lists (user@hbase.apache.org,
you may have to subscribe)

You're constructing a Put object. Do you then call table.put(obj) to
actually send it to the table?

On Tue, Dec 31, 2013 at 11:31 AM, Ranjini Rathinam
<ra...@gmail.com> wrote:
> Hi,
>
> I want to compare the value from one hbase table to another hbase table
> value , and need to add one column as valid indicator
>
> if value is matching mark the field has 0 or not matching means 1.
>
> i have used Filter command in mapreduce code
>
> but the column is not printing in hbase table.
>
> if(Bytes.toBytes(kv1.getValue).equals("RRR")){
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
> }
> else{
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
> }
>
>
> but the column valid_ind is not printing.
>
> Please help with sample code to fix .
>
> thanks in advance
>
> Ranjini.R
>



-- 
Harsh J

Re: LookUp in mapreduce

Posted by Harsh J <ha...@cloudera.com>.
-user@hadoop (bcc)

Please ask HBase questions on its own lists (user@hbase.apache.org,
you may have to subscribe)

You're constructing a Put object. Do you then call table.put(obj) to
actually send it to the table?

On Tue, Dec 31, 2013 at 11:31 AM, Ranjini Rathinam
<ra...@gmail.com> wrote:
> Hi,
>
> I want to compare the value from one hbase table to another hbase table
> value , and need to add one column as valid indicator
>
> if value is matching mark the field has 0 or not matching means 1.
>
> i have used Filter command in mapreduce code
>
> but the column is not printing in hbase table.
>
> if(Bytes.toBytes(kv1.getValue).equals("RRR")){
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("0"))
> }
> else{
> put.add(Bytes.toBytes("cf"),Bytes.toBytes("valid_ind"),Bytes.toBytes("1"))
> }
>
>
> but the column valid_ind is not printing.
>
> Please help with sample code to fix .
>
> thanks in advance
>
> Ranjini.R
>



-- 
Harsh J