hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] Created: (HBASE-1871) Wrong type used in TableMapReduceUtil.initTableReduceJob()
Date Sat, 26 Sep 2009 20:24:16 GMT
Wrong type used in TableMapReduceUtil.initTableReduceJob()
----------------------------------------------------------

                 Key: HBASE-1871
                 URL: https://issues.apache.org/jira/browse/HBASE-1871
             Project: Hadoop HBase
          Issue Type: Bug
    Affects Versions: 0.20.0
            Reporter: Lars George
            Assignee: Lars George
             Fix For: 0.20.1


Since we changed it so that TableOutputFormat can handle Put and Delete it is necessary to
set the output value class to Writable.

{code}
  public static void initTableReducerJob(String table,
    Class<? extends TableReducer> reducer, Job job, Class partitioner)
  throws IOException {
    job.setOutputFormatClass(TableOutputFormat.class);
    if (reducer != null) job.setReducerClass(reducer);
    job.getConfiguration().set(TableOutputFormat.OUTPUT_TABLE, table);
    job.setOutputKeyClass(ImmutableBytesWritable.class);
    job.setOutputValueClass(Put.class);
   ....
{code} 

The last line should be 

{code}
    job.setOutputValueClass(Writable.class);
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message