Search in sources :

Example 1 with ExperimentalGaiaConfig

use of com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig 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 ExperimentalGaiaConfig

use of com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig in project GraphScope by alibaba.

the class GremlinServiceMain method main.

public static void main(String[] args) throws Exception {
    logger.info("start server");
    Settings settings = load();
    GremlinServer server = new GremlinServer(settings);
    // create graph
    GaiaConfig gaiaConfig = new ExperimentalGaiaConfig("conf");
    GraphStoreService storeService = new ExperimentalGraphStore(gaiaConfig);
    GaiaProcessorLoader.load(gaiaConfig, storeService);
    // set global variables
    Graph traversalGraph = server.getServerGremlinExecutor().getGraphManager().getGraph("graph");
    GlobalEngineConf.setGlobalVariables(traversalGraph.variables());
    // bind g to traversal source
    Bindings globalBindings = PlanUtils.getGlobalBindings(server.getServerGremlinExecutor().getGremlinExecutor());
    globalBindings.put("g", traversalGraph.traversal());
    // start gremlin server
    server.start().exceptionally(t -> {
        logger.error("Gremlin Server was unable to start and will now begin shutdown" + " {}", t);
        server.stop().join();
        return null;
    }).join();
}
Also used : Logger(org.slf4j.Logger) Bindings(javax.script.Bindings) GaiaConfig(com.alibaba.graphscope.gaia.config.GaiaConfig) GremlinServer(org.apache.tinkerpop.gremlin.server.GremlinServer) ExperimentalGraphStore(com.alibaba.graphscope.gaia.store.ExperimentalGraphStore) Settings(org.apache.tinkerpop.gremlin.server.Settings) GaiaProcessorLoader(com.alibaba.graphscope.gaia.processor.GaiaProcessorLoader) Graph(org.apache.tinkerpop.gremlin.structure.Graph) PlanUtils(com.alibaba.graphscope.gaia.plan.PlanUtils) LoggerFactory(org.slf4j.LoggerFactory) ExperimentalGaiaConfig(com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig) GraphStoreService(com.alibaba.graphscope.gaia.store.GraphStoreService) GremlinServer(org.apache.tinkerpop.gremlin.server.GremlinServer) Graph(org.apache.tinkerpop.gremlin.structure.Graph) 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) Bindings(javax.script.Bindings) Settings(org.apache.tinkerpop.gremlin.server.Settings) ExperimentalGaiaConfig(com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig)

Aggregations

ExperimentalGaiaConfig (com.alibaba.graphscope.gaia.config.ExperimentalGaiaConfig)2 GaiaConfig (com.alibaba.graphscope.gaia.config.GaiaConfig)2 ExperimentalGraphStore (com.alibaba.graphscope.gaia.store.ExperimentalGraphStore)2 GraphStoreService (com.alibaba.graphscope.gaia.store.GraphStoreService)2 IdMaker (com.alibaba.graphscope.gaia.idmaker.IdMaker)1 IncrementalQueryIdMaker (com.alibaba.graphscope.gaia.idmaker.IncrementalQueryIdMaker)1 TagIdMaker (com.alibaba.graphscope.gaia.idmaker.TagIdMaker)1 PlanUtils (com.alibaba.graphscope.gaia.plan.PlanUtils)1 GaiaProcessorLoader (com.alibaba.graphscope.gaia.processor.GaiaProcessorLoader)1 Bindings (javax.script.Bindings)1 GremlinServer (org.apache.tinkerpop.gremlin.server.GremlinServer)1 Settings (org.apache.tinkerpop.gremlin.server.Settings)1 Graph (org.apache.tinkerpop.gremlin.structure.Graph)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1