[ https://issues.apache.org/jira/browse/HIVE-5545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795211#comment-13795211 ]
Thejas M Nair edited comment on HIVE-5545 at 9/8/14 5:55 PM: ------------------------------------------------------------- Driver Class - {code} public class testDriver extends Configured implements Tool{ private static final Log log = LogFactory.getLog( testDriver.class ); public int run( String[] args ) throws Exception{ Configuration conf = new Configuration(); Job job = new Job(conf, "test_catalog"); job.setJarByClass(testDriver.class); job.setMapperClass(testMapper.class); job.setReducerClass(testReducer.class); HCatInputFormat.setInput(job, "test", "par"); // HCatInputFormat.setInput(job, InputJobInfo.create("airline", "ontimeperf", "year='1987'")); job.setInputFormatClass(HCatInputFormat.class); job.setMapOutputKeyClass(IntWritable.class); job.setMapOutputValueClass(IntWritable.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(DefaultHCatRecord.class); job.setOutputFormatClass(HCatOutputFormat.class); HCatOutputFormat.setOutput(job, OutputJobInfo.create("test", "out", null)); HCatSchema s = HCatOutputFormat.getTableSchema(job); HCatOutputFormat.setSchema(job, s); return (job.waitForCompletion(true)? 0:1); } public static void main(String[] args) throws Exception{ int exitCode = ToolRunner.run(new testDriver(), args); System.exit(exitCode); } } {code} was (Author: rishav_rohit): Driver Class - public class testDriver extends Configured implements Tool{ private static final Log log = LogFactory.getLog( testDriver.class ); public int run( String[] args ) throws Exception{ Configuration conf = new Configuration(); Job job = new Job(conf, "test_catalog"); job.setJarByClass(testDriver.class); job.setMapperClass(testMapper.class); job.setReducerClass(testReducer.class); HCatInputFormat.setInput(job, "test", "par"); // HCatInputFormat.setInput(job, InputJobInfo.create("airline", "ontimeperf", "year='1987'")); job.setInputFormatClass(HCatInputFormat.class); job.setMapOutputKeyClass(IntWritable.class); job.setMapOutputValueClass(IntWritable.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(DefaultHCatRecord.class); job.setOutputFormatClass(HCatOutputFormat.class); HCatOutputFormat.setOutput(job, OutputJobInfo.create("test", "out", null)); HCatSchema s = HCatOutputFormat.getTableSchema(job); HCatOutputFormat.setSchema(job, s); return (job.waitForCompletion(true)? 0:1); } public static void main(String[] args) throws Exception{ int exitCode = ToolRunner.run(new testDriver(), args); System.exit(exitCode); } } > HCatRecord getInteger method returns String when used on Partition columns of > type INT > -------------------------------------------------------------------------------------- > > Key: HIVE-5545 > URL: https://issues.apache.org/jira/browse/HIVE-5545 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 0.11.0 > Environment: hadoop-1.0.3 > Reporter: Rishav Rohit > > HCatRecord getInteger method returns String when used on Partition columns of > type INT. > java.lang.ClassCastException: java.lang.String cannot be cast to > java.lang.Integer -- This message was sent by Atlassian JIRA (v6.3.4#6332)