use of com.alibaba.graphscope.common.client.RpcChannelFetcher in project GraphScope by alibaba.
the class IrServiceProducer method makeGraphService.
@Override
public AbstractService makeGraphService(SchemaFetcher schemaFetcher, ChannelManager channelManager) {
int executorCount = CommonConfig.STORE_NODE_COUNT.get(configs);
RpcChannelFetcher channelFetcher = new RpcChannelManagerFetcher(channelManager, executorCount, RoleType.GAIA_RPC);
com.alibaba.graphscope.common.config.Configs irConfigs = getConfigs();
IrMetaFetcher irMetaFetcher = new GrootMetaFetcher(schemaFetcher);
SnapshotUpdateCommitter updateCommitter = new SnapshotUpdateCommitter(channelManager);
int frontendId = CommonConfig.NODE_IDX.get(configs);
FrontendQueryManager queryManager = new FrontendQueryManager(irMetaFetcher, frontendId, updateCommitter);
return new AbstractService() {
private IrGremlinServer irGremlinServer = new IrGremlinServer(GremlinConfig.GREMLIN_PORT.get(configs));
@Override
public void start() {
try {
irGremlinServer.start(irConfigs, irMetaFetcher, channelFetcher, queryManager, TestGraphFactory.GROOT);
queryManager.start();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public void stop() {
try {
irGremlinServer.close();
queryManager.stop();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
}
use of com.alibaba.graphscope.common.client.RpcChannelFetcher 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);
}
use of com.alibaba.graphscope.common.client.RpcChannelFetcher 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();
}
Aggregations