private FetchFormatter initializeFetcher(Configuration conf) throws Exception { String formatterName = conf.get(SerDeUtils.LIST_SINK_OUTPUT_FORMATTER); FetchFormatter fetcher; if (formatterName != null && !formatterName.isEmpty()) { Class<? extends FetchFormatter> fetcherClass = Class.forName(formatterName, true, Utilities.getSessionSpecifiedClassLoader()).asSubclass(FetchFormatter.class); fetcher = ReflectionUtils.newInstance(fetcherClass, null); } else { fetcher = new DefaultFetchFormatter(); } // selectively used by fetch formatter Properties props = new Properties(); props.put(serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.tabCode); props.put(serdeConstants.SERIALIZATION_NULL_FORMAT, getConf().getSerializationNullFormat()); fetcher.initialize(conf, props); return fetcher; }
private FetchFormatter initializeFetcher(Configuration conf) throws Exception { String formatterName = conf.get(SerDeUtils.LIST_SINK_OUTPUT_FORMATTER); FetchFormatter fetcher; if (formatterName != null && !formatterName.isEmpty()) { Class<? extends FetchFormatter> fetcherClass = Class.forName(formatterName, true, Utilities.getSessionSpecifiedClassLoader()).asSubclass(FetchFormatter.class); fetcher = ReflectionUtils.newInstance(fetcherClass, null); } else { fetcher = new DefaultFetchFormatter(); } // selectively used by fetch formatter Properties props = new Properties(); props.put(serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.tabCode); props.put(serdeConstants.SERIALIZATION_NULL_FORMAT, getConf().getSerializationNullFormat()); fetcher.initialize(conf, props); return fetcher; }
private FetchFormatter initializeFetcher(Configuration conf) throws Exception { String formatterName = conf.get(OUTPUT_FORMATTER); FetchFormatter fetcher; if (formatterName != null && !formatterName.isEmpty()) { Class<? extends FetchFormatter> fetcherClass = Class.forName(formatterName, true, Utilities.getSessionSpecifiedClassLoader()).asSubclass(FetchFormatter.class); fetcher = ReflectionUtils.newInstance(fetcherClass, null); } else { fetcher = new DefaultFetchFormatter(); } // selectively used by fetch formatter Properties props = new Properties(); props.put(serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.tabCode); props.put(serdeConstants.SERIALIZATION_NULL_FORMAT, getConf().getSerializationNullFormat()); fetcher.initialize(conf, props); return fetcher; }