blob: 9a8a9fca8458370aa8b9b53ed6b21b0195950f8c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "raw_client.h"
#include "rpc_parameters_serialization.h"
#include <yt/cpp/mapreduce/http/http.h>
#include <yt/cpp/mapreduce/http/retry_request.h>
#include <library/cpp/yson/node/node_io.h>
namespace NYT::NDetail {
////////////////////////////////////////////////////////////////////////////////
THttpRawClient::THttpRawClient(const TClientContext& context)
: Context_(context)
{ }
void THttpRawClient::Set(
TMutationId& mutationId,
const TTransactionId& transactionId,
const TYPath& path,
const TNode& value,
const TSetOptions& options)
{
THttpHeader header("PUT", "set");
header.MergeParameters(NRawClient::SerializeParamsForSet(transactionId, Context_.Config->Prefix, path, options));
auto body = NodeToYsonString(value);
RequestWithoutRetry(Context_, mutationId, header, body);
}
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NDetail
|