use of com.alibaba.graphscope.gaia.store.GraphStoreService 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);
}
use of com.alibaba.graphscope.gaia.store.GraphStoreService in project GraphScope by alibaba.
the class Frontend method initAndStartGremlinServer.
@Override
protected void initAndStartGremlinServer() throws Exception {
SchemaFetcher schemaFetcher;
String vineyardSchemaPath = this.instanceConfig.getVineyardSchemaPath();
logger.info("Read schema from vineyard schema file " + vineyardSchemaPath);
schemaFetcher = new JsonFileSchemaFetcher(vineyardSchemaPath);
this.remoteGraph = new RemoteGraph(this, schemaFetcher);
this.remoteGraph.refresh();
this.graph = new TinkerMaxGraph(instanceConfig, remoteGraph, new DefaultGraphDfs());
// add gaia compiler
AsyncRpcChannelFetcher gaiaRpcFetcher = new AddressChannelFetcher(new ExecutorAddressFetcher(this.clientManager));
GraphStoreService gaiaStoreService = new VineyardGraphStore(schemaFetcher);
AbstractBroadcastProcessor broadcastProcessor = new AsyncRpcBroadcastProcessor(gaiaRpcFetcher);
gaiaGraphServer = new GaiaGraphServer(this.graph, instanceConfig, gaiaStoreService, broadcastProcessor, new VineyardConfig(instanceConfig));
gaiaGraphServer.start(0, null, false);
this.gremlinServerPort = gaiaGraphServer.getGremlinServerPort();
}
use of com.alibaba.graphscope.gaia.store.GraphStoreService 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();
}
use of com.alibaba.graphscope.gaia.store.GraphStoreService in project GraphScope by alibaba.
the class GaiaServiceProducer method makeGraphService.
@Override
public AbstractService makeGraphService(SchemaFetcher schemaFetcher, ChannelManager channelManager) {
int executorCount = CommonConfig.STORE_NODE_COUNT.get(this.configs);
AsyncRpcChannelFetcher gaiaRpcFetcher = new ChannelManagerFetcher(channelManager, executorCount, RoleType.GAIA_RPC);
GraphStoreService gaiaStoreService = new MaxGraphStore(schemaFetcher);
return new GaiaGraphServer(configs, gaiaStoreService, new AsyncRpcBroadcastProcessor(gaiaRpcFetcher), new MaxGraphConfig(configs));
}
Aggregations