Search in sources :

Example 1 with IdMaker

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

the class QueryTest method main.

public static void main(String[] args) {
    GaiaConfig config = new ExperimentalGaiaConfig("conf");
    GraphStoreService graphStore = new ExperimentalGraphStore(config);
    IdMaker queryIdMaker = new IncrementalQueryIdMaker();
    test_CR_1_1(config, graphStore, queryIdMaker);
    test_CR_1_2(config, graphStore, queryIdMaker);
    test_CR_2(config, graphStore, queryIdMaker);
    test_CR_3_1(config, graphStore, queryIdMaker);
    test_CR_3_2(config, graphStore, queryIdMaker);
    test_CR_5(config, graphStore, queryIdMaker);
    test_CR_6(config, graphStore, queryIdMaker);
    test_CR_7(config, graphStore, queryIdMaker);
    test_CR_8(config, graphStore, queryIdMaker);
    test_CR_9(config, graphStore, queryIdMaker);
    test_CR_11(config, graphStore, queryIdMaker);
    test_CR_12(config, graphStore, queryIdMaker);
}
Also used : IncrementalQueryIdMaker(com.alibaba.graphscope.gaia.idmaker.IncrementalQueryIdMaker) ExperimentalGraphStore(com.alibaba.graphscope.gaia.store.ExperimentalGraphStore) GraphStoreService(com.alibaba.graphscope.gaia.store.GraphStoreService) GaiaConfig(com.alibaba.graphscope.gaia.config.GaiaConfig) ExperimentalGaiaConfig(com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig) ExperimentalGaiaConfig(com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig) IdMaker(com.alibaba.graphscope.gaia.idmaker.IdMaker) TagIdMaker(com.alibaba.graphscope.gaia.idmaker.TagIdMaker) IncrementalQueryIdMaker(com.alibaba.graphscope.gaia.idmaker.IncrementalQueryIdMaker)

Example 2 with IdMaker

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

the class GremlinStepResource method createResourceBuilder.

public static GremlinStep.Builder createResourceBuilder(Step t, Configuration conf) {
    GremlinStep.Builder builder = GremlinStep.newBuilder();
    IdMaker tagIdMaker = PlanUtils.getTagIdMaker(conf);
    if (!t.getLabels().isEmpty()) {
        t.getLabels().forEach(k -> builder.addTags(Gremlin.StepTag.newBuilder().setTag((int) tagIdMaker.getId(k))));
    }
    if (t.getNextStep() instanceof RemovePathHistoryStep) {
        RemovePathHistoryStep removeStep = (RemovePathHistoryStep) t.getNextStep();
        if (removeStep.getRemoveTags() != null) {
            removeStep.getRemoveTags().forEach(k -> {
                builder.addRemoveTags(Gremlin.StepTag.newBuilder().setTag((int) tagIdMaker.getId(k)));
            });
        }
    }
    return builder;
}
Also used : RemovePathHistoryStep(com.alibaba.graphscope.gaia.plan.strategy.global.RemovePathHistoryStep) GremlinStep(com.alibaba.graphscope.common.proto.Gremlin.GremlinStep) IdMaker(com.alibaba.graphscope.gaia.idmaker.IdMaker)

Aggregations

IdMaker (com.alibaba.graphscope.gaia.idmaker.IdMaker)2 GremlinStep (com.alibaba.graphscope.common.proto.Gremlin.GremlinStep)1 ExperimentalGaiaConfig (com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig)1 GaiaConfig (com.alibaba.graphscope.gaia.config.GaiaConfig)1 IncrementalQueryIdMaker (com.alibaba.graphscope.gaia.idmaker.IncrementalQueryIdMaker)1 TagIdMaker (com.alibaba.graphscope.gaia.idmaker.TagIdMaker)1 RemovePathHistoryStep (com.alibaba.graphscope.gaia.plan.strategy.global.RemovePathHistoryStep)1 ExperimentalGraphStore (com.alibaba.graphscope.gaia.store.ExperimentalGraphStore)1 GraphStoreService (com.alibaba.graphscope.gaia.store.GraphStoreService)1