/** * Truncates jobflow output. * @param description the target exporter description * @throws IOException if failed to truncate the output */ public void truncate(ExporterDescription description) throws IOException { LOG.info(MessageFormat.format( Messages.getString("BatchTestTool.infoCleaningOutput"), //$NON-NLS-1$ description.getClass().getName())); TestModerator moderator = new TestModerator(getTestTools(), this); moderator.truncate(description); }
/** * Truncates jobflow input. * @param description the target importer description * @throws IOException if failed to truncate the input */ public void truncate(ImporterDescription description) throws IOException { LOG.info(MessageFormat.format( Messages.getString("BatchTestTool.infoCleaningInput"), //$NON-NLS-1$ description.getClass().getName())); TestModerator moderator = new TestModerator(getTestTools(), this); moderator.truncate(description); }
/** * Cleans up extra resources. * @param resources the external resource map * @throws IOException if failed to create job processes * @throws IllegalArgumentException if some parameters were {@code null} * @since 0.7.3 */ public void cleanExtraResources( Map<? extends ImporterDescription, ? extends DataModelSourceFactory> resources) throws IOException { if (resources == null) { throw new IllegalArgumentException("resources must not be null"); //$NON-NLS-1$ } if (driverContext.isSkipCleanInput() == false) { for (ImporterDescription description : resources.keySet()) { LOG.debug("cleaning external resource: {}", description); //$NON-NLS-1$ moderator.truncate(description); } } else { LOG.info(Messages.getString("JobflowExecutor.infoSkipInitializeExtraResources")); //$NON-NLS-1$ } }
/** * Cleans up target jobflow's input/output. * @param flow target jobflow * @throws IOException if failed to clean up * @throws IllegalArgumentException if some parameters were {@code null} * @since 0.8.0 */ public void cleanInputOutput(JobflowMirror flow) throws IOException { if (flow == null) { throw new IllegalArgumentException("info must not be null"); //$NON-NLS-1$ } if (driverContext.isSkipCleanInput() == false) { for (PortMirror<? extends ImporterDescription> port : flow.getInputs()) { LOG.debug("cleaning input: {}", port.getName()); //$NON-NLS-1$ moderator.truncate(port.getDescription()); } } else { LOG.info(Messages.getString("JobflowExecutor.infoSkipInitializeInput")); //$NON-NLS-1$ } if (driverContext.isSkipCleanOutput() == false) { for (PortMirror<? extends ExporterDescription> port : flow.getOutputs()) { LOG.debug("cleaning output: {}", port.getName()); //$NON-NLS-1$ moderator.truncate(port.getDescription()); } } else { LOG.info(Messages.getString("JobflowExecutor.infoSkipInitializeOutput")); //$NON-NLS-1$ } }