aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/io/proto_helpers.h
blob: 9d1ec0027c6b899ea2c4ae29450acfeeac9cfeb5 (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
#pragma once

#include <yt/cpp/mapreduce/interface/node.h>

namespace google {
namespace protobuf {

class Message;
class Descriptor;

}
}

class IInputStream;

namespace NYT {

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

TVector<const ::google::protobuf::Descriptor*> GetJobInputDescriptors();
TVector<const ::google::protobuf::Descriptor*> GetJobOutputDescriptors();

void ValidateProtoDescriptor(
    const ::google::protobuf::Message& row,
    size_t tableIndex,
    const TVector<const ::google::protobuf::Descriptor*>& descriptors,
    bool isRead);

void ParseFromArcadiaStream(
    IInputStream* stream,
    ::google::protobuf::Message& row,
    ui32 size);

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

} // namespace NYT