Search in sources :

Example 1 with IrMetaQueryCallback

use of com.alibaba.graphscope.common.manager.IrMetaQueryCallback in project GraphScope by alibaba.

the class GraphServiceMain method main.

public static void main(String[] args) throws Exception {
    Configs configs = new Configs("conf/ir.compiler.properties", FileLoadType.RELATIVE_PATH);
    IrMetaFetcher irMetaFetcher = new ExperimentalMetaFetcher(configs);
    RpcChannelFetcher fetcher = new HostsChannelFetcher(configs);
    IrGremlinServer server = new IrGremlinServer();
    server.start(configs, irMetaFetcher, fetcher, new IrMetaQueryCallback(irMetaFetcher), TestGraphFactory.EXPERIMENTAL);
}
Also used : RpcChannelFetcher(com.alibaba.graphscope.common.client.RpcChannelFetcher) HostsChannelFetcher(com.alibaba.graphscope.common.client.HostsChannelFetcher) IrMetaFetcher(com.alibaba.graphscope.common.store.IrMetaFetcher) ExperimentalMetaFetcher(com.alibaba.graphscope.common.store.ExperimentalMetaFetcher) IrMetaQueryCallback(com.alibaba.graphscope.common.manager.IrMetaQueryCallback) Configs(com.alibaba.graphscope.common.config.Configs)

Example 2 with IrMetaQueryCallback

use of com.alibaba.graphscope.common.manager.IrMetaQueryCallback 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 ir compiler
    Configs configs = getConfigs(this.instanceConfig);
    IrMetaFetcher irMetaFetcher = getStoreConfigs(this.instanceConfig);
    RpcAddressFetcher addressFetcher = new ExecutorAddressFetcher(this.clientManager);
    RpcChannelFetcher channelFetcher = new RpcAddressChannelFetcher(addressFetcher);
    this.gremlinServer = new IrGremlinServer(this.instanceConfig.getGremlinServerPort());
    this.gremlinServer.start(configs, irMetaFetcher, channelFetcher, new IrMetaQueryCallback(irMetaFetcher), TestGraphFactory.VINEYARD);
    this.gremlinServerPort = gremlinServer.getGremlinServerPort();
}
Also used : SchemaFetcher(com.alibaba.maxgraph.compiler.api.schema.SchemaFetcher) JsonFileSchemaFetcher(com.alibaba.maxgraph.compiler.schema.JsonFileSchemaFetcher) RemoteGraph(com.alibaba.maxgraph.frontendservice.RemoteGraph) ExecutorAddressFetcher(com.alibaba.maxgraph.frontendservice.server.ExecutorAddressFetcher) IrGremlinServer(com.alibaba.graphscope.gremlin.service.IrGremlinServer) DefaultGraphDfs(com.alibaba.maxgraph.compiler.dfs.DefaultGraphDfs) RpcChannelFetcher(com.alibaba.graphscope.common.client.RpcChannelFetcher) JsonFileSchemaFetcher(com.alibaba.maxgraph.compiler.schema.JsonFileSchemaFetcher) RpcAddressFetcher(com.alibaba.maxgraph.common.rpc.RpcAddressFetcher) TinkerMaxGraph(com.alibaba.maxgraph.structure.graph.TinkerMaxGraph) IrMetaFetcher(com.alibaba.graphscope.common.store.IrMetaFetcher) IrMetaQueryCallback(com.alibaba.graphscope.common.manager.IrMetaQueryCallback) Configs(com.alibaba.graphscope.common.config.Configs)

Aggregations

RpcChannelFetcher (com.alibaba.graphscope.common.client.RpcChannelFetcher)2 Configs (com.alibaba.graphscope.common.config.Configs)2 IrMetaQueryCallback (com.alibaba.graphscope.common.manager.IrMetaQueryCallback)2 IrMetaFetcher (com.alibaba.graphscope.common.store.IrMetaFetcher)2 HostsChannelFetcher (com.alibaba.graphscope.common.client.HostsChannelFetcher)1 ExperimentalMetaFetcher (com.alibaba.graphscope.common.store.ExperimentalMetaFetcher)1 IrGremlinServer (com.alibaba.graphscope.gremlin.service.IrGremlinServer)1 RpcAddressFetcher (com.alibaba.maxgraph.common.rpc.RpcAddressFetcher)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