summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/client/client_reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yt/cpp/mapreduce/client/client_reader.cpp')
-rw-r--r--yt/cpp/mapreduce/client/client_reader.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/yt/cpp/mapreduce/client/client_reader.cpp b/yt/cpp/mapreduce/client/client_reader.cpp
index 0efa06ed3af..07f1ef0ad6b 100644
--- a/yt/cpp/mapreduce/client/client_reader.cpp
+++ b/yt/cpp/mapreduce/client/client_reader.cpp
@@ -8,6 +8,10 @@
#include <yt/cpp/mapreduce/common/retry_lib.h>
#include <yt/cpp/mapreduce/common/wait_proxy.h>
+#include <yt/cpp/mapreduce/http/helpers.h>
+#include <yt/cpp/mapreduce/http/requests.h>
+#include <yt/cpp/mapreduce/http/retry_request.h>
+
#include <yt/cpp/mapreduce/interface/config.h>
#include <yt/cpp/mapreduce/interface/tvm.h>
@@ -16,10 +20,7 @@
#include <yt/cpp/mapreduce/io/helpers.h>
#include <yt/cpp/mapreduce/io/yamr_table_reader.h>
-#include <yt/cpp/mapreduce/http/helpers.h>
-#include <yt/cpp/mapreduce/http/requests.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>
#include <library/cpp/yson/node/serialize.h>
@@ -38,6 +39,7 @@ using ::ToString;
TClientReader::TClientReader(
const TRichYPath& path,
+ const IRawClientPtr& rawClient,
IClientRetryPolicyPtr clientRetryPolicy,
ITransactionPingerPtr transactionPinger,
const TClientContext& context,
@@ -46,6 +48,7 @@ TClientReader::TClientReader(
const TTableReaderOptions& options,
bool useFormatFromTableAttributes)
: Path_(path)
+ , RawClient_(rawClient)
, ClientRetryPolicy_(std::move(clientRetryPolicy))
, Context_(context)
, ParentTransactionId_(transactionId)
@@ -56,12 +59,14 @@ TClientReader::TClientReader(
if (options.CreateTransaction_) {
Y_ABORT_UNLESS(transactionPinger, "Internal error: transactionPinger is null");
ReadTransaction_ = MakeHolder<TPingableTransaction>(
+ RawClient_,
ClientRetryPolicy_,
Context_,
transactionId,
transactionPinger->GetChildTxPinger(),
TStartTransactionOptions());
Path_.Path(Snapshot(
+ RawClient_,
ClientRetryPolicy_,
Context_,
ReadTransaction_->GetId(),
@@ -70,7 +75,7 @@ TClientReader::TClientReader(
if (useFormatFromTableAttributes) {
auto transactionId2 = ReadTransaction_ ? ReadTransaction_->GetId() : ParentTransactionId_;
- auto newFormat = GetTableFormat(ClientRetryPolicy_, Context_, transactionId2, Path_);
+ auto newFormat = GetTableFormat(ClientRetryPolicy_, RawClient_, transactionId2, Path_);
if (newFormat) {
Format_->Config = *newFormat;
}