partitionVals = new HashMap<String, String>(1);
partitionVals.put(s[0], val);
}
HCatOutputFormat.setOutput(job, OutputJobInfo.create(dbName,
outputTableName, partitionVals));
HCatSchema s = HCatInputFormat.getTableSchema(job);
// Build the schema for this table, which is slightly different than the
// schema for the input table
List<HCatFieldSchema> fss = new ArrayList<HCatFieldSchema>(3);
fss.add(s.get(0));
fss.add(s.get(1));
fss.add(s.get(3));
HCatOutputFormat.setSchema(job, new HCatSchema(fss));
job.setOutputFormatClass(HCatOutputFormat.class);
return (job.waitForCompletion(true) ? 0 : 1);
}