use of com.alibaba.maxgraph.compiler.api.exception.MaxGraphException in project GraphScope by alibaba.
the class GaiaEngine method start.
@Override
public void start() {
try (GaiaPortsResponse gaiaPortsResponse = GaiaLibrary.INSTANCE.startEngine(this.pointer)) {
if (!gaiaPortsResponse.success) {
throw new MaxGraphException(gaiaPortsResponse.errMsg);
}
engineNodeProvider.apply(gaiaPortsResponse.enginePort);
rpcNodeProvider.apply(gaiaPortsResponse.rpcPort);
}
this.engineDiscovery.start();
this.engineDiscovery.addListener(this);
this.rpcDiscovery.start();
}
use of com.alibaba.maxgraph.compiler.api.exception.MaxGraphException in project GraphScope by alibaba.
the class Coordinator method start.
@Override
public void start() {
if (this.curator != null) {
this.curator.start();
}
this.graphInitializer.initializeIfNeeded();
this.metaService.start();
this.idAllocator.start();
try {
this.rpcServer.start();
} catch (IOException e) {
throw new MaxGraphException(e);
}
this.discovery.start();
this.channelManager.start();
this.snapshotManager.start();
this.snapshotNotifier.start();
this.schemaManager.start();
this.logRecycler.start();
this.backupManager.start();
this.garbageCollectManager.start();
}
use of com.alibaba.maxgraph.compiler.api.exception.MaxGraphException in project GraphScope by alibaba.
the class Frontend method start.
@Override
public void start() {
if (this.curator != null) {
this.curator.start();
}
this.metaService.start();
try {
this.rpcServer.start();
} catch (IOException e) {
throw new MaxGraphException(e);
}
this.discovery.start();
this.channelManager.start();
this.graphService.start();
try {
this.serviceServer.start();
} catch (IOException e) {
throw new MaxGraphException(e);
}
}
use of com.alibaba.maxgraph.compiler.api.exception.MaxGraphException in project GraphScope by alibaba.
the class Ingestor method start.
@Override
public void start() {
if (this.curator != null) {
this.curator.start();
}
this.metaService.start();
try {
this.rpcServer.start();
} catch (IOException e) {
throw new MaxGraphException(e);
}
this.discovery.start();
this.channelManager.start();
this.ingestService.start();
}
use of com.alibaba.maxgraph.compiler.api.exception.MaxGraphException in project GraphScope by alibaba.
the class MaxGraph method main.
public static void main(String[] args) throws IOException {
String configFile = System.getProperty("config.file");
Configs conf = new Configs(configFile);
NodeBase node;
if (args.length == 0) {
logger.warn("No role type, use MaxNode");
try {
node = new MaxNode(conf);
} catch (Exception e) {
throw new MaxGraphException(e);
}
} else {
String roleName = args[0];
if (roleName.equalsIgnoreCase("store-gaia") || roleName.equalsIgnoreCase("frontend-gaia")) {
conf = Configs.newBuilder(conf).put(CommonConfig.ENGINE_TYPE.getKey(), "gaia").build();
}
RoleType roleType = RoleType.fromName(roleName);
switch(roleType) {
case FRONTEND:
node = new Frontend(conf);
break;
case INGESTOR:
node = new Ingestor(conf);
break;
case STORE:
node = new Store(conf);
break;
case COORDINATOR:
node = new Coordinator(conf);
break;
default:
throw new IllegalArgumentException("invalid roleType [" + roleType + "]");
}
}
new NodeLauncher(node).start();
logger.info("node started. [" + node.getName() + "]");
}
Aggregations