aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/io/counting_raw_reader.cpp
blob: c6213e8665125e5327cee550fb6b6552509af0f5 (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
34
35
36
37
38
39
40
41
#include "counting_raw_reader.h"

namespace NYT {
namespace NDetail {

////////////////////////////////////////////////////////////////////////////////

bool TCountingRawTableReader::Retry(
    const TMaybe<ui32>& rangeIndex,
    const TMaybe<ui64>& rowIndex,
    const std::exception_ptr& error)
{
    return Reader_->Retry(rangeIndex, rowIndex, error);
}

void TCountingRawTableReader::ResetRetries()
{
    Reader_->ResetRetries();
}

bool TCountingRawTableReader::HasRangeIndices() const
{
    return Reader_->HasRangeIndices();
}

size_t TCountingRawTableReader::GetReadByteCount() const
{
    return ReadByteCount_;
}

size_t TCountingRawTableReader::DoRead(void* buf, size_t len)
{
    auto readLen = Reader_->Read(buf, len);
    ReadByteCount_ += readLen;
    return readLen;
}

////////////////////////////////////////////////////////////////////////////////

} // namespace NDetail
} // namespace NYT