Search in sources :

Example 1 with PathFinder

use of org.apache.gobblin.service.modules.flowgraph.pathfinder.PathFinder in project incubator-gobblin by apache.

the class BaseFlowGraph method findPath.

/**
 *{@inheritDoc}*
 */
@Override
public FlowGraphPath findPath(FlowSpec flowSpec) throws PathFinder.PathFinderException, ReflectiveOperationException {
    try {
        rwLock.readLock().lock();
        // Instantiate a PathFinder.
        Class pathFinderClass = Class.forName(ConfigUtils.getString(flowSpec.getConfig(), FlowGraphConfigurationKeys.FLOW_GRAPH_PATH_FINDER_CLASS, FlowGraphConfigurationKeys.DEFAULT_FLOW_GRAPH_PATH_FINDER_CLASS));
        PathFinder pathFinder = (PathFinder) GobblinConstructorUtils.invokeLongestConstructor(pathFinderClass, this, flowSpec);
        return pathFinder.findPath();
    } finally {
        rwLock.readLock().unlock();
    }
}
Also used : PathFinder(org.apache.gobblin.service.modules.flowgraph.pathfinder.PathFinder)

Aggregations

PathFinder (org.apache.gobblin.service.modules.flowgraph.pathfinder.PathFinder)1