Source:
public void initializeOnMaster(ClassLoader loader) throws Throwable { final InputOutputFormatContainer formatContainer = initInputOutputformatContainer(loader); final ClassLoader original = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(loader); Map<OperatorID, UserCodeWrapper<? extends InputFormat<?, ?>>> inputFormats = formatContainer.getInputFormats(); if (inputFormats.size() > 1) { throw new UnsupportedOperationException("Multiple input formats are not supported in a job vertex."); } for (Map.Entry<OperatorID, UserCodeWrapper<? extends InputFormat<?, ?>>> entry : inputFormats.entrySet()) { final InputFormat<?, ?> inputFormat; try { inputFormat = entry.getValue().getUserCodeObject(); inputFormat.configure(formatContainer.getParameters(entry.getKey())); } catch (Throwable t) { throw new Exception("Configuring the input format (" + getFormatDescription(entry.getKey()) + ") failed: " + t.getMessage(), t); } setInputSplitSource(inputFormat); } Map<OperatorID, UserCodeWrapper<? extends OutputFormat<?>>> outputFormats = formatContainer.getOutputFormats(); for (Map.Entry<OperatorID, UserCodeWrapper<? extends OutputFormat<?>>> entry : outputFormats.entrySet()) { final OutputFormat<?> outputFormat; try { outputFormat = entry.getValue().getUserCodeObject(); outputFormat.configure(formatContainer.getParameters(entry.getKey())); } catch (Throwable t) { throw new Exception("Configuring the output format (" + getFormatDescription(entry.getKey()) + ") failed: " + t.getMessage(), t); } if (outputFormat instanceof InitializeOnMaster) { ((InitializeOnMaster) outputFormat).initializeGlobal(getParallelism()); } } } catch (Throwable t) { throw ClusterEntryPointExceptionUtils.tryEnrichClusterEntryPointError(t); } finally { Thread.currentThread().setContextClassLoader(original); } }

Target:
public void initializeOnMaster(ClassLoader loader) throws Exception { final InputOutputFormatContainer formatContainer = initInputOutputformatContainer(loader); final ClassLoader original = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(loader); Map<OperatorID, UserCodeWrapper<? extends InputFormat<?, ?>>> inputFormats = formatContainer.getInputFormats(); if (inputFormats.size() > 1) { throw new UnsupportedOperationException("Multiple input formats are not supported in a job vertex."); } for (Map.Entry<OperatorID, UserCodeWrapper<? extends InputFormat<?, ?>>> entry : inputFormats.entrySet()) { final InputFormat<?, ?> inputFormat; try { inputFormat = entry.getValue().getUserCodeObject(); inputFormat.configure(formatContainer.getParameters(entry.getKey())); } catch (Throwable t) { throw new Exception("Configuring the input format (" + getFormatDescription(entry.getKey()) + ") failed: " + t.getMessage(), t); } setInputSplitSource(inputFormat); } Map<OperatorID, UserCodeWrapper<? extends OutputFormat<?>>> outputFormats = formatContainer.getOutputFormats(); for (Map.Entry<OperatorID, UserCodeWrapper<? extends OutputFormat<?>>> entry : outputFormats.entrySet()) { final OutputFormat<?> outputFormat; try { outputFormat = entry.getValue().getUserCodeObject(); outputFormat.configure(formatContainer.getParameters(entry.getKey())); } catch (Throwable t) { throw new Exception("Configuring the output format (" + getFormatDescription(entry.getKey()) + ") failed: " + t.getMessage(), t); } if (outputFormat instanceof InitializeOnMaster) { ((InitializeOnMaster) outputFormat).initializeGlobal(getParallelism()); } } } finally { Thread.currentThread().setContextClassLoader(original); } }