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();
}
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);
}
}
Aggregations