use of org.talend.dataprep.transformation.pipeline.Visitor in project data-prep by Talend.
the class UpdatedStepVisitor method visitStepNode.
@Override
public void visitStepNode(StepNode stepNode) {
stepNode.getEntryNode().accept(new Visitor() {
@Override
public void visitAction(ActionNode actionNode) {
final ActionContext.ActionStatus status = actionNode.getActionContext().getActionStatus();
final Step step = stepNode.getStep();
switch(status) {
case NOT_EXECUTED:
case CANCELED:
LOGGER.debug("Not updating metadata for {} (action ended with status {}).", step.getId(), status);
step.setRowMetadata(null);
break;
case OK:
case DONE:
LOGGER.debug("Keeping metadata {} (action ended with status {}).", step.getId(), status);
break;
}
preparationUpdater.update(step.id(), actionNode.getActionContext().getRowMetadata());
}
});
super.visitStepNode(stepNode);
}
Aggregations