2018-10-11 16:16:33 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package volume_server_pb;
|
2022-07-29 15:17:28 +08:00
|
|
|
option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb";
|
2018-10-11 16:16:33 +08:00
|
|
|
|
2021-08-27 06:18:34 +08:00
|
|
|
import "remote.proto";
|
|
|
|
|
2018-10-11 16:16:33 +08:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service VolumeServer {
|
|
|
|
//Experts only: takes multiple fid parameters. This function does not propagate deletes to replicas.
|
|
|
|
rpc BatchDelete (BatchDeleteRequest) returns (BatchDeleteResponse) {
|
|
|
|
}
|
2020-02-14 16:37:32 +08:00
|
|
|
|
2018-10-15 14:12:43 +08:00
|
|
|
rpc VacuumVolumeCheck (VacuumVolumeCheckRequest) returns (VacuumVolumeCheckResponse) {
|
|
|
|
}
|
2021-10-24 16:55:34 +08:00
|
|
|
rpc VacuumVolumeCompact (VacuumVolumeCompactRequest) returns (stream VacuumVolumeCompactResponse) {
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
rpc VacuumVolumeCommit (VacuumVolumeCommitRequest) returns (VacuumVolumeCommitResponse) {
|
|
|
|
}
|
|
|
|
rpc VacuumVolumeCleanup (VacuumVolumeCleanupRequest) returns (VacuumVolumeCleanupResponse) {
|
|
|
|
}
|
2018-10-15 15:40:46 +08:00
|
|
|
|
2018-10-15 15:03:55 +08:00
|
|
|
rpc DeleteCollection (DeleteCollectionRequest) returns (DeleteCollectionResponse) {
|
|
|
|
}
|
2019-04-11 12:41:17 +08:00
|
|
|
rpc AllocateVolume (AllocateVolumeRequest) returns (AllocateVolumeResponse) {
|
2018-10-15 15:40:46 +08:00
|
|
|
}
|
2018-10-16 12:44:41 +08:00
|
|
|
|
2018-10-15 16:19:15 +08:00
|
|
|
rpc VolumeSyncStatus (VolumeSyncStatusRequest) returns (VolumeSyncStatusResponse) {
|
|
|
|
}
|
2019-04-18 13:04:49 +08:00
|
|
|
rpc VolumeIncrementalCopy (VolumeIncrementalCopyRequest) returns (stream VolumeIncrementalCopyResponse) {
|
2019-03-26 00:16:12 +08:00
|
|
|
}
|
2018-10-15 16:48:15 +08:00
|
|
|
|
|
|
|
rpc VolumeMount (VolumeMountRequest) returns (VolumeMountResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeUnmount (VolumeUnmountRequest) returns (VolumeUnmountResponse) {
|
|
|
|
}
|
2018-12-29 16:03:30 +08:00
|
|
|
rpc VolumeDelete (VolumeDeleteRequest) returns (VolumeDeleteResponse) {
|
|
|
|
}
|
2019-06-27 14:02:22 +08:00
|
|
|
rpc VolumeMarkReadonly (VolumeMarkReadonlyRequest) returns (VolumeMarkReadonlyResponse) {
|
|
|
|
}
|
2020-08-19 23:42:56 +08:00
|
|
|
rpc VolumeMarkWritable (VolumeMarkWritableRequest) returns (VolumeMarkWritableResponse) {
|
|
|
|
}
|
2020-02-03 07:37:23 +08:00
|
|
|
rpc VolumeConfigure (VolumeConfigureRequest) returns (VolumeConfigureResponse) {
|
|
|
|
}
|
2020-08-19 23:42:56 +08:00
|
|
|
rpc VolumeStatus (VolumeStatusRequest) returns (VolumeStatusResponse) {
|
|
|
|
}
|
2018-10-15 16:48:15 +08:00
|
|
|
|
2019-04-18 13:04:49 +08:00
|
|
|
// copy the .idx .dat files, and mount this volume
|
2021-10-24 17:52:56 +08:00
|
|
|
rpc VolumeCopy (VolumeCopyRequest) returns (stream VolumeCopyResponse) {
|
2019-03-24 02:33:34 +08:00
|
|
|
}
|
|
|
|
rpc ReadVolumeFileStatus (ReadVolumeFileStatusRequest) returns (ReadVolumeFileStatusResponse) {
|
|
|
|
}
|
|
|
|
rpc CopyFile (CopyFileRequest) returns (stream CopyFileResponse) {
|
|
|
|
}
|
2018-10-16 13:25:28 +08:00
|
|
|
|
2021-03-22 15:03:16 +08:00
|
|
|
rpc ReadNeedleBlob (ReadNeedleBlobRequest) returns (ReadNeedleBlobResponse) {
|
|
|
|
}
|
2022-09-07 14:51:27 +08:00
|
|
|
rpc ReadNeedleMeta (ReadNeedleMetaRequest) returns (ReadNeedleMetaResponse) {
|
|
|
|
}
|
2021-03-22 15:03:16 +08:00
|
|
|
rpc WriteNeedleBlob (WriteNeedleBlobRequest) returns (WriteNeedleBlobResponse) {
|
|
|
|
}
|
2021-09-27 16:45:32 +08:00
|
|
|
rpc ReadAllNeedles (ReadAllNeedlesRequest) returns (stream ReadAllNeedlesResponse) {
|
|
|
|
}
|
2021-03-22 15:03:16 +08:00
|
|
|
|
2019-04-21 02:35:20 +08:00
|
|
|
rpc VolumeTailSender (VolumeTailSenderRequest) returns (stream VolumeTailSenderResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeTailReceiver (VolumeTailReceiverRequest) returns (VolumeTailReceiverResponse) {
|
2019-04-18 15:18:29 +08:00
|
|
|
}
|
|
|
|
|
2019-05-20 15:53:17 +08:00
|
|
|
// erasure coding
|
2019-05-26 05:02:06 +08:00
|
|
|
rpc VolumeEcShardsGenerate (VolumeEcShardsGenerateRequest) returns (VolumeEcShardsGenerateResponse) {
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
2019-06-03 17:26:31 +08:00
|
|
|
rpc VolumeEcShardsRebuild (VolumeEcShardsRebuildRequest) returns (VolumeEcShardsRebuildResponse) {
|
|
|
|
}
|
2019-05-26 05:02:06 +08:00
|
|
|
rpc VolumeEcShardsCopy (VolumeEcShardsCopyRequest) returns (VolumeEcShardsCopyResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeEcShardsDelete (VolumeEcShardsDeleteRequest) returns (VolumeEcShardsDeleteResponse) {
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
2019-05-26 14:23:19 +08:00
|
|
|
rpc VolumeEcShardsMount (VolumeEcShardsMountRequest) returns (VolumeEcShardsMountResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeEcShardsUnmount (VolumeEcShardsUnmountRequest) returns (VolumeEcShardsUnmountResponse) {
|
|
|
|
}
|
2019-05-28 02:59:03 +08:00
|
|
|
rpc VolumeEcShardRead (VolumeEcShardReadRequest) returns (stream VolumeEcShardReadResponse) {
|
|
|
|
}
|
2019-06-20 15:17:11 +08:00
|
|
|
rpc VolumeEcBlobDelete (VolumeEcBlobDeleteRequest) returns (VolumeEcBlobDeleteResponse) {
|
|
|
|
}
|
2019-12-24 04:48:20 +08:00
|
|
|
rpc VolumeEcShardsToVolume (VolumeEcShardsToVolumeRequest) returns (VolumeEcShardsToVolumeResponse) {
|
|
|
|
}
|
2019-05-20 15:53:17 +08:00
|
|
|
|
2019-11-27 19:09:42 +08:00
|
|
|
// tiered storage
|
2019-12-26 01:53:13 +08:00
|
|
|
rpc VolumeTierMoveDatToRemote (VolumeTierMoveDatToRemoteRequest) returns (stream VolumeTierMoveDatToRemoteResponse) {
|
|
|
|
}
|
|
|
|
rpc VolumeTierMoveDatFromRemote (VolumeTierMoveDatFromRemoteRequest) returns (stream VolumeTierMoveDatFromRemoteResponse) {
|
2019-11-27 19:09:42 +08:00
|
|
|
}
|
|
|
|
|
2020-02-22 13:45:03 +08:00
|
|
|
rpc VolumeServerStatus (VolumeServerStatusRequest) returns (VolumeServerStatusResponse) {
|
|
|
|
}
|
2020-09-14 12:25:51 +08:00
|
|
|
rpc VolumeServerLeave (VolumeServerLeaveRequest) returns (VolumeServerLeaveResponse) {
|
|
|
|
}
|
2020-02-22 13:45:03 +08:00
|
|
|
|
2021-08-08 05:18:53 +08:00
|
|
|
// remote storage
|
|
|
|
rpc FetchAndWriteNeedle (FetchAndWriteNeedleRequest) returns (FetchAndWriteNeedleResponse) {
|
|
|
|
}
|
|
|
|
|
2020-02-22 13:45:03 +08:00
|
|
|
// <experimental> query
|
2019-10-03 03:06:03 +08:00
|
|
|
rpc Query (QueryRequest) returns (stream QueriedStripe) {
|
|
|
|
}
|
|
|
|
|
2020-07-23 03:02:21 +08:00
|
|
|
rpc VolumeNeedleStatus (VolumeNeedleStatusRequest) returns (VolumeNeedleStatusResponse) {
|
|
|
|
}
|
2022-04-02 07:37:06 +08:00
|
|
|
|
|
|
|
rpc Ping (PingRequest) returns (PingResponse) {
|
|
|
|
}
|
|
|
|
|
2018-10-11 16:16:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
message BatchDeleteRequest {
|
|
|
|
repeated string file_ids = 1;
|
2020-03-30 16:19:33 +08:00
|
|
|
bool skip_cookie_check = 2;
|
2018-10-11 16:16:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message BatchDeleteResponse {
|
|
|
|
repeated DeleteResult results = 1;
|
|
|
|
}
|
|
|
|
message DeleteResult {
|
|
|
|
string file_id = 1;
|
|
|
|
int32 status = 2;
|
|
|
|
string error = 3;
|
|
|
|
uint32 size = 4;
|
2019-06-20 15:17:11 +08:00
|
|
|
uint32 version = 5;
|
2018-10-11 16:16:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message Empty {
|
|
|
|
}
|
2018-10-15 14:12:43 +08:00
|
|
|
|
|
|
|
message VacuumVolumeCheckRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
message VacuumVolumeCheckResponse {
|
|
|
|
double garbage_ratio = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCompactRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 14:12:43 +08:00
|
|
|
int64 preallocate = 2;
|
|
|
|
}
|
|
|
|
message VacuumVolumeCompactResponse {
|
2021-10-24 16:55:34 +08:00
|
|
|
int64 processed_bytes = 1;
|
2022-08-02 00:32:21 +08:00
|
|
|
float load_avg_1m = 2;
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCommitRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
message VacuumVolumeCommitResponse {
|
2020-03-18 00:43:57 +08:00
|
|
|
bool is_read_only = 1;
|
2023-06-06 01:17:21 +08:00
|
|
|
uint64 volume_size = 2;
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message VacuumVolumeCleanupRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 14:12:43 +08:00
|
|
|
}
|
|
|
|
message VacuumVolumeCleanupResponse {
|
|
|
|
}
|
2018-10-15 15:03:55 +08:00
|
|
|
|
|
|
|
message DeleteCollectionRequest {
|
|
|
|
string collection = 1;
|
|
|
|
}
|
|
|
|
message DeleteCollectionResponse {
|
|
|
|
}
|
2018-10-15 15:40:46 +08:00
|
|
|
|
2019-04-11 12:41:17 +08:00
|
|
|
message AllocateVolumeRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 15:40:46 +08:00
|
|
|
string collection = 2;
|
|
|
|
int64 preallocate = 3;
|
|
|
|
string replication = 4;
|
|
|
|
string ttl = 5;
|
2019-10-22 13:57:01 +08:00
|
|
|
uint32 memory_map_max_size_mb = 6;
|
2020-12-14 15:08:21 +08:00
|
|
|
string disk_type = 7;
|
2018-10-15 15:40:46 +08:00
|
|
|
}
|
2019-04-11 12:41:17 +08:00
|
|
|
message AllocateVolumeResponse {
|
2018-10-15 15:40:46 +08:00
|
|
|
}
|
2018-10-15 16:19:15 +08:00
|
|
|
|
|
|
|
message VolumeSyncStatusRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 16:19:15 +08:00
|
|
|
}
|
|
|
|
message VolumeSyncStatusResponse {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-12-23 03:10:08 +08:00
|
|
|
string collection = 2;
|
2018-10-15 16:19:15 +08:00
|
|
|
string replication = 4;
|
|
|
|
string ttl = 5;
|
|
|
|
uint64 tail_offset = 6;
|
|
|
|
uint32 compact_revision = 7;
|
|
|
|
uint64 idx_file_size = 8;
|
|
|
|
}
|
2018-10-15 16:48:15 +08:00
|
|
|
|
2019-04-18 13:04:49 +08:00
|
|
|
message VolumeIncrementalCopyRequest {
|
2019-03-26 00:16:12 +08:00
|
|
|
uint32 volume_id = 1;
|
2019-04-18 15:18:29 +08:00
|
|
|
uint64 since_ns = 2;
|
2019-03-26 00:16:12 +08:00
|
|
|
}
|
2019-04-18 13:04:49 +08:00
|
|
|
message VolumeIncrementalCopyResponse {
|
2019-03-26 00:16:12 +08:00
|
|
|
bytes file_content = 1;
|
|
|
|
}
|
|
|
|
|
2018-10-15 16:48:15 +08:00
|
|
|
message VolumeMountRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 16:48:15 +08:00
|
|
|
}
|
|
|
|
message VolumeMountResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeUnmountRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2018-10-15 16:48:15 +08:00
|
|
|
}
|
|
|
|
message VolumeUnmountResponse {
|
|
|
|
}
|
2018-10-16 13:25:28 +08:00
|
|
|
|
2018-12-29 16:03:30 +08:00
|
|
|
message VolumeDeleteRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
2023-06-13 01:42:44 +08:00
|
|
|
bool only_empty = 2;
|
2018-12-29 16:03:30 +08:00
|
|
|
}
|
|
|
|
message VolumeDeleteResponse {
|
|
|
|
}
|
|
|
|
|
2019-06-27 14:02:22 +08:00
|
|
|
message VolumeMarkReadonlyRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeMarkReadonlyResponse {
|
|
|
|
}
|
|
|
|
|
2020-08-19 23:42:56 +08:00
|
|
|
message VolumeMarkWritableRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeMarkWritableResponse {
|
|
|
|
}
|
|
|
|
|
2020-02-03 07:37:23 +08:00
|
|
|
message VolumeConfigureRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string replication = 2;
|
|
|
|
}
|
|
|
|
message VolumeConfigureResponse {
|
|
|
|
string error = 1;
|
|
|
|
}
|
|
|
|
|
2020-08-19 23:42:56 +08:00
|
|
|
message VolumeStatusRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
}
|
|
|
|
message VolumeStatusResponse {
|
|
|
|
bool is_read_only = 1;
|
2023-06-06 01:17:21 +08:00
|
|
|
uint64 volume_size = 2;
|
2020-08-19 23:42:56 +08:00
|
|
|
}
|
|
|
|
|
2019-04-18 13:04:49 +08:00
|
|
|
message VolumeCopyRequest {
|
2019-03-24 02:33:34 +08:00
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
string replication = 3;
|
|
|
|
string ttl = 4;
|
|
|
|
string source_data_node = 5;
|
2021-02-10 15:58:08 +08:00
|
|
|
string disk_type = 6;
|
2022-08-22 14:08:31 +08:00
|
|
|
int64 io_byte_per_second = 7;
|
2019-03-24 02:33:34 +08:00
|
|
|
}
|
2019-04-18 13:04:49 +08:00
|
|
|
message VolumeCopyResponse {
|
2019-04-19 15:39:34 +08:00
|
|
|
uint64 last_append_at_ns = 1;
|
2021-10-24 17:52:56 +08:00
|
|
|
int64 processed_bytes = 2;
|
2019-03-24 02:33:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message CopyFileRequest {
|
|
|
|
uint32 volume_id = 1;
|
2019-05-20 12:37:49 +08:00
|
|
|
string ext = 2;
|
|
|
|
uint32 compaction_revision = 3;
|
|
|
|
uint64 stop_offset = 4;
|
2019-06-03 17:26:31 +08:00
|
|
|
string collection = 5;
|
|
|
|
bool is_ec_volume = 6;
|
2019-12-24 04:48:20 +08:00
|
|
|
bool ignore_source_file_not_found = 7;
|
2019-03-24 02:33:34 +08:00
|
|
|
}
|
|
|
|
message CopyFileResponse {
|
|
|
|
bytes file_content = 1;
|
2021-09-01 17:42:57 +08:00
|
|
|
int64 modified_ts_ns = 2;
|
2019-03-24 02:33:34 +08:00
|
|
|
}
|
|
|
|
|
2021-03-22 15:03:16 +08:00
|
|
|
message ReadNeedleBlobRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
int64 offset = 3; // actual offset
|
|
|
|
int32 size = 4;
|
|
|
|
}
|
|
|
|
message ReadNeedleBlobResponse {
|
|
|
|
bytes needle_blob = 1;
|
|
|
|
}
|
|
|
|
|
2022-09-07 14:51:27 +08:00
|
|
|
message ReadNeedleMetaRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 needle_id = 2;
|
|
|
|
int64 offset = 3; // actual offset
|
|
|
|
int32 size = 4;
|
|
|
|
}
|
|
|
|
message ReadNeedleMetaResponse {
|
|
|
|
uint32 cookie = 1;
|
|
|
|
uint64 last_modified = 2;
|
|
|
|
uint32 crc = 3;
|
|
|
|
string ttl = 4;
|
2022-10-25 13:09:38 +08:00
|
|
|
uint64 append_at_ns = 5;
|
2022-09-07 14:51:27 +08:00
|
|
|
}
|
|
|
|
|
2021-03-22 15:03:16 +08:00
|
|
|
message WriteNeedleBlobRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 needle_id = 2;
|
|
|
|
int32 size = 3;
|
|
|
|
bytes needle_blob = 4;
|
|
|
|
}
|
|
|
|
message WriteNeedleBlobResponse {
|
|
|
|
}
|
|
|
|
|
2021-09-27 16:45:32 +08:00
|
|
|
message ReadAllNeedlesRequest {
|
2021-09-27 17:51:31 +08:00
|
|
|
repeated uint32 volume_ids = 1;
|
2021-09-27 16:45:32 +08:00
|
|
|
}
|
|
|
|
message ReadAllNeedlesResponse {
|
2021-09-27 17:51:31 +08:00
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 needle_id = 2;
|
|
|
|
uint32 cookie = 3;
|
|
|
|
bytes needle_blob = 5;
|
2022-11-21 12:19:41 +08:00
|
|
|
bool needle_blob_compressed = 6;
|
|
|
|
uint64 last_modified = 7;
|
|
|
|
uint32 crc = 8;
|
2022-11-24 07:59:38 +08:00
|
|
|
bytes name = 9;
|
|
|
|
bytes mime = 10;
|
2021-09-27 16:45:32 +08:00
|
|
|
}
|
|
|
|
|
2019-04-21 02:35:20 +08:00
|
|
|
message VolumeTailSenderRequest {
|
2019-04-18 15:18:29 +08:00
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 since_ns = 2;
|
2019-04-21 03:05:28 +08:00
|
|
|
uint32 idle_timeout_seconds = 3;
|
2019-04-18 15:18:29 +08:00
|
|
|
}
|
2019-04-21 02:35:20 +08:00
|
|
|
message VolumeTailSenderResponse {
|
2019-04-18 15:18:29 +08:00
|
|
|
bytes needle_header = 1;
|
|
|
|
bytes needle_body = 2;
|
2019-04-19 10:22:13 +08:00
|
|
|
bool is_last_chunk = 3;
|
2019-04-18 15:18:29 +08:00
|
|
|
}
|
|
|
|
|
2019-04-21 02:35:20 +08:00
|
|
|
message VolumeTailReceiverRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 since_ns = 2;
|
2019-04-21 03:05:28 +08:00
|
|
|
uint32 idle_timeout_seconds = 3;
|
2019-04-21 02:35:20 +08:00
|
|
|
string source_volume_server = 4;
|
|
|
|
}
|
|
|
|
message VolumeTailReceiverResponse {
|
|
|
|
}
|
|
|
|
|
2019-05-26 05:02:06 +08:00
|
|
|
message VolumeEcShardsGenerateRequest {
|
2019-05-20 15:53:17 +08:00
|
|
|
uint32 volume_id = 1;
|
2019-05-26 05:02:06 +08:00
|
|
|
string collection = 2;
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
2019-05-26 05:02:06 +08:00
|
|
|
message VolumeEcShardsGenerateResponse {
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
|
|
|
|
2019-06-03 17:26:31 +08:00
|
|
|
message VolumeEcShardsRebuildRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
}
|
|
|
|
message VolumeEcShardsRebuildResponse {
|
|
|
|
repeated uint32 rebuilt_shard_ids = 1;
|
|
|
|
}
|
|
|
|
|
2019-05-26 05:02:06 +08:00
|
|
|
message VolumeEcShardsCopyRequest {
|
2019-05-20 15:53:17 +08:00
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
2019-05-28 02:59:03 +08:00
|
|
|
repeated uint32 shard_ids = 3;
|
2019-06-03 17:26:31 +08:00
|
|
|
bool copy_ecx_file = 4;
|
2019-05-20 15:53:17 +08:00
|
|
|
string source_data_node = 5;
|
2019-12-24 04:48:20 +08:00
|
|
|
bool copy_ecj_file = 6;
|
2019-12-29 04:44:59 +08:00
|
|
|
bool copy_vif_file = 7;
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
2019-05-26 05:02:06 +08:00
|
|
|
message VolumeEcShardsCopyResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeEcShardsDeleteRequest {
|
|
|
|
uint32 volume_id = 1;
|
2019-06-03 17:26:31 +08:00
|
|
|
string collection = 2;
|
2019-05-28 02:59:03 +08:00
|
|
|
repeated uint32 shard_ids = 3;
|
2019-05-26 05:02:06 +08:00
|
|
|
}
|
|
|
|
message VolumeEcShardsDeleteResponse {
|
2019-05-20 15:53:17 +08:00
|
|
|
}
|
|
|
|
|
2019-05-26 14:23:19 +08:00
|
|
|
message VolumeEcShardsMountRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
2019-05-28 02:59:03 +08:00
|
|
|
repeated uint32 shard_ids = 3;
|
2019-05-26 14:23:19 +08:00
|
|
|
}
|
|
|
|
message VolumeEcShardsMountResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeEcShardsUnmountRequest {
|
|
|
|
uint32 volume_id = 1;
|
2019-05-28 02:59:03 +08:00
|
|
|
repeated uint32 shard_ids = 3;
|
2019-05-26 14:23:19 +08:00
|
|
|
}
|
|
|
|
message VolumeEcShardsUnmountResponse {
|
|
|
|
}
|
|
|
|
|
2019-05-28 02:59:03 +08:00
|
|
|
message VolumeEcShardReadRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint32 shard_id = 2;
|
|
|
|
int64 offset = 3;
|
|
|
|
int64 size = 4;
|
2019-06-21 16:14:10 +08:00
|
|
|
uint64 file_key = 5;
|
2019-05-28 02:59:03 +08:00
|
|
|
}
|
|
|
|
message VolumeEcShardReadResponse {
|
|
|
|
bytes data = 1;
|
2019-06-21 16:14:10 +08:00
|
|
|
bool is_deleted = 2;
|
2019-05-28 02:59:03 +08:00
|
|
|
}
|
|
|
|
|
2019-06-20 15:17:11 +08:00
|
|
|
message VolumeEcBlobDeleteRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
uint64 file_key = 3;
|
|
|
|
uint32 version = 4;
|
|
|
|
}
|
|
|
|
message VolumeEcBlobDeleteResponse {
|
|
|
|
}
|
|
|
|
|
2019-12-24 04:48:20 +08:00
|
|
|
message VolumeEcShardsToVolumeRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
}
|
|
|
|
message VolumeEcShardsToVolumeResponse {
|
|
|
|
}
|
|
|
|
|
2019-03-24 02:33:34 +08:00
|
|
|
message ReadVolumeFileStatusRequest {
|
|
|
|
uint32 volume_id = 1;
|
2018-10-16 13:25:28 +08:00
|
|
|
}
|
2019-03-24 02:33:34 +08:00
|
|
|
message ReadVolumeFileStatusResponse {
|
|
|
|
uint32 volume_id = 1;
|
2019-04-19 15:39:34 +08:00
|
|
|
uint64 idx_file_timestamp_seconds = 2;
|
2019-03-24 02:33:34 +08:00
|
|
|
uint64 idx_file_size = 3;
|
2019-04-19 15:39:34 +08:00
|
|
|
uint64 dat_file_timestamp_seconds = 4;
|
2019-03-24 02:33:34 +08:00
|
|
|
uint64 dat_file_size = 5;
|
2019-04-10 19:41:55 +08:00
|
|
|
uint64 file_count = 6;
|
2019-04-20 03:29:49 +08:00
|
|
|
uint32 compaction_revision = 7;
|
2019-04-21 02:35:20 +08:00
|
|
|
string collection = 8;
|
2020-12-14 15:08:21 +08:00
|
|
|
string disk_type = 9;
|
2022-10-17 08:52:22 +08:00
|
|
|
VolumeInfo volume_info = 10;
|
2018-10-16 13:25:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DiskStatus {
|
|
|
|
string dir = 1;
|
|
|
|
uint64 all = 2;
|
|
|
|
uint64 used = 3;
|
|
|
|
uint64 free = 4;
|
2020-02-24 10:04:22 +08:00
|
|
|
float percent_free = 5;
|
|
|
|
float percent_used = 6;
|
2020-12-14 16:51:57 +08:00
|
|
|
string disk_type = 7;
|
2018-10-16 13:25:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message MemStatus {
|
|
|
|
int32 goroutines = 1;
|
|
|
|
uint64 all = 2;
|
|
|
|
uint64 used = 3;
|
|
|
|
uint64 free = 4;
|
|
|
|
uint64 self = 5;
|
|
|
|
uint64 heap = 6;
|
|
|
|
uint64 stack = 7;
|
|
|
|
}
|
2019-10-03 03:06:03 +08:00
|
|
|
|
2019-11-27 19:09:42 +08:00
|
|
|
// tired storage on volume servers
|
2019-12-03 07:08:28 +08:00
|
|
|
message RemoteFile {
|
2019-11-27 19:09:42 +08:00
|
|
|
string backend_type = 1;
|
2019-12-03 07:08:28 +08:00
|
|
|
string backend_id = 2;
|
|
|
|
string key = 3;
|
|
|
|
uint64 offset = 4;
|
|
|
|
uint64 file_size = 5;
|
|
|
|
uint64 modified_time = 6;
|
2019-12-29 03:16:10 +08:00
|
|
|
string extension = 7;
|
2019-12-03 07:08:28 +08:00
|
|
|
}
|
2019-12-29 03:21:49 +08:00
|
|
|
message VolumeInfo {
|
2019-12-03 07:08:28 +08:00
|
|
|
repeated RemoteFile files = 1;
|
2019-12-29 04:28:58 +08:00
|
|
|
uint32 version = 2;
|
2020-02-03 07:37:23 +08:00
|
|
|
string replication = 3;
|
2022-10-14 15:18:09 +08:00
|
|
|
uint32 BytesOffset = 4;
|
2019-11-27 19:09:42 +08:00
|
|
|
}
|
|
|
|
|
2021-08-08 05:18:53 +08:00
|
|
|
// tiered storage
|
2019-12-26 01:53:13 +08:00
|
|
|
message VolumeTierMoveDatToRemoteRequest {
|
2019-11-27 19:09:42 +08:00
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
2019-11-29 17:05:09 +08:00
|
|
|
string destination_backend_name = 3;
|
2019-12-03 07:08:28 +08:00
|
|
|
bool keep_local_dat_file = 4;
|
2019-11-27 19:09:42 +08:00
|
|
|
}
|
2019-12-26 01:53:13 +08:00
|
|
|
message VolumeTierMoveDatToRemoteResponse {
|
|
|
|
int64 processed = 1;
|
|
|
|
float processedPercentage = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VolumeTierMoveDatFromRemoteRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
string collection = 2;
|
|
|
|
bool keep_remote_dat_file = 3;
|
|
|
|
}
|
|
|
|
message VolumeTierMoveDatFromRemoteResponse {
|
2019-12-03 07:08:28 +08:00
|
|
|
int64 processed = 1;
|
|
|
|
float processedPercentage = 2;
|
2019-11-27 19:09:42 +08:00
|
|
|
}
|
|
|
|
|
2020-02-22 13:45:03 +08:00
|
|
|
message VolumeServerStatusRequest {
|
|
|
|
|
|
|
|
}
|
|
|
|
message VolumeServerStatusResponse {
|
|
|
|
repeated DiskStatus disk_statuses = 1;
|
|
|
|
MemStatus memory_status = 2;
|
2022-06-13 02:56:23 +08:00
|
|
|
string version = 3;
|
|
|
|
string data_center = 4;
|
|
|
|
string rack = 5;
|
2020-02-22 13:45:03 +08:00
|
|
|
}
|
|
|
|
|
2020-09-14 12:25:51 +08:00
|
|
|
message VolumeServerLeaveRequest {
|
|
|
|
}
|
|
|
|
message VolumeServerLeaveResponse {
|
|
|
|
}
|
|
|
|
|
2021-08-08 05:18:53 +08:00
|
|
|
// remote storage
|
|
|
|
message FetchAndWriteNeedleRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 needle_id = 2;
|
2021-08-10 05:35:18 +08:00
|
|
|
uint32 cookie = 3;
|
|
|
|
int64 offset = 4;
|
|
|
|
int64 size = 5;
|
2021-09-07 09:30:44 +08:00
|
|
|
message Replica {
|
|
|
|
string url = 1;
|
|
|
|
string public_url = 2;
|
2021-09-13 13:47:52 +08:00
|
|
|
int32 grpc_port = 3;
|
2021-09-07 09:30:44 +08:00
|
|
|
}
|
|
|
|
repeated Replica replicas = 6;
|
|
|
|
string auth = 7;
|
2021-08-08 05:18:53 +08:00
|
|
|
// remote conf
|
2021-08-27 06:18:34 +08:00
|
|
|
remote_pb.RemoteConf remote_conf = 15;
|
|
|
|
remote_pb.RemoteStorageLocation remote_location = 16;
|
2021-08-08 05:18:53 +08:00
|
|
|
}
|
|
|
|
message FetchAndWriteNeedleResponse {
|
2022-12-11 13:49:07 +08:00
|
|
|
string e_tag = 1;
|
2021-08-08 05:18:53 +08:00
|
|
|
}
|
|
|
|
|
2019-11-27 19:09:42 +08:00
|
|
|
// select on volume servers
|
2019-10-03 03:06:03 +08:00
|
|
|
message QueryRequest {
|
2019-10-07 13:35:05 +08:00
|
|
|
repeated string selections = 1;
|
2019-10-03 03:06:03 +08:00
|
|
|
repeated string from_file_ids = 2;
|
2019-10-07 13:35:05 +08:00
|
|
|
message Filter {
|
|
|
|
string field = 1;
|
|
|
|
string operand = 2;
|
|
|
|
string value = 3;
|
|
|
|
}
|
|
|
|
Filter filter = 3;
|
2019-10-03 03:06:03 +08:00
|
|
|
|
|
|
|
message InputSerialization {
|
|
|
|
// NONE | GZIP | BZIP2
|
|
|
|
string compression_type = 1;
|
|
|
|
message CSVInput {
|
2019-11-29 17:05:09 +08:00
|
|
|
string file_header_info = 1; // Valid values: NONE | USE | IGNORE
|
|
|
|
string record_delimiter = 2; // Default: \n
|
|
|
|
string field_delimiter = 3; // Default: ,
|
2022-09-15 04:09:53 +08:00
|
|
|
string quote_character = 4; // Default: "
|
2019-10-03 03:06:03 +08:00
|
|
|
string quote_escape_character = 5; // Default: "
|
2019-11-29 17:05:09 +08:00
|
|
|
string comments = 6; // Default: #
|
2019-10-03 03:06:03 +08:00
|
|
|
// If true, records might contain record delimiters within quote characters
|
2019-11-29 17:05:09 +08:00
|
|
|
bool allow_quoted_record_delimiter = 7; // default False.
|
2019-10-03 03:06:03 +08:00
|
|
|
}
|
|
|
|
message JSONInput {
|
2019-11-29 17:05:09 +08:00
|
|
|
string type = 1; // Valid values: DOCUMENT | LINES
|
2019-10-03 03:06:03 +08:00
|
|
|
}
|
|
|
|
message ParquetInput {
|
|
|
|
}
|
|
|
|
|
|
|
|
CSVInput csv_input = 2;
|
|
|
|
JSONInput json_input = 3;
|
|
|
|
ParquetInput parquet_input = 4;
|
|
|
|
}
|
|
|
|
InputSerialization input_serialization = 4;
|
|
|
|
|
|
|
|
message OutputSerialization {
|
|
|
|
message CSVOutput {
|
2019-11-29 17:05:09 +08:00
|
|
|
string quote_fields = 1; // Valid values: ALWAYS | ASNEEDED
|
|
|
|
string record_delimiter = 2; // Default: \n
|
|
|
|
string field_delimiter = 3; // Default: ,
|
2022-09-15 04:09:53 +08:00
|
|
|
string quote_character = 4; // Default: "
|
2019-10-03 03:06:03 +08:00
|
|
|
string quote_escape_character = 5; // Default: "
|
|
|
|
}
|
|
|
|
message JSONOutput {
|
|
|
|
string record_delimiter = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
CSVOutput csv_output = 2;
|
|
|
|
JSONOutput json_output = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
OutputSerialization output_serialization = 5;
|
|
|
|
}
|
|
|
|
message QueriedStripe {
|
2019-10-07 13:35:05 +08:00
|
|
|
bytes records = 1;
|
2019-10-03 03:06:03 +08:00
|
|
|
}
|
2020-07-23 03:02:21 +08:00
|
|
|
|
|
|
|
message VolumeNeedleStatusRequest {
|
|
|
|
uint32 volume_id = 1;
|
|
|
|
uint64 needle_id = 2;
|
|
|
|
}
|
|
|
|
message VolumeNeedleStatusResponse {
|
|
|
|
uint64 needle_id = 1;
|
|
|
|
uint32 cookie = 2;
|
|
|
|
uint32 size = 3;
|
|
|
|
uint64 last_modified = 4;
|
|
|
|
uint32 crc = 5;
|
|
|
|
string ttl = 6;
|
|
|
|
}
|
2022-04-02 07:37:06 +08:00
|
|
|
|
|
|
|
message PingRequest {
|
|
|
|
string target = 1; // default to ping itself
|
|
|
|
string target_type = 2;
|
|
|
|
}
|
|
|
|
message PingResponse {
|
2022-04-17 03:45:49 +08:00
|
|
|
int64 start_time_ns = 1;
|
|
|
|
int64 remote_time_ns = 2;
|
|
|
|
int64 stop_time_ns = 3;
|
2022-04-02 07:37:06 +08:00
|
|
|
}
|