Search in sources :

Example 1 with TagIdMaker

use of com.alibaba.graphscope.gaia.idmaker.TagIdMaker in project GraphScope by alibaba.

the class QueryTest method test_CR_6.

public static void test_CR_6(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_6();
    GaiaGraphOpProcessor.applyStrategy(testTraversal, config, storeService);
    long queryId = (long) queryIdMaker.getId(testTraversal.asAdmin());
    AbstractBuilder job = new TraversalTranslator((new TraversalBuilder(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_ID, queryId).addConfig(PlanConfig.TAG_ID_MAKER, new TagIdMaker(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_CONFIG, PlanUtils.getDefaultConfig(queryId, config))).translate();
    PlanUtils.print(job);
}
Also used : AbstractBuilder(com.alibaba.pegasus.builder.AbstractBuilder) TraversalBuilder(com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) TraversalTranslator(com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)

Example 2 with TagIdMaker

use of com.alibaba.graphscope.gaia.idmaker.TagIdMaker in project GraphScope by alibaba.

the class QueryTest method test_CR_7.

public static void test_CR_7(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_7();
    GaiaGraphOpProcessor.applyStrategy(testTraversal, config, storeService);
    long queryId = (long) queryIdMaker.getId(testTraversal.asAdmin());
    AbstractBuilder job = new TraversalTranslator((new TraversalBuilder(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_ID, queryId).addConfig(PlanConfig.TAG_ID_MAKER, new TagIdMaker(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_CONFIG, PlanUtils.getDefaultConfig(queryId, config))).translate();
    PlanUtils.print(job);
}
Also used : AbstractBuilder(com.alibaba.pegasus.builder.AbstractBuilder) TraversalBuilder(com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) TraversalTranslator(com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)

Example 3 with TagIdMaker

use of com.alibaba.graphscope.gaia.idmaker.TagIdMaker in project GraphScope by alibaba.

the class QueryTest method test_CR_1_1.

public static void test_CR_1_1(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_1_1();
    GaiaGraphOpProcessor.applyStrategy(testTraversal, config, storeService);
    long queryId = (long) queryIdMaker.getId(testTraversal.asAdmin());
    AbstractBuilder job = new TraversalTranslator((new TraversalBuilder(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_ID, queryId).addConfig(PlanConfig.TAG_ID_MAKER, new TagIdMaker(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_CONFIG, PlanUtils.getDefaultConfig(queryId, config))).translate();
    PlanUtils.print(job);
}
Also used : AbstractBuilder(com.alibaba.pegasus.builder.AbstractBuilder) TraversalBuilder(com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) TraversalTranslator(com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)

Example 4 with TagIdMaker

use of com.alibaba.graphscope.gaia.idmaker.TagIdMaker in project GraphScope by alibaba.

the class QueryTest method test_CR_1_2.

public static void test_CR_1_2(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_1_2();
    GaiaGraphOpProcessor.applyStrategy(testTraversal, config, storeService);
    long queryId = (long) queryIdMaker.getId(testTraversal.asAdmin());
    AbstractBuilder job = new TraversalTranslator((new TraversalBuilder(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_ID, queryId).addConfig(PlanConfig.TAG_ID_MAKER, new TagIdMaker(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_CONFIG, PlanUtils.getDefaultConfig(queryId, config))).translate();
    PlanUtils.print(job);
}
Also used : AbstractBuilder(com.alibaba.pegasus.builder.AbstractBuilder) TraversalBuilder(com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) TraversalTranslator(com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)

Example 5 with TagIdMaker

use of com.alibaba.graphscope.gaia.idmaker.TagIdMaker in project GraphScope by alibaba.

the class QueryTest method test_CR_3_1.

public static void test_CR_3_1(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_3_1();
    GaiaGraphOpProcessor.applyStrategy(testTraversal, config, storeService);
    long queryId = (long) queryIdMaker.getId(testTraversal.asAdmin());
    AbstractBuilder job = new TraversalTranslator((new TraversalBuilder(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_ID, queryId).addConfig(PlanConfig.TAG_ID_MAKER, new TagIdMaker(testTraversal.asAdmin())).addConfig(PlanConfig.QUERY_CONFIG, PlanUtils.getDefaultConfig(queryId, config))).translate();
    PlanUtils.print(job);
}
Also used : AbstractBuilder(com.alibaba.pegasus.builder.AbstractBuilder) TraversalBuilder(com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) TraversalTranslator(com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)

Aggregations

TagIdMaker (com.alibaba.graphscope.gaia.idmaker.TagIdMaker)15 TraversalTranslator (com.alibaba.graphscope.gaia.plan.translator.TraversalTranslator)15 TraversalBuilder (com.alibaba.graphscope.gaia.plan.translator.builder.TraversalBuilder)15 AbstractBuilder (com.alibaba.pegasus.builder.AbstractBuilder)15 Traversal (org.apache.tinkerpop.gremlin.process.traversal.Traversal)15 GaiaConfig (com.alibaba.graphscope.gaia.config.GaiaConfig)3 PlanUtils (com.alibaba.graphscope.gaia.plan.PlanUtils)3 PlanConfig (com.alibaba.graphscope.gaia.plan.translator.builder.PlanConfig)3 GraphStoreService (com.alibaba.graphscope.gaia.store.GraphStoreService)3 GraphType (com.alibaba.graphscope.gaia.store.GraphType)3 Tokens (org.apache.tinkerpop.gremlin.driver.Tokens)3 RequestMessage (org.apache.tinkerpop.gremlin.driver.message.RequestMessage)3 ResponseStatusCode (org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode)3 GremlinExecutor (org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor)3 Context (org.apache.tinkerpop.gremlin.server.Context)3 OpProcessorException (org.apache.tinkerpop.gremlin.server.op.OpProcessorException)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 AbstractBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor)2 GremlinResultProcessor (com.alibaba.graphscope.gaia.result.GremlinResultProcessor)2