Skip to content

Moved changes from ydb repo #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/ydb-cpp-sdk/client/types/status/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class TStatus {

void Out(IOutputStream& out) const;
friend IOutputStream& operator<<(IOutputStream& out, const TStatus& st);
friend std::ostream& operator<<(std::ostream& out, const TStatus& st);

protected:
void CheckStatusOk(const std::string& str) const;
Expand Down
19 changes: 19 additions & 0 deletions src/api/grpc/ydb_bsconfig_v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

package Ydb.BSConfig.V1;

option java_package = "com.yandex.ydb.bsconfig.v1";
option java_outer_classname = "BSConfigGrpc";
option java_multiple_files = true;

import "src/api/protos/ydb_bsconfig.proto";

service BSConfigService {

// Initialize Blobstorage host configs and box
rpc ReplaceStorageConfig(BSConfig.ReplaceStorageConfigRequest) returns (BSConfig.ReplaceStorageConfigResponse);

// Fetch Blobstorage host configs and box
rpc FetchStorageConfig(BSConfig.FetchStorageConfigRequest) returns (BSConfig.FetchStorageConfigResponse);

}
38 changes: 38 additions & 0 deletions src/api/protos/ydb_bsconfig.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
syntax = "proto3";
option cc_enable_arenas = true;

package Ydb.BSConfig;

option java_package = "com.yandex.ydb.bsconfig.proto";
option java_outer_classname = "BSConfigProtos";
option java_multiple_files = true;

import "src/api/protos/ydb_operation.proto";

//
// BSConfig API.
//

message ReplaceStorageConfigRequest {
Ydb.Operations.OperationParams operation_params = 1;
string yaml_config = 2;
}

message ReplaceStorageConfigResponse {
Ydb.Operations.Operation operation = 1;
}

message ReplaceStorageConfigResult {
}

message FetchStorageConfigRequest {
Ydb.Operations.OperationParams operation_params = 1;
}

message FetchStorageConfigResponse {
Ydb.Operations.Operation operation = 1;
}

message FetchStorageConfigResult {
string yaml_config = 1;
}
4 changes: 2 additions & 2 deletions src/api/protos/ydb_issue_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ option cc_enable_arenas = true;
package Ydb.Issue;
option java_package = "com.yandex.ydb";

// IssueMessage is a transport format for ydb/library/yql/public/issue library
// IssueMessage is a transport format for yql/essentials/public/issue library
message IssueMessage {
message Position {
uint32 row = 1;
Expand All @@ -16,7 +16,7 @@ message IssueMessage {
string message = 2;
Position end_position = 3;
uint32 issue_code = 4;
// Severity values from ydb/library/yql/public/issue/protos/issue_severity.proto
// Severity values from yql/essentials/public/issue/protos/issue_severity.proto
// FATAL = 0;
// ERROR = 1;
// WARNING = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/ut_utils/sdk_test_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class SDKTestSetup {

void SetNetDataViaFile(const TString& netDataTsv) {
NetDataFile = MakeHolder<TTempFileHandle>();
NetDataFile->Write(netDataTsv.Data(), netDataTsv.Size());
NetDataFile->Write(netDataTsv.data(), netDataTsv.size());
NetDataFile->FlushData();
Server.ServerSettings.NetClassifierConfig.SetNetDataFilePath(NetDataFile->Name());
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/ut_utils/test_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class TTestServer {
if (NetDataFile)
return false;
NetDataFile = MakeHolder<TTempFileHandle>();
NetDataFile->Write(content.Data(), content.Size());
NetDataFile->Write(content.data(), content.size());
NetDataFile->FlushData();
ServerSettings.NetClassifierConfig.SetNetDataFilePath(NetDataFile->Name());
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/ut_utils/ut_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ struct TYdbPqWriterTestHelper {
auto log = Setup->GetLog();
log << TLOG_INFO << "Enqueue message with sequence number " << SeqNo;
EventLoop->MessageBuffer.Enqueue(::NPersQueue::TAcknowledgableMessage{
message.Empty() ? Message : message,
message.empty() ? Message : message,
SeqNo, TInstant::Now(), promise
});
MessagesWrittenToBuffer.Signal();
Expand Down
4 changes: 2 additions & 2 deletions src/client/value/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ TUuidValue::TUuidValue(const Ydb::Value& valueProto) {

TUuidValue::TUuidValue(const std::string& uuidString) {
ui16 dw[8];
if (!NKikimr::NUuid::ParseUuidToArray(uuidString, dw, false)) {
if (!NUuid::ParseUuidToArray(uuidString, dw, false)) {
ThrowFatalError(TStringBuilder() << "Unable to parse string as uuid");
}
static_assert(sizeof(dw) == sizeof(Buf_.Bytes));
Expand All @@ -1032,7 +1032,7 @@ std::string TUuidValue::ToString() const {
ui16 dw[8];
static_assert(sizeof(dw) == sizeof(Buf_.Bytes));
std::memcpy(dw, Buf_.Bytes, sizeof(dw));
NKikimr::NUuid::UuidToString(dw, s);
NUuid::UuidToString(dw, s);
return s.Str();
}

Expand Down
2 changes: 1 addition & 1 deletion src/library/uuid/uuid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <util/stream/str.h>

namespace NKikimr {
namespace NYdb {
namespace NUuid {

static void WriteHexDigit(ui8 digit, IOutputStream& out) {
Expand Down
2 changes: 1 addition & 1 deletion src/library/uuid/uuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class IOutputStream;

namespace NKikimr {
namespace NYdb {
namespace NUuid {

static constexpr ui32 UUID_LEN = 16;
Expand Down
5 changes: 3 additions & 2 deletions tests/integration/basic_example_it/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ add_ydb_test(NAME basic-example_it
main.cpp
basic_example_data.cpp
basic_example.cpp
basic_example.h
LINK_LIBRARIES
yutil
api-protos
YDB-CPP-SDK::Driver
YDB-CPP-SDK::Proto
YDB-CPP-SDK::Table
GTest::gtest_main
public-lib-json_value
LABELS
integration
)
Loading
Loading