Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1871

Wrong type used in TableMapReduceUtil.initTableReduceJob()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20.0
    • 0.20.1, 0.90.0
    • None
    • None
    • Reviewed

    Description

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

        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);
         ....
      

      The last line should be

          job.setOutputValueClass(Writable.class);
      

      Attachments

        1. HBASE-1871.patch
          1 kB
          Lars George

        Activity

          People

            larsgeorge Lars George
            larsgeorge Lars George
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: