From a6423bf330c10089d7a0e2aaa8d971d0dcbb3fcf Mon Sep 17 00:00:00 2001 From: maybenotilya Date: Fri, 17 Apr 2026 11:57:44 +0300 Subject: YT-26179: Add Abort for readers * Changelog entry Type: feature Component: cpp-sdk Add Abort for table readers commit_hash:be5026883c90d18333f20468946f1e5a5b71839b --- yt/cpp/mapreduce/client/file_reader.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'yt/cpp/mapreduce/client/file_reader.cpp') diff --git a/yt/cpp/mapreduce/client/file_reader.cpp b/yt/cpp/mapreduce/client/file_reader.cpp index 6163dd55331..ffdd2c9ac30 100644 --- a/yt/cpp/mapreduce/client/file_reader.cpp +++ b/yt/cpp/mapreduce/client/file_reader.cpp @@ -50,6 +50,16 @@ TStreamReaderBase::TStreamReaderBase( TStartTransactionOptions())) { } +void TStreamReaderBase::Abort() +{ + Input_->Abort(); +} + +bool TStreamReaderBase::IsAborted() const +{ + return Input_->IsAborted(); +} + TStreamReaderBase::~TStreamReaderBase() = default; TYPath TStreamReaderBase::Snapshot(const TYPath& path) @@ -98,7 +108,7 @@ TFileReader::TFileReader( Path_.Path_ = TStreamReaderBase::Snapshot(Path_.Path_); } -std::unique_ptr TFileReader::Request(const TTransactionId& transactionId, ui64 readBytes) +std::unique_ptr TFileReader::Request(const TTransactionId& transactionId, ui64 readBytes) { const ui64 currentOffset = StartOffset_ + readBytes; @@ -130,7 +140,7 @@ TBlobTableReader::TBlobTableReader( Path_ = TStreamReaderBase::Snapshot(path); } -std::unique_ptr TBlobTableReader::Request(const TTransactionId& transactionId, ui64 readBytes) +std::unique_ptr TBlobTableReader::Request(const TTransactionId& transactionId, ui64 readBytes) { const i64 currentOffset = StartOffset_ + readBytes; const i64 startPartIndex = currentOffset / Options_.PartSize_; -- cgit v1.3