All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.databand.azkaban.events.FlowFinishedEvent Maven / Gradle / Ivy

There is a newer version: 1.0.26.1
Show newest version
/*
 * © Copyright Databand.ai, an IBM Company 2022
 */

package ai.databand.azkaban.events;

import ai.databand.azkaban.AgentAzkabanFlow;
import ai.databand.azkaban.AzkabanEvent;
import ai.databand.azkaban.AzkabanFlow;
import ai.databand.azkaban.AzkabanProps;
import ai.databand.config.DbndConfig;
import ai.databand.config.Env;
import ai.databand.config.JavaOpts;
import azkaban.event.Event;

public class FlowFinishedEvent implements AzkabanEvent {

    private final AzkabanEvent origin;

    public FlowFinishedEvent(Event event) {
        DbndConfig config = new DbndConfig(
            new Env(
                new JavaOpts(
                    new AzkabanProps()
                )
            )
        );

        FlowRunnerContext flowCtx = new FlowRunnerContext(event, config);
        AzkabanFlow flow = new AgentAzkabanFlow(config, flowCtx);

        this.origin = new FlowFinished(config, flowCtx.taskContext(), flow);
    }

    @Override
    public void track() {
        origin.track();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy