Search in sources :

Example 1 with AsyncRpcChannelFetcher

use of com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher 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();
}
Also used : SchemaFetcher(com.alibaba.maxgraph.compiler.api.schema.SchemaFetcher) JsonFileSchemaFetcher(com.alibaba.maxgraph.compiler.schema.JsonFileSchemaFetcher) RemoteGraph(com.alibaba.maxgraph.frontendservice.RemoteGraph) AbstractBroadcastProcessor(com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor) AsyncRpcChannelFetcher(com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher) ExecutorAddressFetcher(com.alibaba.maxgraph.frontendservice.server.ExecutorAddressFetcher) DefaultGraphDfs(com.alibaba.maxgraph.compiler.dfs.DefaultGraphDfs) AsyncRpcBroadcastProcessor(com.alibaba.graphscope.gaia.broadcast.AsyncRpcBroadcastProcessor) JsonFileSchemaFetcher(com.alibaba.maxgraph.compiler.schema.JsonFileSchemaFetcher) TinkerMaxGraph(com.alibaba.maxgraph.structure.graph.TinkerMaxGraph) GraphStoreService(com.alibaba.graphscope.gaia.store.GraphStoreService)

Example 2 with AsyncRpcChannelFetcher

use of com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher 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));
}
Also used : AsyncRpcBroadcastProcessor(com.alibaba.graphscope.gaia.broadcast.AsyncRpcBroadcastProcessor) GraphStoreService(com.alibaba.graphscope.gaia.store.GraphStoreService) AsyncRpcChannelFetcher(com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher)

Aggregations

AsyncRpcBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.AsyncRpcBroadcastProcessor)2 AsyncRpcChannelFetcher (com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher)2 GraphStoreService (com.alibaba.graphscope.gaia.store.GraphStoreService)2 AbstractBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor)1 SchemaFetcher (com.alibaba.maxgraph.compiler.api.schema.SchemaFetcher)1 DefaultGraphDfs (com.alibaba.maxgraph.compiler.dfs.DefaultGraphDfs)1 JsonFileSchemaFetcher (com.alibaba.maxgraph.compiler.schema.JsonFileSchemaFetcher)1 RemoteGraph (com.alibaba.maxgraph.frontendservice.RemoteGraph)1 ExecutorAddressFetcher (com.alibaba.maxgraph.frontendservice.server.ExecutorAddressFetcher)1 TinkerMaxGraph (com.alibaba.maxgraph.structure.graph.TinkerMaxGraph)1