Search in sources :

Example 11 with TagIdMaker

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

the class QueryTest method test_CR_11.

public static void test_CR_11(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_11();
    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 12 with TagIdMaker

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

the class QueryTest method test_CR_5.

public static void test_CR_5(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_5();
    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 13 with TagIdMaker

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

the class QueryTest method test_CR_2.

public static void test_CR_2(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_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 14 with TagIdMaker

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

the class QueryTest method test_CR_3_2.

public static void test_CR_3_2(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_3_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 15 with TagIdMaker

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

the class QueryTest method test_CR_12.

public static void test_CR_12(GaiaConfig config, GraphStoreService storeService, IdMaker queryIdMaker) {
    Traversal testTraversal = CR_12();
    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