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

com.datastax.insight.core.service.BigdataService Maven / Gradle / Ivy

The newest version!
package com.datastax.insight.core.service;

import com.datastax.insight.core.action.Action;
import com.datastax.insight.core.action.ActionHandler;
import com.datastax.insight.core.dag.DAG;
import com.datastax.insight.core.dag.RunMode;
import com.datastax.insight.core.operator.service.RestfulWebService;
import com.datastax.insight.core.operator.service.ServiceHandler;

/**
 * Created by huangping on 07/04/2017.
 */
public class BigdataService {

    public static void setServiceHandler(ServiceHandler handler) {
        RestfulWebService.setServiceHandler(handler);
    }

    /*public static Object invokeDag(DAG dag) {
        return ActionHandler.invoke(dag);
    }*/

    public static Object invokeDag(DAG dag, String mode, String hits, String nodeId, String explorationFile) {
        int i;
        try {
            i = Integer.valueOf(hits).intValue();
        } catch (Exception e) {
            i = 0;
        }
        return ActionHandler.invoke(dag, RunMode.getRunMode(mode), i, nodeId, explorationFile);
    }

    public static Object invokeDag(Action action, Object[] params) {
        return ActionHandler.invoke(action, params);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy