#pragma once #include namespace NYT { namespace NDetail { class TCountingRawTableReader final : public TRawTableReader { public: TCountingRawTableReader(::TIntrusivePtr reader) : Reader_(std::move(reader)) { } bool Retry( const TMaybe& rangeIndex, const TMaybe& rowIndex, const std::exception_ptr& error) override; void ResetRetries() override; bool HasRangeIndices() const override; size_t GetReadByteCount() const; protected: size_t DoRead(void* buf, size_t len) override; private: ::TIntrusivePtr Reader_; size_t ReadByteCount_ = 0; }; } // namespace NDetail } // namespace NYT