hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Silvio Di gregorio <silvio.digrego...@gmail.com>
Subject Job MapReduce to populate HBase Table
Date Mon, 13 Apr 2015 10:37:11 GMT
Hi,
In Reduce phase when i write to Hbase Table "PFTableNa"
context.write(null , put);
Eclipse say me:
*"The method write(ImmutableBytesWritable, Writable) in the type
TaskInputOutputContext<Text,BytesWritable,ImmutableBytesWritable,Writable>
is not applicable for the arguments (null, Put)"*

*put *is org
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg>
.apache
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg.apache>
.hadoop
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg.apache.hadoop>
.hbase
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg.apache.hadoop.hbase>
.client
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg.apache.hadoop.hbase.client>
.Put
<eclipse-javadoc:%E2%98%82=LoadUnico/C:%5C/Users%5C/sdigregorio%5C/workspace-luna%5C/hbase-client-0.96.0-hadoop1.jar%3Corg.apache.hadoop.hbase.client(Put.class%E2%98%83Put>.Put(byte[]
row)
byte[] rowkey = key.getBytes();
Put put = new Put(rowkey);

the signature of the reduce method:
reduce( Text key,Iterable<BytesWritable> values, Context context)

and

public static class Reduce extends TableReducer<Text, BytesWritable,
ImmutableBytesWritable>{

in the main method:
Configuration conf = HBaseConfiguration.create();
Job job = new Job(conf, "LetturaFileHDFS2HBase");
...
TableMapReduceUtil.initTableReducerJob("PFTableNa", Reduce.class, job);

Thanks a lot
Silvio

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