Search in sources :

Example 1 with AbstractBroadcastProcessor

use of com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor 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 AbstractBroadcastProcessor

use of com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor in project GraphScope by alibaba.

the class GaiaProcessorLoader method load.

public static void load(GaiaConfig config, GraphStoreService storeService) {
    try {
        Map<String, OpProcessor> gaiaProcessors = new HashMap<>();
        RpcChannelFetcher fetcher = new HostsChannelFetcher(config);
        AbstractBroadcastProcessor broadcastProcessor = new RpcBroadcastProcessor(fetcher);
        gaiaProcessors.put("", new GaiaGraphOpProcessor(config, storeService, broadcastProcessor));
        gaiaProcessors.put("plan", new LogicPlanProcessor(config, storeService));
        gaiaProcessors.put("traversal", new TraversalOpProcessor(config, storeService, broadcastProcessor));
        PlanUtils.setFinalStaticField(OpLoader.class, "processors", gaiaProcessors);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : HostsChannelFetcher(com.alibaba.graphscope.gaia.broadcast.channel.HostsChannelFetcher) HashMap(java.util.HashMap) AbstractBroadcastProcessor(com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor) RpcBroadcastProcessor(com.alibaba.graphscope.gaia.broadcast.RpcBroadcastProcessor) RpcChannelFetcher(com.alibaba.graphscope.gaia.broadcast.channel.RpcChannelFetcher) OpProcessor(org.apache.tinkerpop.gremlin.server.OpProcessor)

Aggregations

AbstractBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.AbstractBroadcastProcessor)2 AsyncRpcBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.AsyncRpcBroadcastProcessor)1 RpcBroadcastProcessor (com.alibaba.graphscope.gaia.broadcast.RpcBroadcastProcessor)1 AsyncRpcChannelFetcher (com.alibaba.graphscope.gaia.broadcast.channel.AsyncRpcChannelFetcher)1 HostsChannelFetcher (com.alibaba.graphscope.gaia.broadcast.channel.HostsChannelFetcher)1 RpcChannelFetcher (com.alibaba.graphscope.gaia.broadcast.channel.RpcChannelFetcher)1 GraphStoreService (com.alibaba.graphscope.gaia.store.GraphStoreService)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 HashMap (java.util.HashMap)1 OpProcessor (org.apache.tinkerpop.gremlin.server.OpProcessor)1