@zilliz/milvus2-sdk-node 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/milvus/Client.d.ts +0 -8
- package/dist/milvus/Client.js +0 -17
- package/dist/milvus/Client.js.map +1 -1
- package/dist/milvus/Collection.d.ts +225 -131
- package/dist/milvus/Collection.js +262 -155
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +129 -125
- package/dist/milvus/Data.js +157 -150
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/MilvusIndex.d.ts +57 -53
- package/dist/milvus/MilvusIndex.js +61 -55
- package/dist/milvus/MilvusIndex.js.map +1 -1
- package/dist/milvus/Partition.d.ts +86 -79
- package/dist/milvus/Partition.js +89 -80
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/Resource.d.ts +173 -0
- package/dist/milvus/Resource.js +356 -0
- package/dist/milvus/Resource.js.map +1 -0
- package/dist/milvus/User.d.ts +119 -93
- package/dist/milvus/User.js +133 -100
- package/dist/milvus/User.js.map +1 -1
- package/dist/milvus/Utils.d.ts +1 -1
- package/dist/milvus/const/Milvus.d.ts +272 -0
- package/dist/milvus/const/Milvus.js +375 -0
- package/dist/milvus/const/Milvus.js.map +1 -0
- package/dist/milvus/index.d.ts +3 -1
- package/dist/milvus/index.js +8 -5
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +88 -8
- package/dist/milvus/types/Collection.js +1 -9
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/milvus/types/Common.d.ts +11 -267
- package/dist/milvus/types/Common.js +1 -369
- package/dist/milvus/types/Common.js.map +1 -1
- package/dist/milvus/types/Data.d.ts +154 -1
- package/dist/milvus/types/Index.d.ts +20 -1
- package/dist/milvus/types/Partition.d.ts +8 -1
- package/dist/milvus/types/Resource.d.ts +44 -0
- package/dist/milvus/types/{Search.js → Resource.js} +1 -1
- package/dist/milvus/types/Resource.js.map +1 -0
- package/dist/milvus/types/Response.d.ts +0 -246
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +53 -1
- package/dist/milvus/types.d.ts +8 -7
- package/dist/milvus/types.js +2 -1
- package/dist/milvus/types.js.map +1 -1
- package/dist/milvus/utils/Format.d.ts +12 -11
- package/dist/milvus/utils/Format.js +27 -18
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Validate.d.ts +12 -0
- package/dist/milvus/utils/Validate.js +27 -5
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/proto/proto/common.proto +25 -2
- package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
- package/dist/proto/proto/milvus.proto +126 -0
- package/dist/proto/proto/msg.proto +107 -0
- package/dist/sdk.json +1 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.js +5 -32
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -10
- package/dist/milvus/types/Search.d.ts +0 -81
- package/dist/milvus/types/Search.js.map +0 -1
package/dist/milvus/Partition.js
CHANGED
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -55,6 +55,7 @@ exports.Partition = void 0;
|
|
|
55
55
|
var utils_1 = require("../utils");
|
|
56
56
|
var Client_1 = require("./Client");
|
|
57
57
|
var ErrorReason_1 = require("./const/ErrorReason");
|
|
58
|
+
var Validate_1 = require("./utils/Validate");
|
|
58
59
|
var Format_1 = require("./utils/Format");
|
|
59
60
|
var Partition = /** @class */ (function (_super) {
|
|
60
61
|
__extends(Partition, _super);
|
|
@@ -65,17 +66,18 @@ var Partition = /** @class */ (function (_super) {
|
|
|
65
66
|
* Create a partition in a collection.
|
|
66
67
|
*
|
|
67
68
|
* @param data
|
|
68
|
-
* | Property
|
|
69
|
-
* |
|
|
70
|
-
* | collection_name
|
|
71
|
-
* | partition_name
|
|
72
|
-
* | timeout
|
|
69
|
+
* | Property | Type | Description |
|
|
70
|
+
* | :-- | :-- | :-- |
|
|
71
|
+
* | collection_name | String | Collection name |
|
|
72
|
+
* | partition_name | String | Partition name |
|
|
73
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
74
|
+
|
|
73
75
|
*
|
|
74
|
-
* @
|
|
75
|
-
* | Property
|
|
76
|
-
* |
|
|
77
|
-
* | error_code
|
|
78
|
-
* | reason
|
|
76
|
+
* @returns
|
|
77
|
+
* | Property | Description |
|
|
78
|
+
* | :-- | :-- |
|
|
79
|
+
* | error_code | Error code number |
|
|
80
|
+
* | reason | Error cause |
|
|
79
81
|
*
|
|
80
82
|
* #### Example
|
|
81
83
|
*
|
|
@@ -92,7 +94,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
92
94
|
return __generator(this, function (_a) {
|
|
93
95
|
switch (_a.label) {
|
|
94
96
|
case 0:
|
|
95
|
-
|
|
97
|
+
(0, Validate_1.checkCollectionAndPartitionName)(data);
|
|
96
98
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'CreatePartition', data, data.timeout)];
|
|
97
99
|
case 1:
|
|
98
100
|
promise = _a.sent();
|
|
@@ -105,17 +107,18 @@ var Partition = /** @class */ (function (_super) {
|
|
|
105
107
|
* Check if a partition exists in a collection.
|
|
106
108
|
*
|
|
107
109
|
* @param data
|
|
108
|
-
* | Property
|
|
109
|
-
* |
|
|
110
|
-
* | collection_name
|
|
111
|
-
* | partition_name
|
|
112
|
-
* | timeout
|
|
110
|
+
* | Property | Type | Description |
|
|
111
|
+
* | :-- | :-- | :-- |
|
|
112
|
+
* | collection_name | string | Collection name |
|
|
113
|
+
* | partition_name | string | Parititon name |
|
|
114
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
115
|
+
|
|
113
116
|
*
|
|
114
|
-
* @
|
|
115
|
-
*
|
|
116
|
-
* |
|
|
117
|
-
* | status
|
|
118
|
-
* | value
|
|
117
|
+
* @returns
|
|
118
|
+
* | Property | Description |
|
|
119
|
+
* | :-- | :-- |
|
|
120
|
+
* | status | { error_code: number,reason:string } |
|
|
121
|
+
* | value | `true` or `false` |
|
|
119
122
|
*
|
|
120
123
|
* #### Example
|
|
121
124
|
*
|
|
@@ -132,7 +135,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
132
135
|
return __generator(this, function (_a) {
|
|
133
136
|
switch (_a.label) {
|
|
134
137
|
case 0:
|
|
135
|
-
|
|
138
|
+
(0, Validate_1.checkCollectionAndPartitionName)(data);
|
|
136
139
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'HasPartition', data, data.timeout)];
|
|
137
140
|
case 1:
|
|
138
141
|
promise = _a.sent();
|
|
@@ -145,17 +148,18 @@ var Partition = /** @class */ (function (_super) {
|
|
|
145
148
|
* Show all partitions in a collection.
|
|
146
149
|
*
|
|
147
150
|
* @param data
|
|
148
|
-
* | Property
|
|
149
|
-
* |
|
|
150
|
-
* | collection_name
|
|
151
|
-
* | timeout
|
|
151
|
+
* | Property | Type | Description |
|
|
152
|
+
* | :-- | :-- | :-- |
|
|
153
|
+
* | collection_name | String | Collection name |
|
|
154
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
155
|
+
|
|
152
156
|
*
|
|
153
|
-
* @
|
|
154
|
-
*
|
|
155
|
-
* |
|
|
156
|
-
* | status
|
|
157
|
-
* | partition_names
|
|
158
|
-
* | partitionIDs
|
|
157
|
+
* @returns
|
|
158
|
+
* | Property | Description |
|
|
159
|
+
* | :-- | :-- |
|
|
160
|
+
* | status | { error_code: number, reason: string } |
|
|
161
|
+
* | partition_names | Array of partition names |
|
|
162
|
+
* | partitionIDs | Array of partition IDs |
|
|
159
163
|
*
|
|
160
164
|
*
|
|
161
165
|
* #### Example
|
|
@@ -172,7 +176,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
172
176
|
return __generator(this, function (_a) {
|
|
173
177
|
switch (_a.label) {
|
|
174
178
|
case 0:
|
|
175
|
-
|
|
179
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
176
180
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'ShowPartitions', data, data.timeout)];
|
|
177
181
|
case 1:
|
|
178
182
|
promise = _a.sent();
|
|
@@ -185,18 +189,19 @@ var Partition = /** @class */ (function (_super) {
|
|
|
185
189
|
* Show the statistics information of a partition.
|
|
186
190
|
*
|
|
187
191
|
* @param data
|
|
188
|
-
* | Property
|
|
189
|
-
* |
|
|
190
|
-
* | collection_name
|
|
191
|
-
* | partition_name
|
|
192
|
-
* | timeout
|
|
192
|
+
* | Property | Type | Description |
|
|
193
|
+
* | :-- | :-- | :-- |
|
|
194
|
+
* | collection_name | String | Collection name |
|
|
195
|
+
* | partition_name | String | Partition name |
|
|
196
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
197
|
+
|
|
193
198
|
*
|
|
194
|
-
* @
|
|
195
|
-
*
|
|
196
|
-
* |
|
|
197
|
-
* | status
|
|
198
|
-
* | stats
|
|
199
|
-
* | data |
|
|
199
|
+
* @returns
|
|
200
|
+
* | Property | Description |
|
|
201
|
+
* | :-- | :-- |
|
|
202
|
+
* | status | { error_code: number, reason: string } |
|
|
203
|
+
* | stats | [{key: string, value: string}] |
|
|
204
|
+
* | data | { row_count: 0 } transformed from **stats** |
|
|
200
205
|
*
|
|
201
206
|
*
|
|
202
207
|
* #### Example
|
|
@@ -214,7 +219,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
214
219
|
return __generator(this, function (_a) {
|
|
215
220
|
switch (_a.label) {
|
|
216
221
|
case 0:
|
|
217
|
-
|
|
222
|
+
(0, Validate_1.checkCollectionAndPartitionName)(data);
|
|
218
223
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetPartitionStatistics', data, data.timeout)];
|
|
219
224
|
case 1:
|
|
220
225
|
promise = _a.sent();
|
|
@@ -225,20 +230,22 @@ var Partition = /** @class */ (function (_super) {
|
|
|
225
230
|
});
|
|
226
231
|
};
|
|
227
232
|
/**
|
|
228
|
-
* Load
|
|
233
|
+
* Load multiple partitions into query nodes.
|
|
229
234
|
*
|
|
230
235
|
* @param data
|
|
231
|
-
* | Property
|
|
232
|
-
* |
|
|
233
|
-
* | collection_name
|
|
234
|
-
* | partition_names
|
|
235
|
-
* |
|
|
236
|
+
* | Property | Type | Description |
|
|
237
|
+
* | :--- | :-- | :-- |
|
|
238
|
+
* | collection_name | String | Collection name |
|
|
239
|
+
* | partition_names | String[] | Array of partition names |
|
|
240
|
+
* | replica_number? | number | replica number |
|
|
241
|
+
* | resource_groups | String[] | resource group names |
|
|
242
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
236
243
|
*
|
|
237
|
-
* @
|
|
238
|
-
* | Property
|
|
239
|
-
* |
|
|
240
|
-
* | error_code
|
|
241
|
-
* | reason
|
|
244
|
+
* @returns
|
|
245
|
+
* | Property | Description |
|
|
246
|
+
* | :-- | :-- |
|
|
247
|
+
* | error_code | Error code number |
|
|
248
|
+
* | reason | Error cause |
|
|
242
249
|
*
|
|
243
250
|
* #### Example
|
|
244
251
|
*
|
|
@@ -255,7 +262,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
255
262
|
return __generator(this, function (_a) {
|
|
256
263
|
switch (_a.label) {
|
|
257
264
|
case 0:
|
|
258
|
-
|
|
265
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
259
266
|
if (!Array.isArray(data.partition_names) || !data.partition_names.length) {
|
|
260
267
|
throw new Error(ErrorReason_1.ERROR_REASONS.PARTITION_NAMES_IS_REQUIRED);
|
|
261
268
|
}
|
|
@@ -271,17 +278,18 @@ var Partition = /** @class */ (function (_super) {
|
|
|
271
278
|
* Release a partition from cache.
|
|
272
279
|
*
|
|
273
280
|
* @param data
|
|
274
|
-
* | Property
|
|
275
|
-
* |
|
|
276
|
-
* | collection_name
|
|
277
|
-
* | partition_names
|
|
278
|
-
* | timeout
|
|
281
|
+
* | Property | Type | Description |
|
|
282
|
+
* | :-- | :-- | :-- |
|
|
283
|
+
* | collection_name | String | Collection name |
|
|
284
|
+
* | partition_names | String[] | Array of partition names |
|
|
285
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
286
|
+
|
|
279
287
|
*
|
|
280
|
-
* @
|
|
281
|
-
* | Property
|
|
282
|
-
* |
|
|
283
|
-
* | error_code
|
|
284
|
-
* | reason
|
|
288
|
+
* @returns
|
|
289
|
+
* | Property | Description |
|
|
290
|
+
* | :-- | :-- |
|
|
291
|
+
* | error_code | Error code number |
|
|
292
|
+
* | reason | Error cause |
|
|
285
293
|
*
|
|
286
294
|
* #### Example
|
|
287
295
|
*
|
|
@@ -298,7 +306,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
298
306
|
return __generator(this, function (_a) {
|
|
299
307
|
switch (_a.label) {
|
|
300
308
|
case 0:
|
|
301
|
-
|
|
309
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
302
310
|
if (!Array.isArray(data.partition_names) || !data.partition_names.length) {
|
|
303
311
|
throw new Error(ErrorReason_1.ERROR_REASONS.PARTITION_NAMES_IS_REQUIRED);
|
|
304
312
|
}
|
|
@@ -320,17 +328,18 @@ var Partition = /** @class */ (function (_super) {
|
|
|
320
328
|
* To drop a partition will drop all data in this partition and the `_default` partition cannot be dropped.
|
|
321
329
|
*
|
|
322
330
|
* @param data
|
|
323
|
-
* | Property
|
|
324
|
-
* |
|
|
325
|
-
* | collection_name
|
|
326
|
-
* | partition_name
|
|
327
|
-
* | timeout
|
|
331
|
+
* | Property | Type | Description |
|
|
332
|
+
* | :-- | :-- | :-- |
|
|
333
|
+
* | collection_name | String | Collection name |
|
|
334
|
+
* | partition_name | String | Partition name |
|
|
335
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
336
|
+
|
|
328
337
|
*
|
|
329
|
-
* @
|
|
330
|
-
* | Property
|
|
331
|
-
* |
|
|
332
|
-
* | error_code
|
|
333
|
-
* | reason
|
|
338
|
+
* @returns
|
|
339
|
+
* | Property | Description |
|
|
340
|
+
* | :-- | :-- |
|
|
341
|
+
* | error_code | Error code number |
|
|
342
|
+
* | reason | Error cause |
|
|
334
343
|
*
|
|
335
344
|
* #### Example
|
|
336
345
|
*
|
|
@@ -347,7 +356,7 @@ var Partition = /** @class */ (function (_super) {
|
|
|
347
356
|
return __generator(this, function (_a) {
|
|
348
357
|
switch (_a.label) {
|
|
349
358
|
case 0:
|
|
350
|
-
|
|
359
|
+
(0, Validate_1.checkCollectionAndPartitionName)(data);
|
|
351
360
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'DropPartition', data, data.timeout)];
|
|
352
361
|
case 1:
|
|
353
362
|
promise = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../milvus/Partition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,k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B,EACnB,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;OAKG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,iCAAa,GAAnB,UAAoB,IAAsB;;;;;;wBACxC,IAAA,0CAA+B,EAAC,IAAI,CAAC,CAAC;wBACtB,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,eAAe,EACf,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IACH,gBAAC;AAAD,CAAC,AAvRD,CAA+B,eAAM,GAuRpC;AAvRY,8BAAS"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { Client } from './Client';
|
|
2
|
+
import { ResStatus } from './types';
|
|
3
|
+
import { GrpcTimeOut, CreateResourceGroupReq, DropResourceGroupsReq, ListResourceGroupsResponse, DesribeResourceGroupsReq, DescribeResourceGroupResponse, TransferNodeReq, TransferReplicaReq } from './types';
|
|
4
|
+
export declare class Resource extends Client {
|
|
5
|
+
/**
|
|
6
|
+
* Create a resource group.
|
|
7
|
+
*
|
|
8
|
+
* @param data
|
|
9
|
+
* | Property | Type | Description |
|
|
10
|
+
* | :--- | :-- | :-- |
|
|
11
|
+
* | resource_group | String | Resource group name |
|
|
12
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
13
|
+
*
|
|
14
|
+
* @returns
|
|
15
|
+
* | Property | Type | Description |
|
|
16
|
+
* | :-- | :-- | :-- |
|
|
17
|
+
* | status.error_code | string | error code |
|
|
18
|
+
* | status.reason | string | error reason |
|
|
19
|
+
*
|
|
20
|
+
* #### Example
|
|
21
|
+
*
|
|
22
|
+
* ```
|
|
23
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.createResourceGroup({
|
|
24
|
+
* resource_group: "vector_01",
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
createResourceGroup(data: CreateResourceGroupReq): Promise<ResStatus>;
|
|
29
|
+
/**
|
|
30
|
+
* list resource groups.
|
|
31
|
+
*
|
|
32
|
+
* @returns
|
|
33
|
+
* | Property | Type | Description |
|
|
34
|
+
* | :-- | :-- | :-- |
|
|
35
|
+
* | status.error_code | string | error code |
|
|
36
|
+
* | status.reason | string | error reason |
|
|
37
|
+
* | resource_groups | string[] | Resource group string array |
|
|
38
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
39
|
+
*
|
|
40
|
+
* #### Example
|
|
41
|
+
*
|
|
42
|
+
* ```
|
|
43
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.listResourceGroups();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
listResourceGroups(data?: GrpcTimeOut): Promise<ListResourceGroupsResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Describe a resource group.
|
|
49
|
+
*
|
|
50
|
+
* @param data
|
|
51
|
+
* | Property | Type | Description |
|
|
52
|
+
* | :--- | :-- | :-- |
|
|
53
|
+
* | resource_group | String | Resource group name |
|
|
54
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
55
|
+
*
|
|
56
|
+
* @returns
|
|
57
|
+
* | Property | Type | Description |
|
|
58
|
+
* | :-- | :-- | :-- |
|
|
59
|
+
* | status.error_code | string | error code |
|
|
60
|
+
* | status.reason | string | error reason |
|
|
61
|
+
* | resource_group.capacity | number | num_node which has been transfer to this rg |
|
|
62
|
+
* | resource_group.num_available_node | number | available node_num, some node may shutdown |
|
|
63
|
+
* | resource_group.num_loaded_replica | { [key: string]: number } | from collection_name to loaded replica of each collecion in this rg |
|
|
64
|
+
* | resource_group.num_outgoing_node | { [key: string]: number } | from collection_name to outgoging accessed node num by replica loaded in this rg |
|
|
65
|
+
* | resource_group.num_incoming_node | { [key: string]: number } | from collection_name to incoming accessed node num by replica loaded in other rg |
|
|
66
|
+
*
|
|
67
|
+
* #### Example
|
|
68
|
+
*
|
|
69
|
+
* ```
|
|
70
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.describeResrouceGroup({
|
|
71
|
+
* resource_group: 'my-resource-group'
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
describeResourceGroup(data: DesribeResourceGroupsReq): Promise<DescribeResourceGroupResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* drop a resource group.
|
|
78
|
+
* @param data
|
|
79
|
+
* | Property | Type | Description |
|
|
80
|
+
* | :--- | :-- | :-- |
|
|
81
|
+
* | resource_group | String | Resource group name |
|
|
82
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
83
|
+
*
|
|
84
|
+
* @returns
|
|
85
|
+
* | Property | Type | Description |
|
|
86
|
+
* | :-- | :-- | :-- |
|
|
87
|
+
* | status.error_code | string | error code |
|
|
88
|
+
* | status.reason | string | error reason |
|
|
89
|
+
*
|
|
90
|
+
* #### Example
|
|
91
|
+
*
|
|
92
|
+
* ```
|
|
93
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.dropResourceGroup({
|
|
94
|
+
* resource_group: 'my-resource-group'
|
|
95
|
+
* });
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
dropResourceGroup(data: DropResourceGroupsReq): Promise<ResStatus>;
|
|
99
|
+
/**
|
|
100
|
+
* transfer nodes from one resource group to another
|
|
101
|
+
* @param data
|
|
102
|
+
* | Property | Type | Description |
|
|
103
|
+
* | :--- | :-- | :-- |
|
|
104
|
+
* | source_resource_group | String | source resource group name |
|
|
105
|
+
* | target_resource_group | String | target resource group name |
|
|
106
|
+
* | collection_name | String | collection name |
|
|
107
|
+
* | num_replica | Number | number of replicas to transfer |
|
|
108
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
109
|
+
*
|
|
110
|
+
* @returns
|
|
111
|
+
* | Property | Type | Description |
|
|
112
|
+
* | :-- | :-- | :-- |
|
|
113
|
+
* | status.error_code | string | error code |
|
|
114
|
+
* | status.reason | string | error reason |
|
|
115
|
+
*
|
|
116
|
+
*
|
|
117
|
+
* #### Example
|
|
118
|
+
*
|
|
119
|
+
* ```
|
|
120
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.transferNode({
|
|
121
|
+
* source_resource_group: 'source-resource-group',
|
|
122
|
+
* target_resource_group: 'target-resource-group',
|
|
123
|
+
* collection_name: 'my-collection',
|
|
124
|
+
* num_replica: 2
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
transferReplica(data: TransferReplicaReq): Promise<ResStatus>;
|
|
129
|
+
/**
|
|
130
|
+
* transfer nodes from one resource group to another
|
|
131
|
+
* @param data
|
|
132
|
+
* | Property | Type | Description |
|
|
133
|
+
* | :--- | :-- | :-- |
|
|
134
|
+
* | source_resource_group | String | source resource group name |
|
|
135
|
+
* | target_resource_group | String | target resource group name |
|
|
136
|
+
* | num_node | Number | number of nodes to transfer |
|
|
137
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
138
|
+
*
|
|
139
|
+
* @returns
|
|
140
|
+
* | Property | Type | Description |
|
|
141
|
+
* | :-- | :-- | :-- |
|
|
142
|
+
* | status.error_code | string | error code |
|
|
143
|
+
* | status.reason | string | error reason |
|
|
144
|
+
*
|
|
145
|
+
*
|
|
146
|
+
* #### Example
|
|
147
|
+
*
|
|
148
|
+
* ```
|
|
149
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.transferNode({
|
|
150
|
+
* source_resource_group: 'source-resource-group',
|
|
151
|
+
* target_resource_group: 'target-resource-group',
|
|
152
|
+
* num_node: 4
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
transferNode(data: TransferNodeReq): Promise<ResStatus>;
|
|
157
|
+
/**
|
|
158
|
+
* drop all resource groups, transfer all nodes to the default group
|
|
159
|
+
*
|
|
160
|
+
* @returns
|
|
161
|
+
* | Property | Type | Description |
|
|
162
|
+
* | :-- | :-- | :-- |
|
|
163
|
+
* | status.error_code | string | error code |
|
|
164
|
+
* | status.reason | string[] | error reason |
|
|
165
|
+
*
|
|
166
|
+
* #### Example
|
|
167
|
+
*
|
|
168
|
+
* ```
|
|
169
|
+
* new milvusClient(MILUVS_ADDRESS).resourceManager.dropResourceGroups();
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
dropAllResourceGroups(): Promise<ResStatus[]>;
|
|
173
|
+
}
|