Skip to content

Commit 6ddc1f8

Browse files
committed
Update proto files
1 parent ade87e8 commit 6ddc1f8

File tree

87 files changed

+832
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+832
-209
lines changed

include/ydb-cpp-sdk/client/datastreams/datastreams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <ydb-cpp-sdk/client/table/table.h>
44

5-
#include <ydb/public/api/grpc/draft/ydb_datastreams_v1.grpc.pb.h>
5+
#include <src/api/grpc/draft/ydb_datastreams_v1.grpc.pb.h>
66

77
namespace NYdb::NDataStreams::V1 {
88

include/ydb-cpp-sdk/client/draft/ydb_scripting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include <ydb-cpp-sdk/client/table/table.h>
4-
#include <ydb/public/api/protos/ydb_query.pb.h>
4+
#include <src/api/protos/ydb_query.pb.h>
55

66
namespace NYdb {
77
namespace NScripting {

include/ydb-cpp-sdk/client/federated_topic/federated_topic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <ydb-cpp-sdk/client/topic/client.h>
44

5-
#include <ydb/public/api/protos/ydb_federation_discovery.pb.h>
5+
#include <src/api/protos/ydb_federation_discovery.pb.h>
66

77
#include <ydb-cpp-sdk/client/types/exceptions/exceptions.h>
88

include/ydb-cpp-sdk/client/proto/accessor.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#pragma once
22

3-
#include <ydb/public/api/protos/draft/ydb_replication.pb.h>
4-
#include <ydb/public/api/protos/ydb_coordination.pb.h>
5-
#include <ydb/public/api/protos/ydb_export.pb.h>
6-
#include <ydb/public/api/protos/ydb_import.pb.h>
7-
#include <ydb/public/api/protos/ydb_query_stats.pb.h>
8-
#include <ydb/public/api/protos/ydb_table.pb.h>
9-
#include <ydb/public/api/protos/ydb_topic.pb.h>
10-
#include <ydb/public/api/protos/ydb_value.pb.h>
3+
#include <src/api/protos/draft/ydb_replication.pb.h>
4+
#include <src/api/protos/ydb_coordination.pb.h>
5+
#include <src/api/protos/ydb_export.pb.h>
6+
#include <src/api/protos/ydb_import.pb.h>
7+
#include <src/api/protos/ydb_query_stats.pb.h>
8+
#include <src/api/protos/ydb_table.pb.h>
9+
#include <src/api/protos/ydb_topic.pb.h>
10+
#include <src/api/protos/ydb_value.pb.h>
1111

1212
#include <ydb-cpp-sdk/client/draft/ydb_replication.h>
1313
#include <ydb-cpp-sdk/client/coordination/coordination.h>

include/ydb-cpp-sdk/client/topic/control_plane.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <ydb-cpp-sdk/client/scheme/scheme.h>
66

7-
#include <ydb/public/api/protos/ydb_topic.pb.h>
7+
#include <src/api/protos/ydb_topic.pb.h>
88

99
#include <util/datetime/base.h>
1010

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
syntax = "proto3";
2+
option cc_enable_arenas = true;
3+
4+
package Ydb.Backup.V1;
5+
6+
option java_package = "com.yandex.ydb.backup.v1";
7+
8+
import "src/api/protos/draft/ydb_backup.proto";
9+
10+
service BackupService {
11+
// Fetches data from remote storage to cluster instance
12+
// After successful completion of this call BackupCollection objects are created inside cluster
13+
// And remote data can be accessed through them
14+
rpc FetchBackupCollections(FetchBackupCollectionsRequest) returns (FetchBackupCollectionsResponse) {}
15+
16+
// Shows BackupCollection's present in cluster (probably with some filters or accessible by current user)
17+
// Exact storage scheme of this collections will be defined later (probably at the beginning it will be some flat scheme by UUID with indices for filtering)
18+
rpc ListBackupCollections(ListBackupCollectionsRequest) returns (ListBackupCollectionsResponse) {}
19+
20+
// Creates backup collection with specified settings
21+
// In case of remote backup collection (e.g. stored in s3) also checks connection to s3 and all corresponding rights
22+
rpc CreateBackupCollection(CreateBackupCollectionRequest) returns (CreateBackupCollectionResponse) {}
23+
24+
// Returns specified BackupCollection data
25+
rpc ReadBackupCollection(ReadBackupCollectionRequest) returns (ReadBackupCollectionResponse) {}
26+
27+
// Somehow updates BackupCollection state. Maybe all subobjects will be modified through this call, maybe they will have separate calls
28+
rpc UpdateBackupCollection(UpdateBackupCollectionRequest) returns (UpdateBackupCollectionResponse) {}
29+
30+
// Deletes BackupCollection. In case of remote backup collection data WILL be preserved if other is not specified explicitly
31+
// In case of read-only BackupCollection's additionally to this explicit flag user should set force flag.
32+
rpc DeleteBackupCollection(DeleteBackupCollectionRequest) returns (DeleteBackupCollectionResponse) {}
33+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
syntax = "proto3";
2+
3+
package Ydb.ObjectStorage.V1;
4+
option java_package = "com.yandex.ydb.object_storage.v1";
5+
6+
import "src/api/protos/draft/ydb_object_storage.proto";
7+
8+
service ObjectStorageService {
9+
rpc List(ObjectStorage.ListingRequest) returns (ObjectStorage.ListingResponse);
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
syntax = "proto3";
2+
3+
package Ydb.Tablet.V1;
4+
option java_package = "com.yandex.ydb.tablet.v1";
5+
6+
import "src/api/protos/draft/ydb_tablet.proto";
7+
8+
// This service has low-level APIs that are not intended for normal operation,
9+
// sometimes allowing system administrators to repair broken databases or
10+
// perform reconfiguration that is not directly supported. These may break the
11+
// system completely however, so use with caution and make sure you really know
12+
// what you're doing.
13+
service TabletService {
14+
15+
// Execute a minikql script at the specified tablet.
16+
// This may be used to side-step intended tablet APIs and work with their
17+
// local database directly, e.g. to repair tablets in an unexpected state.
18+
// Note the modified tablet usually needs to be restarted to pick up any
19+
// changes, since its logical in-memory state is not updated and diverges
20+
// from the new persistent state.
21+
rpc ExecuteTabletMiniKQL(ExecuteTabletMiniKQLRequest) returns (ExecuteTabletMiniKQLResponse);
22+
23+
// Change schema of the specified tablet and get the resulting schema.
24+
// This may be used to side-step intended tablet APIs and repair tablets
25+
// in an unexpected state. Empty changes are useful to dump current tablet
26+
// schema.
27+
rpc ChangeTabletSchema(ChangeTabletSchemaRequest) returns (ChangeTabletSchemaResponse);
28+
29+
// Restart the specified tablet.
30+
// This may help when tablets (or their clients) are running in an
31+
// unexpected state, sometimes allowing them to get unstuck.
32+
rpc RestartTablet(RestartTabletRequest) returns (RestartTabletResponse);
33+
34+
}

src/api/grpc/draft/ydb_ymq_v1.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ package Ydb.Ymq.V1;
55

66
import "src/api/protos/draft/ymq.proto";
77

8+
89
option java_package = "com.yandex.ydb.ymq.v1";
910

11+
1012
service YmqService {
1113
rpc GetQueueUrl(GetQueueUrlRequest) returns (GetQueueUrlResponse);
1214
rpc CreateQueue(CreateQueueRequest) returns (CreateQueueResponse);

src/api/grpc/ydb_query_v1.proto

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ option java_package = "com.yandex.ydb.query.v1";
66
import "src/api/protos/ydb_operation.proto";
77
import "src/api/protos/ydb_query.proto";
88

9-
// ! WARNING: Experimental API
10-
// ! This API is currently in experimental state and is a subject for changes.
11-
// ! No backward and/or forward compatibility guarantees are provided.
12-
// ! DO NOT USE for production workloads.
13-
149
service QueryService {
1510
// Sessions are basic primitives for communicating with YDB Query Service. The are similar to
1611
// connections for classic relational DBs. Sessions serve three main purposes:

src/api/grpc/ydb_topic_v1.proto

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,19 @@ service TopicService {
9696
// Create DirectRead Session
9797
// Pipeline:
9898
// client server
99-
// StartDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...)
99+
// InitRequest(SessionID1, TopicReadSettings, Consumer)
100100
// ---------------->
101+
// InitResponse
102+
// <----------------
103+
// StartDirectReadPartitionSessionRequest(PartitionSessionID1, LastDirectReadID, TabletGeneration1)
104+
// ---------------->
105+
// StartDirectReadPartitionSessionResponse(PartitionSessionID1, TabletGeneration1)
106+
// <----------------
101107
// DirectReadResponse(PartitionSessionID1, DirectReadID1, Secret1, ...)
102108
// <----------------
103109
// DirectReadResponse(PartitionSessionID1, DirectReadID2, Secret1, ...)
104110
// <----------------
105-
// UpdateDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...)
106-
// ---------------->
107-
// StopDirectReadPartitionSession(SessionID1, PartitionSessionID1, TabletGeneration1, Secret1,...)
111+
// StopDirectReadPartitionSession(status, issues, PartitionSessionID1, TabletGeneration1)
108112
// <----------------
109113
rpc StreamDirectRead(stream StreamDirectReadMessage.FromClient) returns (stream StreamDirectReadMessage.FromServer);
110114

src/api/protos/annotations/ya.make

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
PROTO_LIBRARY()
2+
3+
SRCS(
4+
sensitive.proto
5+
validation.proto
6+
)
7+
8+
EXCLUDE_TAGS(GO_PROTO)
9+
10+
END()

src/api/protos/draft/datastreams.proto

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "src/api/protos/ydb_operation.proto";
55
import "src/api/protos/draft/field_transformation.proto";
66

77
import "google/protobuf/descriptor.proto";
8+
import "google/protobuf/duration.proto";
89

910
package Ydb.DataStreams.V1;
1011
option java_package = "com.yandex.ydb.datastreams.v1";
@@ -110,6 +111,8 @@ message StreamDescription {
110111

111112
// stream metering mode
112113
StreamModeDetails stream_mode_details = 14;
114+
115+
PartitioningSettings partitioning_settings = 15;
113116
}
114117

115118
// Represents range of possible sequence numbers for the shard
@@ -264,6 +267,55 @@ message StreamModeDetails {
264267
StreamMode stream_mode = 1;
265268
}
266269

270+
enum AutoPartitioningStrategy {
271+
// The auto partitioning algorithm is not specified. The default value will be used.
272+
AUTO_PARTITIONING_STRATEGY_UNSPECIFIED = 0;
273+
// The auto partitioning is disabled.
274+
AUTO_PARTITIONING_STRATEGY_DISABLED = 1;
275+
// The auto partitioning algorithm will increase partitions count depending on the load characteristics.
276+
// The auto partitioning algorithm will never decrease the number of partitions.
277+
AUTO_PARTITIONING_STRATEGY_SCALE_UP = 2;
278+
// The auto partitioning algorithm will both increase and decrease partitions count depending on the load characteristics.
279+
AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN = 3;
280+
// The auto partitioning is paused.
281+
AUTO_PARTITIONING_STRATEGY_PAUSED = 4;
282+
}
283+
284+
// Partitioning settings for stream.
285+
message PartitioningSettings {
286+
// Auto merge would stop working when the partitions count reaches min_active_partitions
287+
// Zero value means default - 1.
288+
int64 min_active_partitions = 1;
289+
// Auto split would stop working when the partitions count reaches max_active_partitions
290+
// Zero value means default - 1.
291+
int64 max_active_partitions = 3;
292+
// Settings for the partitions count auto partitioning.
293+
AutoPartitioningSettings auto_partitioning_settings = 4;
294+
}
295+
296+
message AutoPartitioningSettings {
297+
// Strategy of auto partitioning.
298+
AutoPartitioningStrategy strategy = 1;
299+
// Partition write speed auto partitioning options.
300+
AutoPartitioningWriteSpeedStrategy partition_write_speed = 2;
301+
}
302+
303+
message AutoPartitioningWriteSpeedStrategy {
304+
//Partition will be auto partitioned up (divided into 2 partitions)
305+
//after write speed to the partition exceeds up_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window
306+
307+
//Partition will become a candidate to the auto partitioned down
308+
//after write speed doesn’t reach down_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window
309+
//This candidate partition will be auto partitioned down when other neighbour partition will become a candidate to the auto partitioning down and not earlier than a retention period.
310+
311+
// Zero value means default - 300.
312+
google.protobuf.Duration stabilization_window = 1;
313+
// Zero value means default - 90.
314+
int32 up_utilization_percent = 2;
315+
// Zero value means default - 30.
316+
int32 down_utilization_percent = 3;
317+
}
318+
267319
message CreateStreamRequest {
268320
Ydb.Operations.OperationParams operation_params = 1;
269321
// Name of the stream
@@ -280,6 +332,8 @@ message CreateStreamRequest {
280332
}
281333
// stream metering mode
282334
StreamModeDetails stream_mode_details = 7;
335+
336+
PartitioningSettings partitioning_settings = 8;
283337
}
284338

285339
message CreateStreamResponse {
@@ -387,6 +441,7 @@ message UpdateStreamRequest {
387441
// stream metering mode
388442
StreamModeDetails stream_mode_details = 7;
389443

444+
PartitioningSettings partitioning_settings = 8;
390445
}
391446

392447
message UpdateStreamResponse {
@@ -622,7 +677,7 @@ message AddTagsToStreamRequest {
622677
// Name of the stream
623678
string stream_name = 2;
624679
// List of tags to add to stream
625-
repeated string tags = 3;
680+
map<string, string> tags = 3;
626681
}
627682

628683
message AddTagsToStreamResponse {
@@ -899,4 +954,3 @@ message UpdateStreamModeResponse {
899954

900955
message UpdateStreamModeResult {
901956
}
902-

src/api/protos/draft/fq.proto

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import "google/protobuf/empty.proto";
1919

2020
// === Query API ===
2121

22-
// Header: ydb-fq-project => yandexcloud://cloud_id/folder_id
22+
// Header: ydb-fq-project => yandexcloud://folder_id
2323

2424
message Acl {
2525
enum Visibility {
@@ -126,8 +126,10 @@ message QueryContent {
126126
// "executor" - type of executor for this query
127127
map<string, string> execution_settings = 10 [(Ydb.map_key).length.range = {min: 1, max: 100}, (Ydb.length).le = 4096];
128128
// Syntax of the text
129-
// By default it is "yql", but additional syntax "pg" (PostreSQL SQL frontend) is supported as well
129+
// By default it is "yql", but additional syntax "pg" (PostgreSQL SQL frontend) is supported as well
130130
QuerySyntax syntax = 11;
131+
// Map of query parameters
132+
map<string, Ydb.TypedValue> parameters = 12 [(Ydb.map_key).length.range = {min: 1, max: 100}];
131133
}
132134

133135
message CommonMeta {
@@ -372,6 +374,7 @@ message Job {
372374
bool automatic = 11;
373375
google.protobuf.Timestamp expire_at = 12;
374376
QueryContent.QuerySyntax syntax = 13;
377+
map<string, Ydb.TypedValue> parameters = 14;
375378
}
376379

377380
// Information about recent query runs
@@ -489,6 +492,23 @@ message PostgreSQLCluster {
489492
bool secure = 7;
490493
}
491494

495+
message GreenplumCluster {
496+
string database_id = 1 [(Ydb.length).le = 1024];
497+
string database_name = 2 [(Ydb.length).le = 1024];
498+
string login = 3 [(Ydb.length).le = 1024, (Ydb.sensitive) = true];
499+
string password = 4 [(Ydb.length).le = 1024, (Ydb.sensitive) = true];
500+
string schema = 5 [(Ydb.length).le = 1024];
501+
IamAuth auth = 6;
502+
}
503+
504+
message MySQLCluster {
505+
string database_id = 1 [(Ydb.length).le = 1024];
506+
string database_name = 2 [(Ydb.length).le = 1024];
507+
string login = 3 [(Ydb.length).le = 1024, (Ydb.sensitive) = true];
508+
string password = 4 [(Ydb.length).le = 1024, (Ydb.sensitive) = true];
509+
IamAuth auth = 5;
510+
}
511+
492512
message ConnectionSetting {
493513
enum ConnectionType {
494514
CONNECTION_TYPE_UNSPECIFIED = 0;
@@ -498,6 +518,8 @@ message ConnectionSetting {
498518
OBJECT_STORAGE = 4;
499519
MONITORING = 5;
500520
POSTGRESQL_CLUSTER = 6;
521+
GREENPLUM_CLUSTER = 7;
522+
MYSQL_CLUSTER = 8;
501523
}
502524

503525
oneof connection {
@@ -507,6 +529,8 @@ message ConnectionSetting {
507529
ObjectStorageConnection object_storage = 4;
508530
Monitoring monitoring = 5;
509531
PostgreSQLCluster postgresql_cluster = 6;
532+
GreenplumCluster greenplum_cluster = 7;
533+
MySQLCluster mysql_cluster = 8;
510534
}
511535
}
512536

src/api/protos/draft/persqueue_common.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ syntax = "proto3";
22
import "google/protobuf/descriptor.proto";
33
import "src/api/protos/draft/persqueue_error_codes.proto";
44

5+
import "src/api/protos/annotations/sensitive.proto";
6+
57
package NPersQueueCommon;
68

79
option java_package = "com.yandex.ydb.persqueue";
@@ -35,8 +37,7 @@ enum ECodec {
3537

3638
message Credentials {
3739
oneof credentials {
38-
bytes tvm_service_ticket = 1;
39-
bytes oauth_token = 2;
40+
bytes tvm_service_ticket = 1 [(Ydb.sensitive) = true];
41+
bytes oauth_token = 2 [(Ydb.sensitive) = true];
4042
}
4143
}
42-

src/api/protos/draft/persqueue_error_codes.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ enum EErrorCode {
1212
SOURCEID_DELETED = 24;
1313

1414
WRITE_ERROR_PARTITION_IS_FULL = 5;
15+
WRITE_ERROR_PARTITION_INACTIVE = 29;
1516
WRITE_ERROR_DISK_IS_FULL = 15;
1617
WRITE_ERROR_BAD_OFFSET = 19;
1718

0 commit comments

Comments
 (0)