((InitializeOnMaster)format).initializeGlobal(1); format.configure(this.parameters); format.open(0, 1); for (IN element : inputData) { format.writeRecord(element); format.close();
@Override public void open(Configuration parameters) throws Exception { RuntimeContext context = getRuntimeContext(); format.configure(parameters); int indexInSubtaskGroup = context.getIndexOfThisSubtask(); int currentNumberOfSubtasks = context.getNumberOfParallelSubtasks(); format.open(indexInSubtaskGroup, currentNumberOfSubtasks); }
format.open(this.getEnvironment().getTaskInfo().getIndexOfThisSubtask(), this.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks()); format.writeRecord(record); format.writeRecord(record); this.format.close(); this.format = null; this.format.close();
@Override public void close() throws IOException { try { format.close(); } catch (Exception ex) { cleanup(); throw ex; } }
this.format.configure(this.config.getStubParameters());
@Override public void writeRecord(IT record) throws IOException { String subDirectory = getDirectoryForRecord(record); OutputFormat<IT> format; if (formatsPerSubdirectory.containsKey(subDirectory)) { format = formatsPerSubdirectory.get(subDirectory); } else { format = createFormatForDirectory(new Path(rootOutputPath, subDirectory)); format.open(taskNumber, numTasks); formatsPerSubdirectory.put(subDirectory, format); } format.writeRecord(record); }
@Override public void invoke(IN record) throws Exception { try { format.writeRecord(record); } catch (Exception ex) { cleanup(); throw ex; } }
format.open(this.getEnvironment().getTaskInfo().getIndexOfThisSubtask(), this.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks()); format.writeRecord(record); format.writeRecord(record); this.format.close(); this.format = null; this.format.close();
@Override public void open(Configuration parameters) throws Exception { RuntimeContext context = getRuntimeContext(); format.configure(parameters); int indexInSubtaskGroup = context.getIndexOfThisSubtask(); int currentNumberOfSubtasks = context.getNumberOfParallelSubtasks(); format.open(indexInSubtaskGroup, currentNumberOfSubtasks); }
@Override public void close() throws IOException { for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) { outputFormat.close(); } formatsPerSubdirectory.clear(); }
this.format.configure(this.config.getStubParameters());
@Override public void writeRecord(IT record) throws IOException { String subDirectory = getDirectoryForRecord(record); OutputFormat<IT> format; if (formatsPerSubdirectory.containsKey(subDirectory)) { format = formatsPerSubdirectory.get(subDirectory); } else { format = createFormatForDirectory(new Path(rootOutputPath, subDirectory)); format.open(taskNumber, numTasks); formatsPerSubdirectory.put(subDirectory, format); } format.writeRecord(record); }
@Override public void invoke(IN record) throws Exception { try { format.writeRecord(record); } catch (Exception ex) { cleanup(); throw ex; } }
((InitializeOnMaster)format).initializeGlobal(1); format.configure(this.parameters); format.open(0, 1); for (IN element : inputData) { format.writeRecord(element); format.close();
format.open(this.getEnvironment().getTaskInfo().getIndexOfThisSubtask(), this.getEnvironment().getTaskInfo().getNumberOfParallelSubtasks()); format.writeRecord(record); format.writeRecord(record); this.format.close(); this.format = null; this.format.close();
@Override public void open(Configuration parameters) throws Exception { RuntimeContext context = getRuntimeContext(); format.configure(parameters); int indexInSubtaskGroup = context.getIndexOfThisSubtask(); int currentNumberOfSubtasks = context.getNumberOfParallelSubtasks(); format.open(indexInSubtaskGroup, currentNumberOfSubtasks); }
@Override public void close() throws IOException { for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) { outputFormat.close(); } formatsPerSubdirectory.clear(); }
this.format.configure(this.config.getStubParameters());
@Override public void invoke(IN record) throws Exception { try { format.writeRecord(record); } catch (Exception ex) { cleanup(); throw ex; } }
((InitializeOnMaster)format).initializeGlobal(1); format.configure(this.parameters); format.open(0, 1); for (IN element : inputData) { format.writeRecord(element); format.close();