summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/client/file_reader.cpp
diff options
context:
space:
mode:
authorhiddenpath <[email protected]>2024-12-13 15:22:36 +0300
committerhiddenpath <[email protected]>2024-12-13 17:04:18 +0300
commit09c88b035d29fac5fd49de2fbc3c71e2d2a80754 (patch)
treea84b5b2de4dcdf85c3b22b9cac7e984aebb8b68d /yt/cpp/mapreduce/client/file_reader.cpp
parent615edba542d9394b0eae47ef957ec2257549cfdd (diff)
yt/cpp/mapreduce: move Get, TryGet, Exists, MultisetAttributes to THttpRawClient
commit_hash:bd2228f98fa92de408ca850f9bc1608fdf99e7f5
Diffstat (limited to 'yt/cpp/mapreduce/client/file_reader.cpp')
-rw-r--r--yt/cpp/mapreduce/client/file_reader.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/yt/cpp/mapreduce/client/file_reader.cpp b/yt/cpp/mapreduce/client/file_reader.cpp
index 57131e5330b..73d5de21f11 100644
--- a/yt/cpp/mapreduce/client/file_reader.cpp
+++ b/yt/cpp/mapreduce/client/file_reader.cpp
@@ -19,6 +19,7 @@
#include <yt/cpp/mapreduce/http/http_client.h>
#include <yt/cpp/mapreduce/http/retry_request.h>
+#include <yt/cpp/mapreduce/raw_client/raw_client.h>
#include <yt/cpp/mapreduce/raw_client/raw_requests.h>
namespace NYT {
@@ -39,13 +40,16 @@ static TMaybe<ui64> GetEndOffset(const TFileReaderOptions& options) {
////////////////////////////////////////////////////////////////////////////////
TStreamReaderBase::TStreamReaderBase(
+ const IRawClientPtr& rawClient,
IClientRetryPolicyPtr clientRetryPolicy,
ITransactionPingerPtr transactionPinger,
const TClientContext& context,
const TTransactionId& transactionId)
- : Context_(context)
+ : RawClient_(rawClient)
+ , Context_(context)
, ClientRetryPolicy_(std::move(clientRetryPolicy))
, ReadTransaction_(MakeHolder<TPingableTransaction>(
+ RawClient_,
ClientRetryPolicy_,
context,
transactionId,
@@ -57,7 +61,7 @@ TStreamReaderBase::~TStreamReaderBase() = default;
TYPath TStreamReaderBase::Snapshot(const TYPath& path)
{
- return NYT::Snapshot(ClientRetryPolicy_, Context_, ReadTransaction_->GetId(), path);
+ return NYT::Snapshot(RawClient_, ClientRetryPolicy_, Context_, ReadTransaction_->GetId(), path);
}
TString TStreamReaderBase::GetActiveRequestId() const
@@ -119,12 +123,13 @@ size_t TStreamReaderBase::DoRead(void* buf, size_t len)
TFileReader::TFileReader(
const TRichYPath& path,
+ const IRawClientPtr& rawClient,
IClientRetryPolicyPtr clientRetryPolicy,
ITransactionPingerPtr transactionPinger,
const TClientContext& context,
const TTransactionId& transactionId,
const TFileReaderOptions& options)
- : TStreamReaderBase(std::move(clientRetryPolicy), std::move(transactionPinger), context, transactionId)
+ : TStreamReaderBase(rawClient, std::move(clientRetryPolicy), std::move(transactionPinger), context, transactionId)
, FileReaderOptions_(options)
, Path_(path)
, StartOffset_(FileReaderOptions_.Offset_.GetOrElse(0))
@@ -183,12 +188,13 @@ NHttpClient::IHttpResponsePtr TFileReader::Request(const TClientContext& context
TBlobTableReader::TBlobTableReader(
const TYPath& path,
const TKey& key,
+ const IRawClientPtr& rawClient,
IClientRetryPolicyPtr retryPolicy,
ITransactionPingerPtr transactionPinger,
const TClientContext& context,
const TTransactionId& transactionId,
const TBlobTableReaderOptions& options)
- : TStreamReaderBase(std::move(retryPolicy), std::move(transactionPinger), context, transactionId)
+ : TStreamReaderBase(rawClient, std::move(retryPolicy), std::move(transactionPinger), context, transactionId)
, Key_(key)
, Options_(options)
{