Search in sources :

Example 6 with GremlinJob

use of com.baidu.hugegraph.job.GremlinJob in project incubator-hugegraph by apache.

the class TaskCoreTest method runGremlinJob.

private HugeTask<Object> runGremlinJob(String gremlin) {
    HugeGraph graph = graph();
    GremlinRequest request = new GremlinRequest();
    request.gremlin(gremlin);
    JobBuilder<Object> builder = JobBuilder.of(graph);
    builder.name("test-gremlin-job").input(request.toJson()).job(new GremlinJob());
    return builder.schedule();
}
Also used : HugeGraph(com.baidu.hugegraph.HugeGraph) GremlinJob(com.baidu.hugegraph.job.GremlinJob) GremlinRequest(com.baidu.hugegraph.api.job.GremlinAPI.GremlinRequest)

Aggregations

GremlinJob (com.baidu.hugegraph.job.GremlinJob)6 HugeGraph (com.baidu.hugegraph.HugeGraph)5 Test (org.junit.Test)3 GremlinRequest (com.baidu.hugegraph.api.job.GremlinAPI.GremlinRequest)2 TaskScheduler (com.baidu.hugegraph.task.TaskScheduler)2 HugeException (com.baidu.hugegraph.HugeException)1 Status (com.baidu.hugegraph.api.filter.StatusFilter.Status)1 Timed (com.codahale.metrics.annotation.Timed)1 RolesAllowed (jakarta.annotation.security.RolesAllowed)1 Consumes (jakarta.ws.rs.Consumes)1 POST (jakarta.ws.rs.POST)1 Produces (jakarta.ws.rs.Produces)1 HashMap (java.util.HashMap)1 Random (java.util.Random)1 TimeoutException (java.util.concurrent.TimeoutException)1