更新时间:2022-12-08 GMT+08:00
增量导入图
您可以使用GES提供的接口增量导入图。示例代码如下:
public static void incrementImport(GraphClient graphClient) throws ApiException { ImportGraphReq importGraphReq = new ImportGraphReq(); importGraphReq.setGraphName(graphName); importGraphReq.setEdgesetPath("/home/lh/movie/ranking_edge.csv"); importGraphReq.setEdgesetFormat("csv"); importGraphReq.setVertexsetPath("/home/lh/movie/movies_vertex.csv"); importGraphReq.setVertexsetFormat("csv_prop"); ObsParameters obsParameters = new ObsParameters(); obsParameters.setAccessKey("EW39NCDEXJ4E1JTN2PCP"); obsParameters.setSecretKey("rhsS0TP89IdNnDe6dug1iraEbQUeNZlbJ3QGgW5D"); obsParameters.setRegion("southchina"); importGraphReq.setObsParameters(obsParameters); // 执行导入图 AsyncAPIResp res = graphClient.incrementImport(importGraphReq); // 获取JobId String jobId = res.getJobId(); ImportGraphJobReq req = new ImportGraphJobReq(); req.setJobId(jobId); // 根据JobId查询导图结果 System.out.println(graphClient.queryJobStatus(req)); }
父主题: 使用管理面SDK