@Override
    public void close(TaskAttemptContext context) throws IOException, InterruptedException {
      for (Entry<String, BaseRecordWriterContainer> entry : baseRecordWriters.entrySet()) {
        BaseRecordWriterContainer baseRWContainer = entry.getValue();
        LOGGER.info("Closing record writer for alias: " + entry.getKey());
        baseRWContainer.getRecordWriter().close(baseRWContainer.getContext());
      }
    }
Configure the job with the multiple output formats added. This method
should be called after all the output formats have been added and
configured and before the job submission.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/MultiOutputFormat.java