@zilliz/milvus2-sdk-node 2.0.0 → 2.0.3
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/README.md +6 -0
- package/dist/milvus/Client.d.ts +6 -0
- package/dist/milvus/Client.js +6 -0
- package/dist/milvus/Client.js.map +1 -1
- package/dist/milvus/Collection.d.ts +1 -0
- package/dist/milvus/Collection.js +9 -8
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.js +1 -1
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/User.d.ts +100 -0
- package/dist/milvus/User.js +236 -0
- package/dist/milvus/User.js.map +1 -0
- package/dist/milvus/const/ErrorReason.d.ts +3 -0
- package/dist/milvus/const/ErrorReason.js +3 -0
- package/dist/milvus/const/ErrorReason.js.map +1 -1
- package/dist/milvus/index.d.ts +16 -8
- package/dist/milvus/index.js +33 -8
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +8 -0
- package/dist/milvus/types/Collection.js +9 -1
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/milvus/types/Response.d.ts +7 -1
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +12 -0
- package/dist/milvus/types/User.js +3 -0
- package/dist/milvus/types/User.js.map +1 -0
- package/dist/milvus/types.d.ts +7 -7
- package/dist/milvus/types.js +17 -0
- package/dist/milvus/types.js.map +1 -1
- package/dist/milvus/utils/Format.d.ts +3 -2
- package/dist/milvus/utils/Format.js +3 -1
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/{grpc-proto → proto/proto}/common.proto +33 -1
- package/dist/{grpc-proto → proto/proto}/milvus.proto +142 -1
- package/dist/{grpc-proto → proto/proto}/schema.proto +9 -2
- package/dist/sdk.json +1 -1
- package/package.json +5 -3
package/dist/milvus/index.d.ts
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import { Client } from
|
|
2
|
-
import { Collection } from
|
|
3
|
-
import { Partition } from
|
|
4
|
-
import { Index } from
|
|
5
|
-
import { Data } from
|
|
6
|
-
import {
|
|
1
|
+
import { Client } from '@grpc/grpc-js';
|
|
2
|
+
import { Collection } from './Collection';
|
|
3
|
+
import { Partition } from './Partition';
|
|
4
|
+
import { Index } from './MilvusIndex';
|
|
5
|
+
import { Data } from './Data';
|
|
6
|
+
import { User } from './User';
|
|
7
|
+
import { ErrorCode } from './types/Response';
|
|
7
8
|
export declare class MilvusClient {
|
|
8
9
|
client: Client;
|
|
9
10
|
collectionManager: Collection;
|
|
10
11
|
partitionManager: Partition;
|
|
11
12
|
indexManager: Index;
|
|
12
13
|
dataManager: Data;
|
|
14
|
+
userManager: User;
|
|
13
15
|
/**
|
|
14
16
|
* Connect to milvus grpc client.
|
|
15
17
|
* CollectionManager: control collection crud api
|
|
16
18
|
* PartitionManager: control partition crud api
|
|
17
19
|
* IndexManager: control index crud api
|
|
18
20
|
* DataManager: Search | Query | Insert | Flush
|
|
21
|
+
* UserManager: control user crud api
|
|
22
|
+
*
|
|
19
23
|
* @param address milvus address like: 127.0.0.1:19530
|
|
24
|
+
* @param ssl ssl connect or not, default is false
|
|
25
|
+
* @param username After created user in Milvus, username is required
|
|
26
|
+
* @param password After created user in Milvus, password is required
|
|
27
|
+
*
|
|
20
28
|
*/
|
|
21
|
-
constructor(address: string);
|
|
22
|
-
get sdkInfo(): {
|
|
29
|
+
constructor(address: string, ssl?: boolean, username?: string, password?: string);
|
|
30
|
+
static get sdkInfo(): {
|
|
23
31
|
version: string;
|
|
24
32
|
recommandMilvus: string;
|
|
25
33
|
};
|
package/dist/milvus/index.js
CHANGED
|
@@ -66,10 +66,11 @@ var Collection_1 = require("./Collection");
|
|
|
66
66
|
var Partition_1 = require("./Partition");
|
|
67
67
|
var MilvusIndex_1 = require("./MilvusIndex");
|
|
68
68
|
var Data_1 = require("./Data");
|
|
69
|
+
var User_1 = require("./User");
|
|
69
70
|
var sdk_json_1 = __importDefault(require("../sdk.json"));
|
|
70
71
|
var ErrorReason_1 = require("./const/ErrorReason");
|
|
71
72
|
var Response_1 = require("./types/Response");
|
|
72
|
-
var protoPath = path_1.default.resolve(__dirname,
|
|
73
|
+
var protoPath = path_1.default.resolve(__dirname, '../proto/proto/milvus.proto');
|
|
73
74
|
var MilvusClient = /** @class */ (function () {
|
|
74
75
|
/**
|
|
75
76
|
* Connect to milvus grpc client.
|
|
@@ -77,12 +78,30 @@ var MilvusClient = /** @class */ (function () {
|
|
|
77
78
|
* PartitionManager: control partition crud api
|
|
78
79
|
* IndexManager: control index crud api
|
|
79
80
|
* DataManager: Search | Query | Insert | Flush
|
|
81
|
+
* UserManager: control user crud api
|
|
82
|
+
*
|
|
80
83
|
* @param address milvus address like: 127.0.0.1:19530
|
|
84
|
+
* @param ssl ssl connect or not, default is false
|
|
85
|
+
* @param username After created user in Milvus, username is required
|
|
86
|
+
* @param password After created user in Milvus, password is required
|
|
87
|
+
*
|
|
81
88
|
*/
|
|
82
|
-
function MilvusClient(address) {
|
|
89
|
+
function MilvusClient(address, ssl, username, password) {
|
|
83
90
|
if (!address) {
|
|
84
91
|
throw new Error(ErrorReason_1.ERROR_REASONS.MILVUS_ADDRESS_IS_REQUIRED);
|
|
85
92
|
}
|
|
93
|
+
var authInterceptor = null;
|
|
94
|
+
if (username !== undefined && password !== undefined) {
|
|
95
|
+
authInterceptor = function (options, nextCall) {
|
|
96
|
+
return new grpc_js_1.InterceptingCall(nextCall(options), {
|
|
97
|
+
start: function (metadata, listener, next) {
|
|
98
|
+
var auth = Buffer.from(username + ":" + password, 'utf-8').toString('base64');
|
|
99
|
+
metadata.add('authorization', auth);
|
|
100
|
+
next(metadata, listener);
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
}
|
|
86
105
|
var packageDefinition = protoLoader.loadSync(protoPath, {
|
|
87
106
|
keepCase: true,
|
|
88
107
|
longs: String,
|
|
@@ -92,14 +111,20 @@ var MilvusClient = /** @class */ (function () {
|
|
|
92
111
|
});
|
|
93
112
|
var grpcObject = grpc_js_1.loadPackageDefinition(packageDefinition);
|
|
94
113
|
var milvusProto = grpcObject.milvus.proto.milvus;
|
|
95
|
-
var client = new milvusProto.MilvusService(address, grpc_js_1.credentials.createInsecure()
|
|
114
|
+
var client = new milvusProto.MilvusService(address, ssl ? grpc_js_1.credentials.createSsl() : grpc_js_1.credentials.createInsecure(), {
|
|
115
|
+
interceptors: [authInterceptor],
|
|
116
|
+
// Milvus default max_receive_message_length is 100MB, but Milvus support change max_receive_message_length .
|
|
117
|
+
// So SDK should support max_receive_message_length unlimited.
|
|
118
|
+
'grpc.max_receive_message_length': -1,
|
|
119
|
+
});
|
|
96
120
|
this.client = client;
|
|
97
121
|
this.collectionManager = new Collection_1.Collection(this.client);
|
|
98
122
|
this.partitionManager = new Partition_1.Partition(this.client);
|
|
99
123
|
this.indexManager = new MilvusIndex_1.Index(this.client);
|
|
100
124
|
this.dataManager = new Data_1.Data(this.client, this.collectionManager);
|
|
125
|
+
this.userManager = new User_1.User(this.client);
|
|
101
126
|
}
|
|
102
|
-
Object.defineProperty(MilvusClient
|
|
127
|
+
Object.defineProperty(MilvusClient, "sdkInfo", {
|
|
103
128
|
get: function () {
|
|
104
129
|
return {
|
|
105
130
|
version: sdk_json_1.default.version,
|
|
@@ -121,14 +146,14 @@ var MilvusClient = /** @class */ (function () {
|
|
|
121
146
|
return __generator(this, function (_d) {
|
|
122
147
|
switch (_d.label) {
|
|
123
148
|
case 0: return [4 /*yield*/, this.dataManager.getMetric({
|
|
124
|
-
request: { metric_type:
|
|
149
|
+
request: { metric_type: 'system_info' },
|
|
125
150
|
})];
|
|
126
151
|
case 1:
|
|
127
152
|
res = _d.sent();
|
|
128
153
|
curMilvusVersion = (_c = (_b = (_a = res.response.nodes_info[0]) === null || _a === void 0 ? void 0 : _a.infos) === null || _b === void 0 ? void 0 : _b.system_info) === null || _c === void 0 ? void 0 : _c.build_version;
|
|
129
|
-
if (curMilvusVersion !==
|
|
130
|
-
console.warn(
|
|
131
|
-
console.warn("Node sdk " +
|
|
154
|
+
if (curMilvusVersion !== MilvusClient.sdkInfo.recommandMilvus) {
|
|
155
|
+
console.warn('------- Warning ---------');
|
|
156
|
+
console.warn("Node sdk " + MilvusClient.sdkInfo.version + " recommend Milvus Version " + MilvusClient.sdkInfo.recommandMilvus + ".\nDifferent version may cause some error.");
|
|
132
157
|
return [2 /*return*/, { error_code: Response_1.ErrorCode.SUCCESS, match: false }];
|
|
133
158
|
}
|
|
134
159
|
return [2 /*return*/, { error_code: Response_1.ErrorCode.SUCCESS, match: true }];
|
package/dist/milvus/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../milvus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,8DAAkD;AAClD,yCAKuB;AACvB,2CAA0C;AAC1C,yCAAwC;AACxC,6CAAsC;AACtC,+BAA8B;AAC9B,+BAA8B;AAC9B,yDAAkC;AAClC,mDAAoD;AACpD,6CAA6C;AAE7C,IAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC;AACzE;IAQE;;;;;;;;;;;;;OAaG;IACH,sBACE,OAAe,EACf,GAAa,EACb,QAAiB,EACjB,QAAiB;QAEjB,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,2BAAa,CAAC,0BAA0B,CAAC,CAAC;SAC3D;QACD,IAAI,eAAe,GAAG,IAAI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AS,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC;;;;KACvD;IAED,sCAAe,GAAf;QACE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,8BAA8B;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IACH,mBAAC;AAAD,CAAC,AA7GD,IA6GC;AA7GY,oCAAY"}
|
|
@@ -21,8 +21,16 @@ export interface CreateCollectionReq {
|
|
|
21
21
|
collection_name: string;
|
|
22
22
|
shards_num?: number;
|
|
23
23
|
description?: string;
|
|
24
|
+
consistency_level?: "Strong" | "Session" | "Bounded" | "Eventually" | "Customized";
|
|
24
25
|
fields: FieldType[];
|
|
25
26
|
}
|
|
27
|
+
export declare enum ConsistencyLevelEnum {
|
|
28
|
+
Strong = 0,
|
|
29
|
+
Session = 1,
|
|
30
|
+
Bounded = 2,
|
|
31
|
+
Eventually = 3,
|
|
32
|
+
Customized = 4
|
|
33
|
+
}
|
|
26
34
|
interface CollectionNameReq {
|
|
27
35
|
/**
|
|
28
36
|
* @param collection_name collection name string
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShowCollectionsType = void 0;
|
|
3
|
+
exports.ConsistencyLevelEnum = exports.ShowCollectionsType = void 0;
|
|
4
4
|
var ShowCollectionsType;
|
|
5
5
|
(function (ShowCollectionsType) {
|
|
6
6
|
ShowCollectionsType[ShowCollectionsType["All"] = 0] = "All";
|
|
7
7
|
ShowCollectionsType[ShowCollectionsType["Loaded"] = 1] = "Loaded";
|
|
8
8
|
})(ShowCollectionsType = exports.ShowCollectionsType || (exports.ShowCollectionsType = {}));
|
|
9
|
+
var ConsistencyLevelEnum;
|
|
10
|
+
(function (ConsistencyLevelEnum) {
|
|
11
|
+
ConsistencyLevelEnum[ConsistencyLevelEnum["Strong"] = 0] = "Strong";
|
|
12
|
+
ConsistencyLevelEnum[ConsistencyLevelEnum["Session"] = 1] = "Session";
|
|
13
|
+
ConsistencyLevelEnum[ConsistencyLevelEnum["Bounded"] = 2] = "Bounded";
|
|
14
|
+
ConsistencyLevelEnum[ConsistencyLevelEnum["Eventually"] = 3] = "Eventually";
|
|
15
|
+
ConsistencyLevelEnum[ConsistencyLevelEnum["Customized"] = 4] = "Customized";
|
|
16
|
+
})(ConsistencyLevelEnum = exports.ConsistencyLevelEnum || (exports.ConsistencyLevelEnum = {}));
|
|
9
17
|
//# sourceMappingURL=Collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":";;;AAaA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,iEAAM,CAAA;AACR,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
|
|
1
|
+
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":";;;AAaA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,iEAAM,CAAA;AACR,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AAqBD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,mEAAU,CAAA;IACV,qEAAW,CAAA;IACX,qEAAW,CAAA;IACX,2EAAc,CAAA;IACd,2EAAc,CAAA;AAChB,CAAC,EANW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAM/B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConsistencyLevelEnum } from './Collection';
|
|
2
|
+
import { IndexState, KeyValuePair, NumberArrayId, SegmentState, StringArrayId, CompactionState } from './Common';
|
|
2
3
|
export declare enum ErrorCode {
|
|
3
4
|
SUCCESS = "Success",
|
|
4
5
|
INDEX_NOT_EXIST = "IndexNotExist",
|
|
@@ -48,6 +49,7 @@ export interface DescribeCollectionResponse extends TimeStamp {
|
|
|
48
49
|
status: ResStatus;
|
|
49
50
|
schema: CollectionSchema;
|
|
50
51
|
collectionID: string;
|
|
52
|
+
consistency_level: ConsistencyLevelEnum;
|
|
51
53
|
virtual_channel_names: string[];
|
|
52
54
|
physical_channel_names: string[];
|
|
53
55
|
}
|
|
@@ -159,4 +161,8 @@ export interface GetCompactionPlansResponse {
|
|
|
159
161
|
target: number;
|
|
160
162
|
}[];
|
|
161
163
|
}
|
|
164
|
+
export interface ListCredUsersResponse {
|
|
165
|
+
status: ResStatus;
|
|
166
|
+
usernames: string[];
|
|
167
|
+
}
|
|
162
168
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../milvus/types/Response.ts"],"names":[],"mappings":";;;AAUA,IAAY,SA0BX;AA1BD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,8CAAiC,CAAA;IACjC,iDAAoC,CAAA;IACpC,qCAAqC;IACrC,2CAA2C;IAC3C,mDAAmD;IACnD,yCAAyC;IACzC,2CAA2C;IAC3C,6CAA6C;IAC7C,uDAAuD;IACvD,iCAAiC;IACjC,2CAA2C;IAC3C,2CAA2C;IAC3C,mDAAmD;IACnD,qCAAqC;IACrC,+BAA+B;IAC/B,iCAAiC;IACjC,iDAAiD;IACjD,6CAA6C;IAC7C,iDAAiD;IACjD,6CAA6C;IAC7C,2CAA2C;IAC3C,mCAAmC;IACnC,+CAA+C;IAC/C,mCAAmC;AACrC,CAAC,EA1BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA0BpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../milvus/types/User.ts"],"names":[],"mappings":""}
|
package/dist/milvus/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export * from "./types/Collection";
|
|
2
|
+
export * from "./types/Data";
|
|
3
|
+
export * from "./types/Common";
|
|
4
|
+
export * from "./types/Index";
|
|
5
|
+
export * from "./types/Partition";
|
|
6
|
+
export * from "./types/Response";
|
|
7
|
+
export * from "./types/Search";
|
package/dist/milvus/types.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./types/Collection"), exports);
|
|
14
|
+
__exportStar(require("./types/Data"), exports);
|
|
15
|
+
__exportStar(require("./types/Common"), exports);
|
|
16
|
+
__exportStar(require("./types/Index"), exports);
|
|
17
|
+
__exportStar(require("./types/Partition"), exports);
|
|
18
|
+
__exportStar(require("./types/Response"), exports);
|
|
19
|
+
__exportStar(require("./types/Search"), exports);
|
|
3
20
|
//# sourceMappingURL=types.js.map
|
package/dist/milvus/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../milvus/types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AAEnC,+CAA6B;AAE7B,iDAA+B;AAE/B,gDAA8B;AAE9B,oDAAkC;AAElC,mDAAiC;AAEjC,iDAA+B"}
|
|
@@ -45,7 +45,7 @@ export declare const formatNumberPrecision: (number: number, precision: number)
|
|
|
45
45
|
* const res = hybridtsToUnixtime("429642767925248000");
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
export declare const hybridtsToUnixtime: (hybridts:
|
|
48
|
+
export declare const hybridtsToUnixtime: (hybridts: bigint | string) => string;
|
|
49
49
|
/**
|
|
50
50
|
* Generate a hybrid timestamp based on Unix Epoch time, timedelta and incremental time internval.
|
|
51
51
|
*
|
|
@@ -68,7 +68,7 @@ export declare const hybridtsToUnixtime: (hybridts: BigInt | string) => string;
|
|
|
68
68
|
* const res = unixtimeToHybridts("429642767925248000");
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
export declare const unixtimeToHybridts: (unixtime:
|
|
71
|
+
export declare const unixtimeToHybridts: (unixtime: bigint | string) => string;
|
|
72
72
|
/**
|
|
73
73
|
* Generate a hybrid timestamp based on datetime。
|
|
74
74
|
*
|
|
@@ -92,3 +92,4 @@ export declare const unixtimeToHybridts: (unixtime: BigInt | string) => string;
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
export declare const datetimeToHybrids: (datetime: Date) => string;
|
|
95
|
+
export declare const stringToBase64: (str: string) => string;
|
|
@@ -5,7 +5,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
5
5
|
return to;
|
|
6
6
|
};
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
8
|
+
exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
9
9
|
var index_1 = require("./index");
|
|
10
10
|
var ErrorReason_1 = require("../const/ErrorReason");
|
|
11
11
|
/**
|
|
@@ -156,4 +156,6 @@ var datetimeToHybrids = function (datetime) {
|
|
|
156
156
|
return exports.unixtimeToHybridts((datetime.getTime() / 1000).toString());
|
|
157
157
|
};
|
|
158
158
|
exports.datetimeToHybrids = datetimeToHybrids;
|
|
159
|
+
var stringToBase64 = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); };
|
|
160
|
+
exports.stringToBase64 = stringToBase64;
|
|
159
161
|
//# sourceMappingURL=Format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[],"mappings":";;;;;;;;AAAA,iCAAuC;AACvC,oDAAqD;AAGrD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAC,IAAoB,EAAE,IAAc;IACrE,IAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAC,CAAC;QACb,IAAM,KAAK,GAAG,oBAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACpC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEF;;;;GAIG;AACI,IAAM,eAAe,GAAG,UAAC,IAE/B;IACC,OAAO,IAAI;QACT,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../milvus/utils/Format.ts"],"names":[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AY,CAAC;IAC5D,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAC7B,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,IAAM,iBAAiB,GAAG,UAAC,QAAc;IAC9C,IAAI,CAAC,CAAC,QAAQ,YAAY,IAAI,CAAC,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,cAAY,2BAAa,CAAC,eAAiB,CAAC,CAAC;KAC9D;IACD,OAAO,0BAAkB,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC,CAAC;AALW,QAAA,iBAAiB,qBAK5B;AAEK,IAAM,cAAc,GAAG,UAAC,GAAW,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAA5C,CAA4C,CAAA;AAA9E,QAAA,cAAc,kBAAgE"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
-
|
|
3
2
|
package milvus.proto.common;
|
|
3
|
+
|
|
4
4
|
option go_package="github.com/milvus-io/milvus/internal/proto/commonpb";
|
|
5
5
|
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
option java_package = "io.milvus.grpc";
|
|
8
|
+
option java_outer_classname = "CommonProto";
|
|
9
|
+
option java_generate_equals_and_hash = true;
|
|
6
10
|
|
|
7
11
|
enum ErrorCode {
|
|
8
12
|
Success = 0;
|
|
@@ -31,6 +35,13 @@ enum ErrorCode {
|
|
|
31
35
|
OutOfMemory = 24;
|
|
32
36
|
IndexNotExist = 25;
|
|
33
37
|
EmptyCollection = 26;
|
|
38
|
+
UpdateImportTaskFailure = 27;
|
|
39
|
+
CollectionNameNotFound = 28;
|
|
40
|
+
CreateCredentialFailure = 29;
|
|
41
|
+
UpdateCredentialFailure = 30;
|
|
42
|
+
DeleteCredentialFailure = 31;
|
|
43
|
+
GetCredentialFailure = 32;
|
|
44
|
+
ListCredUsersFailure = 33;
|
|
34
45
|
|
|
35
46
|
// internal error code.
|
|
36
47
|
DDRequestRace = 1000;
|
|
@@ -52,6 +63,7 @@ enum SegmentState {
|
|
|
52
63
|
Flushed = 4;
|
|
53
64
|
Flushing = 5;
|
|
54
65
|
Dropped = 6;
|
|
66
|
+
Importing = 7;
|
|
55
67
|
}
|
|
56
68
|
|
|
57
69
|
message Status {
|
|
@@ -110,6 +122,7 @@ enum MsgType {
|
|
|
110
122
|
ReleaseSegments = 253;
|
|
111
123
|
HandoffSegments = 254;
|
|
112
124
|
LoadBalanceSegments = 255;
|
|
125
|
+
DescribeSegments = 256;
|
|
113
126
|
|
|
114
127
|
/* DEFINITION REQUESTS: INDEX */
|
|
115
128
|
CreateIndex = 300;
|
|
@@ -136,6 +149,8 @@ enum MsgType {
|
|
|
136
149
|
RemoveQueryChannels = 511;
|
|
137
150
|
SealedSegmentsChangeInfo = 512;
|
|
138
151
|
WatchDeltaChannels = 513;
|
|
152
|
+
GetShardLeaders = 514;
|
|
153
|
+
GetReplicas = 515;
|
|
139
154
|
|
|
140
155
|
/* DATA SERVICE */
|
|
141
156
|
SegmentInfo = 600;
|
|
@@ -154,6 +169,13 @@ enum MsgType {
|
|
|
154
169
|
SegmentFlushDone = 1207;
|
|
155
170
|
|
|
156
171
|
DataNodeTt = 1208;
|
|
172
|
+
|
|
173
|
+
/* Credential */
|
|
174
|
+
CreateCredential = 1500;
|
|
175
|
+
GetCredential = 1501;
|
|
176
|
+
DeleteCredential = 1502;
|
|
177
|
+
UpdateCredential = 1503;
|
|
178
|
+
ListCredUsernames = 1504;
|
|
157
179
|
}
|
|
158
180
|
|
|
159
181
|
message MsgBase {
|
|
@@ -192,3 +214,13 @@ enum ConsistencyLevel {
|
|
|
192
214
|
Eventually = 3;
|
|
193
215
|
Customized = 4; // Users pass their own `guarantee_timestamp`.
|
|
194
216
|
}
|
|
217
|
+
|
|
218
|
+
enum ImportState {
|
|
219
|
+
ImportPending = 0;
|
|
220
|
+
ImportFailed = 1;
|
|
221
|
+
ImportStarted = 2;
|
|
222
|
+
ImportDownloaded = 3;
|
|
223
|
+
ImportParsed = 4;
|
|
224
|
+
ImportPersisted = 5;
|
|
225
|
+
ImportCompleted = 6;
|
|
226
|
+
}
|
|
@@ -3,6 +3,11 @@ package milvus.proto.milvus;
|
|
|
3
3
|
|
|
4
4
|
option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb";
|
|
5
5
|
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
option java_package = "io.milvus.grpc";
|
|
8
|
+
option java_outer_classname = "MilvusProto";
|
|
9
|
+
option java_generate_equals_and_hash = true;
|
|
10
|
+
|
|
6
11
|
import "common.proto";
|
|
7
12
|
import "schema.proto";
|
|
8
13
|
|
|
@@ -44,6 +49,7 @@ service MilvusService {
|
|
|
44
49
|
rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
|
|
45
50
|
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
|
|
46
51
|
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
|
|
52
|
+
rpc GetReplicas(GetReplicasRequest) returns (GetReplicasResponse) {}
|
|
47
53
|
|
|
48
54
|
rpc Dummy(DummyRequest) returns (DummyResponse) {}
|
|
49
55
|
|
|
@@ -56,6 +62,17 @@ service MilvusService {
|
|
|
56
62
|
rpc GetCompactionState(GetCompactionStateRequest) returns (GetCompactionStateResponse) {}
|
|
57
63
|
rpc ManualCompaction(ManualCompactionRequest) returns (ManualCompactionResponse) {}
|
|
58
64
|
rpc GetCompactionStateWithPlans(GetCompactionPlansRequest) returns (GetCompactionPlansResponse) {}
|
|
65
|
+
|
|
66
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+24+--+Support+bulk+load
|
|
67
|
+
rpc Import(ImportRequest) returns (ImportResponse) {}
|
|
68
|
+
rpc GetImportState(GetImportStateRequest) returns (GetImportStateResponse) {}
|
|
69
|
+
rpc ListImportTasks(ListImportTasksRequest) returns (ListImportTasksResponse) {}
|
|
70
|
+
|
|
71
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
|
|
72
|
+
rpc CreateCredential(CreateCredentialRequest) returns (common.Status) {}
|
|
73
|
+
rpc UpdateCredential(UpdateCredentialRequest) returns (common.Status) {}
|
|
74
|
+
rpc DeleteCredential(DeleteCredentialRequest) returns (common.Status) {}
|
|
75
|
+
rpc ListCredUsers(ListCredUsersRequest) returns (ListCredUsersResponse) {}
|
|
59
76
|
}
|
|
60
77
|
|
|
61
78
|
message CreateAliasRequest {
|
|
@@ -176,6 +193,8 @@ message DescribeCollectionResponse {
|
|
|
176
193
|
repeated common.KeyDataPair start_positions = 10;
|
|
177
194
|
// The consistency level that the collection used, modification is not supported now.
|
|
178
195
|
common.ConsistencyLevel consistency_level = 11;
|
|
196
|
+
// The collection name
|
|
197
|
+
string collection_name = 12;
|
|
179
198
|
}
|
|
180
199
|
|
|
181
200
|
/**
|
|
@@ -188,6 +207,8 @@ message LoadCollectionRequest {
|
|
|
188
207
|
string db_name = 2;
|
|
189
208
|
// The collection name you want to load
|
|
190
209
|
string collection_name = 3;
|
|
210
|
+
// The replica number to load, default by 1
|
|
211
|
+
int32 replica_number = 4;
|
|
191
212
|
}
|
|
192
213
|
|
|
193
214
|
/**
|
|
@@ -323,6 +344,8 @@ message LoadPartitionsRequest {
|
|
|
323
344
|
string collection_name = 3;
|
|
324
345
|
// The partition names you want to load
|
|
325
346
|
repeated string partition_names = 4;
|
|
347
|
+
// The replicas number you would load, 1 by default
|
|
348
|
+
int32 replica_number = 5;
|
|
326
349
|
}
|
|
327
350
|
|
|
328
351
|
/*
|
|
@@ -434,7 +457,9 @@ message CreateIndexRequest {
|
|
|
434
457
|
// The vector field name in this particular collection
|
|
435
458
|
string field_name = 4;
|
|
436
459
|
// Support keys: index_type,metric_type, params. Different index_type may has different params.
|
|
437
|
-
repeated common.KeyValuePair extra_params = 5;
|
|
460
|
+
repeated common.KeyValuePair extra_params = 5;
|
|
461
|
+
// Version before 2.0.2 doesn't contain index_name, we use default index name.
|
|
462
|
+
string index_name = 6;
|
|
438
463
|
}
|
|
439
464
|
|
|
440
465
|
/*
|
|
@@ -594,6 +619,7 @@ message Hits {
|
|
|
594
619
|
message SearchResults {
|
|
595
620
|
common.Status status = 1;
|
|
596
621
|
schema.SearchResultData results = 2;
|
|
622
|
+
string collection_name = 3;
|
|
597
623
|
}
|
|
598
624
|
|
|
599
625
|
message FlushRequest {
|
|
@@ -622,6 +648,7 @@ message QueryRequest {
|
|
|
622
648
|
message QueryResults {
|
|
623
649
|
common.Status status = 1;
|
|
624
650
|
repeated schema.FieldData fields_data = 2;
|
|
651
|
+
string collection_name = 3;
|
|
625
652
|
}
|
|
626
653
|
|
|
627
654
|
message VectorIDs {
|
|
@@ -731,6 +758,7 @@ message LoadBalanceRequest {
|
|
|
731
758
|
int64 src_nodeID = 2;
|
|
732
759
|
repeated int64 dst_nodeIDs = 3;
|
|
733
760
|
repeated int64 sealed_segmentIDs = 4;
|
|
761
|
+
string collectionName = 5;
|
|
734
762
|
}
|
|
735
763
|
|
|
736
764
|
message ManualCompactionRequest {
|
|
@@ -779,6 +807,119 @@ message GetFlushStateResponse {
|
|
|
779
807
|
bool flushed = 2;
|
|
780
808
|
}
|
|
781
809
|
|
|
810
|
+
message ImportRequest {
|
|
811
|
+
string collection_name = 1; // target collection
|
|
812
|
+
string partition_name = 2; // target partition
|
|
813
|
+
repeated string channel_names = 3; // channel names for the collection
|
|
814
|
+
bool row_based = 4; // the file is row-based or column-based
|
|
815
|
+
repeated string files = 5; // file paths to be imported
|
|
816
|
+
repeated common.KeyValuePair options = 6; // import options, bucket, etc.
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
message ImportResponse {
|
|
820
|
+
common.Status status = 1;
|
|
821
|
+
repeated int64 tasks = 2; // id array of import tasks
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
message GetImportStateRequest {
|
|
825
|
+
int64 task = 1; // id of an import task
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
message GetImportStateResponse {
|
|
829
|
+
common.Status status = 1;
|
|
830
|
+
common.ImportState state = 2; // is this import task finished or not
|
|
831
|
+
int64 row_count = 3; // if the task is finished, this value is how many rows are imported. if the task is not finished, this value is how many rows are parsed. return 0 if failed.
|
|
832
|
+
repeated int64 id_list = 4; // auto generated ids if the primary key is autoid
|
|
833
|
+
repeated common.KeyValuePair infos = 5; // more informations about the task, progress percent, file path, failed reason, etc.
|
|
834
|
+
int64 id = 6; // id of an import task
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
message ListImportTasksRequest {
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
message ListImportTasksResponse {
|
|
841
|
+
common.Status status = 1;
|
|
842
|
+
repeated GetImportStateResponse tasks = 2; // list of all import tasks
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
message GetReplicasRequest {
|
|
846
|
+
common.MsgBase base = 1;
|
|
847
|
+
int64 collectionID = 2;
|
|
848
|
+
bool with_shard_nodes = 3;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
message GetReplicasResponse {
|
|
852
|
+
common.Status status = 1;
|
|
853
|
+
repeated ReplicaInfo replicas = 2;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
message ReplicaInfo { // ReplicaGroup
|
|
857
|
+
int64 replicaID = 1;
|
|
858
|
+
int64 collectionID = 2;
|
|
859
|
+
repeated int64 partition_ids = 3; // empty indicates to load collection
|
|
860
|
+
repeated ShardReplica shard_replicas = 4;
|
|
861
|
+
repeated int64 node_ids = 5; // include leaders
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
message ShardReplica {
|
|
865
|
+
int64 leaderID = 1;
|
|
866
|
+
string leader_addr = 2; // IP:port
|
|
867
|
+
string dm_channel_name = 3;
|
|
868
|
+
// optional, DO NOT save it in meta, set it only for GetReplicas()
|
|
869
|
+
// if with_shard_nodes is true
|
|
870
|
+
repeated int64 node_ids = 4;
|
|
871
|
+
}
|
|
872
|
+
|
|
782
873
|
service ProxyService {
|
|
783
874
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
|
784
875
|
}
|
|
876
|
+
|
|
877
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
|
|
878
|
+
|
|
879
|
+
message CreateCredentialRequest {
|
|
880
|
+
// Not useful for now
|
|
881
|
+
common.MsgBase base = 1;
|
|
882
|
+
// username
|
|
883
|
+
string username = 2;
|
|
884
|
+
// ciphertext password
|
|
885
|
+
string password = 3;
|
|
886
|
+
// create time
|
|
887
|
+
uint64 created_utc_timestamps = 4;
|
|
888
|
+
// modify time
|
|
889
|
+
uint64 modified_utc_timestamps = 5;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
message UpdateCredentialRequest {
|
|
893
|
+
// Not useful for now
|
|
894
|
+
common.MsgBase base = 1;
|
|
895
|
+
// username
|
|
896
|
+
string username = 2;
|
|
897
|
+
// old password
|
|
898
|
+
string oldPassword = 3;
|
|
899
|
+
// new password
|
|
900
|
+
string newPassword = 4;
|
|
901
|
+
// create time
|
|
902
|
+
uint64 created_utc_timestamps = 5;
|
|
903
|
+
// modify time
|
|
904
|
+
uint64 modified_utc_timestamps = 6;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
message DeleteCredentialRequest {
|
|
908
|
+
// Not useful for now
|
|
909
|
+
common.MsgBase base = 1;
|
|
910
|
+
// Not useful for now
|
|
911
|
+
string username = 2;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
message ListCredUsersResponse {
|
|
915
|
+
// Contain error_code and reason
|
|
916
|
+
common.Status status = 1;
|
|
917
|
+
// username array
|
|
918
|
+
repeated string usernames = 2;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
message ListCredUsersRequest {
|
|
922
|
+
// Not useful for now
|
|
923
|
+
common.MsgBase base = 1;
|
|
924
|
+
}
|
|
925
|
+
|