[
https://issues.apache.org/jira/browse/HBASE-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack resolved HBASE-1871.
--------------------------
Resolution: Fixed
Fix Version/s: 0.21.0
Hadoop Flags: [Reviewed]
Applied trunk and branch. Thanks for the patch Lars.
> 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, 0.21.0
>
> 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.