aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/common/helpers.h
blob: 2174ba820b5bab6bc87b1c154df06f2ecd76904f (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
#pragma once

#include "fwd.h"

#include <library/cpp/yson/node/node_io.h> // backward compatibility

#include <yt/cpp/mapreduce/interface/node.h>
#include <yt/cpp/mapreduce/interface/common.h>
#include <library/cpp/yson/public.h>

namespace NYT {

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

TString NodeListToYsonString(const TNode::TListType& nodes);

TNode PathToNode(const TRichYPath& path);
TNode PathToParamNode(const TRichYPath& path);

TString AttributesToYsonString(const TNode& attributes);

TString AttributeFilterToYsonString(const TAttributeFilter& filter);

TNode NodeFromTableSchema(const TTableSchema& schema);

void MergeNodes(TNode& dst, const TNode& src);

TYPath AddPathPrefix(const TYPath& path, const TString& pathPrefix);

TString GetWriteTableCommand(const TString& apiVersion);
TString GetReadTableCommand(const TString& apiVersion);
TString GetWriteFileCommand(const TString& apiVersion);
TString GetReadFileCommand(const TString& apiVersion);

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

} // namespace NYT