diff options
| author | hiddenpath <[email protected]> | 2025-02-18 20:34:08 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2025-02-18 21:38:01 +0300 |
| commit | f29f61716d400e5eeb90d62ae9fc5ec0b7d3a39f (patch) | |
| tree | 13b56a5db70e3c3773dabe0cc79279f614660e0c /yt/cpp/mapreduce/http_client/raw_client.cpp | |
| parent | 7fed694a0b014cec505a8117fc4be52cbf9792aa (diff) | |
YT-23616: Temprorary fallback to http implementation for some methods
This commit should be reverted when these methods will have corresponding RPC implementations.
```
void TRpcRawClient::DeleteRows(
const TYPath& /*path*/,
const TNode::TListType& /*keys*/,
const TDeleteRowsOptions& /*options*/)
{
YT_UNIMPLEMENTED();
}
```
commit_hash:a7957f365cc49dce53d44d702288a41cb2ec45b9
Diffstat (limited to 'yt/cpp/mapreduce/http_client/raw_client.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/http_client/raw_client.cpp | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/yt/cpp/mapreduce/http_client/raw_client.cpp b/yt/cpp/mapreduce/http_client/raw_client.cpp index 1390bd8b112..c86fd2494d2 100644 --- a/yt/cpp/mapreduce/http_client/raw_client.cpp +++ b/yt/cpp/mapreduce/http_client/raw_client.cpp @@ -677,14 +677,7 @@ void THttpRawClient::InsertRows( const TNode::TListType& rows, const TInsertRowsOptions& options) { - TMutationId mutationId; - THttpHeader header("PUT", "insert_rows"); - header.SetInputFormat(TFormat::YsonBinary()); - header.MergeParameters(NRawClient::SerializeParametersForInsertRows(Context_.Config->Prefix, path, options)); - auto body = NodeListToYsonString(rows); - TRequestConfig config; - config.IsHeavy = true; - RequestWithoutRetry(Context_, mutationId, header, body, config)->GetResponse(); + NRawClient::InsertRows(Context_, path, rows, options); } void THttpRawClient::TrimRows( @@ -708,30 +701,7 @@ TNode::TListType THttpRawClient::LookupRows( const TNode::TListType& keys, const TLookupRowsOptions& options) { - TMutationId mutationId; - THttpHeader header("PUT", "lookup_rows"); - header.AddPath(AddPathPrefix(path, Context_.Config->ApiVersion)); - header.SetInputFormat(TFormat::YsonBinary()); - header.SetOutputFormat(TFormat::YsonBinary()); - - header.MergeParameters(BuildYsonNodeFluently().BeginMap() - .DoIf(options.Timeout_.Defined(), [&] (TFluentMap fluent) { - fluent.Item("timeout").Value(static_cast<i64>(options.Timeout_->MilliSeconds())); - }) - .Item("keep_missing_rows").Value(options.KeepMissingRows_) - .DoIf(options.Versioned_.Defined(), [&] (TFluentMap fluent) { - fluent.Item("versioned").Value(*options.Versioned_); - }) - .DoIf(options.Columns_.Defined(), [&] (TFluentMap fluent) { - fluent.Item("column_names").Value(*options.Columns_); - }) - .EndMap()); - - auto body = NodeListToYsonString(keys); - TRequestConfig config; - config.IsHeavy = true; - auto responseInfo = RequestWithoutRetry(Context_, mutationId, header, body, config); - return NodeFromYsonString(responseInfo->GetResponse(), ::NYson::EYsonType::ListFragment).AsList(); + return NRawClient::LookupRows(Context_, path, keys, options); } TNode::TListType THttpRawClient::SelectRows( @@ -831,15 +801,7 @@ void THttpRawClient::DeleteRows( const TNode::TListType& keys, const TDeleteRowsOptions& options) { - TMutationId mutationId; - THttpHeader header("PUT", "delete_rows"); - header.SetInputFormat(TFormat::YsonBinary()); - header.MergeParameters(NRawClient::SerializeParametersForDeleteRows(Context_.Config->Prefix, path, options)); - - auto body = NodeListToYsonString(keys); - TRequestConfig config; - config.IsHeavy = true; - RequestWithoutRetry(Context_, mutationId, header, body, config)->GetResponse(); + NRawClient::DeleteRows(Context_, path, keys, options); } void THttpRawClient::FreezeTable( |
