public static HCatWriter getHCatWriter(final WriteEntity we,
                       final Map<String, String> config) {
    // In future, this may examine WriteEntity and/or config to return
    // appropriate HCatWriter
    return new HCatOutputFormatWriter(we, config);
  }
This should be called at master node to obtain an instance of
{@link HCatWriter}.

@param we
         WriteEntity built using {@link WriteEntity.Builder}
@param config
         any configuration which master wants to pass to HCatalog
@return {@link HCatWriter}
hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/transfer/DataTransferFactory.java