You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Lars George (JIRA)" <ji...@apache.org> on 2009/09/26 22:30:16 UTC

[jira] Updated: (HBASE-1871) Wrong type used in TableMapReduceUtil.initTableReduceJob()

     [ https://issues.apache.org/jira/browse/HBASE-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars George updated HBASE-1871:
-------------------------------

    Attachment: HBASE-1871.patch

HBASE-1871.patch - Fixes class being set and removes obsolete import.

> 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
>
>         Attachments: HBASE-1871.patch
>
>
> 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.