HiveApiOutputFormat outputFormat = new HiveApiOutputFormat();
outputFormat.setMyProfileId(profile);
TaskAttemptID taskAttemptID = TaskAttemptID.forName(taskAttemptIdStr);
TaskAttemptContext taskContext = new HackTaskAttemptContext(new JobConf(conf), taskAttemptID);
JobContext jobContext = new HackJobContext(new JobConf(conf), taskAttemptID.getJobID());
RecordWriterImpl recordWriter = outputFormat.getRecordWriter(taskContext);
HiveApiOutputCommitter committer = outputFormat.getOutputCommitter(taskContext);