Browse Source

agRepairJobs.erl添加注释

erlArango_v1
AICells 5 years ago
parent
commit
fdaf6fa752
1 changed files with 59 additions and 2 deletions
  1. +59
    -2
      src/agApi/agRepairJobs.erl

+ 59
- 2
src/agApi/agRepairJobs.erl View File

@ -7,12 +7,69 @@
%% doc_address:https://www.arangodb.com/docs/stable/http/repairs.html
%
% DistributionShardsLike
% 3.2.123.3.4distributeShardsLike设置中的原型集合完全一样地分布在DB-Server上
%
% 使API之前
%
%
%
% replicationFactor distributeShardsLike SmartGraphs
%
% replicationFactor在修理过程中进行更改可能会使其处于无法人工干预而无法修理的状态
% 使
%
% replicationFactor等于数据库服务器的总数replicationFactor一个DB-Server
%
%
%
% 使GET /_admin/repairs/distributeShardsLike
% 使GET将不会触发任何修复西
%%
%% GET /_admin/repairs/distributeShardsLike
checkRepir(PoolNameOrSocket) ->
checkRepair(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgGet, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).
% collections<db>/<collection>error属性true如果该集合false error为trueerrorNum和 errorMessageerrorDetails
% POST /_admin/repairs/distributeShardsLike
% Async Results x-arango-async: store将作业放入后台
%
%
% $ wget --method=POST --header='x-arango-async: store' -qSO - http://localhost:8529/_admin/repair/distributeShardsLike
% HTTP/1.1 202 Accepted
% X-Content-Type-Options: nosniff
% X-Arango-Async-Id: 152223973119118
% Server: ArangoDB
% Connection: Keep-Alive
% Content-Type: text/plain; charset=utf-8
% Content-Length: 0
%
% 线
%
% X-Arango-Async-Id: 152223973119118
% IDGET婷/_api/job/pending和/_api/job/done将列出未完成或者完成ID
%
% GET测试方法来完成
%
% 使job api来获取状态和结果204api将返回404/_api/job通过 PUT
%
% $ wget --method=PUT -qSO - http://localhost:8529/_api/job/152223973119118 | jq .
% HTTP/1.1 200 OK
% X-Content-Type-Options: nosniff
% X-Arango-Async-Id: 152223973119118
% Server: ArangoDB
% Connection: Keep-Alive
% Content-Type: application/json; charset=utf-8
% Content-Length: 53
% {
% "error": false,
% "code": 200,
% "message": "Nothing to do."
% }
%%
%% POST /_admin/repairs/distributeShardsLike
repir(PoolNameOrSocket) ->
doRepair(PoolNameOrSocket) ->
agHttpCli:callAgency(PoolNameOrSocket, ?AgPost, <<"/_admin/repairs/distributeShardsLike">>, [], undefined).

Loading…
Cancel
Save