云服务器内容精选

  • 响应示例 状态码: 200 成功响应示例 Http Status Code: 200 { "jobId": "6-57222f3d-f6b8-41ba-b492-60ed9b879223" } 状态码: 400 失败响应示例 HttpStatusCode: 400 { "errorCode": "GES.8011", "errorMessage": "graph : movie2 is not exist" }
  • 请求参数 表2 Body参数说明 参数 是否必选 类型 说明 scriptPath 是 String 用户编写好的DSL算法文件路径。 obsParameters 是 Object OBS认证参数。具体请见obsParameters参数说明。 timeout 否 Integer 超时时间,单位为秒。 表3 obsParameters参数说明 参数 是否必选 类型 说明 accessKey 是 string ak值。 secretKey 是 string sk值。
  • 请求示例 请求示例1:取消已经提交的某个作业。 POST http://{SERVER_URL}/ges/v1.0/{project_id}/hyg/{graph_name}/dsl { "scriptPath": "bucket/run_sssp.py", "obsParameters": { "accessKey": "XXX", "secretKey": "XXX" } } SERVER_URL:图的访问地址,取值请参考业务面API使用限制。
  • 请求示例 POST http://{SERVER_URL}/ges/v1.0/{project_id}/hyg/{graph_name}/algorithm { "algorithmName":"pagerank", "parameters":{ "alpha":0.85, "convergence":0.00001, "max_iterations":1000, "directed":true }, "output": { "format": "TXT", "mode": "FULL" } }
  • 响应参数 表2 响应Body参数说明 参数 类型 说明 errorMessage String 系统提示信息。 执行成功时,字段可能为空。 执行失败时,用于显示错误信息。 errorCode String 系统提示信息。 执行成功时,字段可能为空。 执行失败时,用于显示错误码。 jobId String 执行算法任务ID。请求失败时,该字段为空。 说明: 可以查询jobId查看任务执行状态、获取返回结果,详情参考Job管理API。
  • 算法结果TXT格式说明 表1 算法结果的txt格式 算法 支持程度 header content e.g. all_pairs_shortest_paths 本地,OBS # runtime: {runtime} # paths_number: {paths_number} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # batch_paths: 每行为1对pair的多条路,格式: {sourceID},{targetID},"[[{sourceID},{v1},...,{targetID}],...]" # runtime: 4.411 # paths_number: 20 # data_total_size: 25 # data_return_size: 25 # data_offset: 0 # batch_paths: "121","66","[["121","25","66"]]" all_shortest_paths 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # paths_number: {paths_number} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # paths: 每行为一条路,格式: {sourceID},{vertexID1},...,{targetID} # runtime: 0.207 # source: 121 # target: 66 # paths_number: 2 # data_total_size: 2 # data_return_size: 2 # data_offset: 0 # paths: 121,7,66 121,25,66 all_shortest_paths_of_vertex_sets 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # paths_number: {paths_number} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # paths: 每行为一条路,格式: {sourceID},{vertexID1},...,{targetID} # runtime: 2.772 # sources: 48,129,34,36 # targets: 46,66,101 # paths_number: 15 # data_total_size: 15 # data_return_size: 15 # data_offset: 0 # paths: 36,72,101 36,59,46 36,73,46 betweenness 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # betweenness: {vertexID},{betweenness} # runtime: 1.593 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # betweenness: 79,20.697222222222223 80,12.290584415584414 81,1.5 bigclam 本地,OBS # runtime: {runtime} # community_num: {community_num} # log_likelihood: {log_likelihood} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # communities: {vertexID}, {community} # runtime: 2.754 # community_num: 1 # log_likelihood: -5593.4549824494925 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # communities: 6,0 13,0 cesna 本地,OBS # runtime: {runtime} # community_num: {community_num} # log_likelihood: {log_likelihood} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # communities: {vertexID}, {community} # runtime: 40114.213 # community_num # log_likelihood # data_total_size: 1344 # data_return_size: 1344 # data_offset: 0 # communities: 3850,3 3858,3 3866,3 closeness 本地,OBS # runtime: {runtime} # source: {source} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # closeness: {closeness} # runtime: 0.394 # source: 12 # data_total_size: 1 # data_return_size: 1 # data_offset: 0 # closeness: 0.5087719298245614 cluster_coefficient (statistic = true) 本地,OBS # runtime: {runtime} # cluster_coefficient: {cluster_coefficient} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # vertex_cluster_coefficient: {vertexID},{cluster_coefficient} # runtime: 0.661 # cluster_coefficient: 0.13517429595852912 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # vertex_cluster_coefficient: common_neighbors_of_vertex_sets 本地,OBS # runtime: {runtime} # common_neighbors: {common_neighbors} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # vertices: {vertexID} # runtime: 0.42 # common_neighbors: 26 # data_total_size: 26 # data_return_size: 26 # data_offset: 0 # vertices: 103 138 98 connected_component 本地,OBS # runtime: {runtime} # community_num: {community_num} # Max_WCC_size: {Max_WCC_size} # Max_WCC_id: {Max_WCC_id} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # community: {vertexID},{community} # runtime: 0.263 # community_num: 1 # Max_WCC_size # Max_WCC_id # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # community: 2,0 6,0 13,0 edge_betweenness 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # edge_betweenness: {sourceID},{targetID},{edge_betweenness} # runtime: 153.006 # data_total_size: 311 # data_return_size: 311 # data_offset: 0 # edge_betweenness: 51,20,1.3333333333333333 51,33,7.192099567099566 51,10,3.4761904761904763 infomap 本地,OBS # runtime: {runtime} # min_code_length: {min_code_length} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # community: {vertexID},{community} # runtime: 98.158 # min_code_length: 6.2680095519443135 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # community: 2,20000000055 6,20000000050 13,20000000014 k_hop 本地,OBS # runtime: {runtime} # source: {source} # k: {k} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # vertices: {vertexID} # runtime: 0.442 # source: 76 # k: 6 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # vertices: 2 6 13 kcore 本地,OBS # runtime: {runtime} # kmax: {kmax} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # coreness: {vertexID},{coreness} # runtime: 10.882 # kmax: 15 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # coreness: 2,14 6,15 13,15 label_propagation 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # community: {vertexID},{community} # runtime: 2.624 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # community: 2,10000000024 6,10000000024 13,10000000024 link_prediction 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # link_prediction: {link_prediction} # runtime: 0 # source: 123 # target: 43 # data_total_size: 1 # data_return_size: 1 # data_offset: 0 # link_prediction: 0.07017543859649122 louvain 本地,OBS # runtime: {runtime} # modularity: {modularity} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # community: {vertexID},{community} # runtime: 45.835 # modularity: 0.16375671670152867 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # community: 2,20000000062 6,20000000050 13,20000000050 n_paths 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # paths_number: {paths_number} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # paths: 每行为一条路,格式: {sourceID},{vertexID1},...,{targetID} # runtime: 8.025 # source: 123 # target: 87 # paths_number: 100 # data_total_size: 100 # data_return_size: 100 # data_offset: 0 # paths: 123,21,87 123,13,87 123,32,87 od_betweenness 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # edge_betweenness: {sourceID},{targetID},{edge_betweenness} # runtime: 1.391 # data_total_size: 311 # data_return_size: 311 # data_offset: 0 # edge_betweenness: 51,20,0 51,33,0 51,10,0 pagerank 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # pagerank: {vertexID},{pagerank} # runtime: 4.044 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # pagerank: 2,0.007888904051903298 6,0.013215863692849642 13,0.01860530199450448 personalrank 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # personalrank: {vertexID},{personalrank} # runtime: 2.326 # source: 46 # data_total_size: 49 # data_return_size: 49 # data_offset: 0 # personalrank: 0,0.0021350905350732297 1,0.004591151406893241 shortest_path 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # path: 每行为一条路,格式: {sourceID},{vertexID1},...,{targetID} # runtime: 0.308 # source: 123 # target: 5 # data_total_size: 1 # data_return_size: 1 # data_offset: 0 # path: 123,10,137,5 shortest_path_of_vertex_sets 本地,OBS # runtime: {runtime} # source: {source} # target: {target} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # path: 每行为一条路,格式: {sourceID},{vertexID1},...,{targetID} # runtime: 1.832 # source: 24 # target: 121 # data_total_size: 1 # data_return_size: 1 # data_offset: 0 # path: 24,121 single_vertex_circles_detection 本地,OBS # runtime: {runtime} # source: {source} # min_circle_length: {min_circle_length} # max_circle_length: {max_circle_length} # limit_circle_number: {limit_circle_number} # circle_number: {circle_number} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # circles: 每行为一条路,格式: {sourceID},{vertexID1},...,{sourceID} # runtime: 37.46 # source: 122 # target: # min_circle_length: 3 # max_circle_length: 10 # limit_circle_number: 100 # circle_number: 100 # data_total_size: 100 # data_return_size: 100 # data_offset: 0 # circles: 122,82,79,76,65,122 122,125,135,77,65,122 122,82,114,96,65,122 sssp 本地,OBS # runtime: {runtime} # source: {source} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # distance: {vertexID},{distance} # runtime: 0.452 # source: 32 # data_total_size: 48 # data_return_size: 48 # data_offset: 0 # distance: 0,2 5,2 7,2 subgraph_matching 本地,OBS # runtime: {runtime} # pattern_graph: {pattern_graph} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # subgraphs: 每行为一个匹配的子图,格式: {vertexID1},{vertexID2},...,{vertexIDn} ------ statistics = true------- # runtime: 1.376 # pattern_graph: 2,3,1 # data_total_size: 1 # data_return_size: 1 # data_offset: 0 # subgraph_number: 1556 ------ statistics = false------- # runtime: 0.956 # pattern_graph: 2,3,1 # subgraph_number: 0 # data_total_size: 100 # data_return_size: 100 # data_offset: 0 # subgraphs: 0,51,126 0,51,131 0,126,113 topic_rank 本地,OBS # runtime: {runtime} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # topicrank: {vertexID},{topicrank} # runtime: 1.11 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # topicrank: 2,0.00663068274092574 6,0.007278130208954746 13,0.007869137668788257 triangle_count (statistic = true) 本地,OBS # runtime: {runtime} # triangle_count: {triangle_count} # data_total_size: {data_total_size} # data_return_size: {data_return_size} # data_offset: {data_offset} # vertex_triangles: {vertexID},{vertex_triangles} # runtime: 0.491 # triangle_count: 1653 # data_total_size: 32 # data_return_size: 32 # data_offset: 0 # vertex_triangles: 算法结果失败返回示例: Http Status Code: 400 { "errorMessage": "Unsupported output file format", "errorCode": "GES.8301" } 父主题: HyG算法API