Package azkaban.jobbies

Source Code of azkaban.jobbies.TestJob

package azkaban.jobbies;

import azkaban.common.utils.Props;

/**
*
*/
public class TestJob
{
    private final String id;
    private final Props props;

    public TestJob(String id, Props props)
    {
        this.id = id;
        this.props = props;
    }

    public void run()
    {
        for (String key : props.getKeySet()) {
            System.out.printf("key[%s] -> value[%s]%n", key, props.get(key));
        }

        if (props.containsKey("fail")) {
            throw new RuntimeException("Fail!");
        }
    }

    public Props getJobGeneratedProperties()
    {
        return new Props(null, props.getMapByPrefix("pass-on."));
    }
}
TOP

Related Classes of azkaban.jobbies.TestJob

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.