blob: 39fdecfa71a5d964074087cb9ff638be5551d9f5 (
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
42
43
44
45
46
47
48
|
#pragma once
#include "lenval_table_reader.h"
#include <yt/cpp/mapreduce/interface/io.h>
namespace NYT {
class TRawTableReader;
struct TClientContext;
////////////////////////////////////////////////////////////////////////////////
class TYaMRTableReader
: public IYaMRReaderImpl
, public TLenvalTableReader
{
public:
explicit TYaMRTableReader(::TIntrusivePtr<TRawTableReader> input);
~TYaMRTableReader() override;
const TYaMRRow& GetRow() const override;
bool IsValid() const override;
void Next() override;
ui32 GetTableIndex() const override;
ui32 GetRangeIndex() const override;
ui64 GetRowIndex() const override;
void NextKey() override;
TMaybe<size_t> GetReadByteCount() const override;
bool IsEndOfStream() const override;
bool IsRawReaderExhausted() const override;
private:
void ReadField(TString* result, i32 length);
void ReadRow();
void SkipRow() override;
TYaMRRow Row_;
TString Key_;
TString SubKey_;
TString Value_;
};
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT
|