C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
NYT::TFormat Struct Reference

Class representing YT data format. More...

#include <format.h>

Public Member Functions

 TFormat (const TNode &config=TNode())
 Construct format from given YT format representation.
bool IsTextYson () const
 Is the format text YSON?
bool IsProtobuf () const
 Is the format protobuf?
bool IsYamredDsv () const
 Is the format YaMR?
TYamredDsvAttributes GetYamredDsvAttributes () const
 For YAMR format returns its attributes in structured way.

Static Public Member Functions

static TFormat YsonText ()
 Create text YSON format.
static TFormat YsonBinary ()
 Create binary YSON format.
static TFormat YaMRLenval ()
 Create YaMR format.
static TFormat Protobuf (const TVector< const ::google::protobuf::Descriptor * > &descriptors, bool withDescriptors=false)
 Create protobuf format from protobuf message descriptors.
static TFormat Json ()
 Create JSON format.
static TFormat Dsv ()
 Create DSV (TSKV) format.
template<typename T>
static TFormat Protobuf (bool withDescriptors=false)
 Create protobuf format for the message specified in template parameter.

Public Attributes

TNode Config
 Format representation understandable by YT.

Detailed Description

Class representing YT data format.

Normally the user does not need to use it. However, the class is handy for "raw" operations and table reading and writing, e.g. NYT::IOperationClient::RawMap and other raw operations, NYT::IIOClient::CreateRawReader and NYT::IIOClient::CreateRawWriter. Anyway, the static factory methods should be preferred to the constructor.

See also
YT doc.

Constructor & Destructor Documentation

◆ TFormat()

NYT::TFormat::TFormat ( const TNode & config = TNode())
explicit

Construct format from given YT format representation.

Note
Prefer using static factory methods (e.g. NYT::TFormat::YsonBinary, NYT::TFormat::YsonText, NYT::TFormat::Protobuf).

Member Function Documentation

◆ Dsv()

TFormat NYT::TFormat::Dsv ( )
static

Create DSV (TSKV) format.

See also
the doc

◆ GetYamredDsvAttributes()

TYamredDsvAttributes NYT::TFormat::GetYamredDsvAttributes ( ) const

For YAMR format returns its attributes in structured way.

Deprecated

◆ IsProtobuf()

bool NYT::TFormat::IsProtobuf ( ) const

Is the format protobuf?

See also
the doc

◆ IsTextYson()

bool NYT::TFormat::IsTextYson ( ) const

Is the format text YSON?

See also
the doc

◆ IsYamredDsv()

bool NYT::TFormat::IsYamredDsv ( ) const

Is the format YaMR?

Deprecated

◆ Json()

TFormat NYT::TFormat::Json ( )
static

Create JSON format.

See also
the doc

◆ Protobuf() [1/2]

template<typename T>
TFormat NYT::TFormat::Protobuf ( bool withDescriptors = false)
inlinestatic

Create protobuf format for the message specified in template parameter.

T must be inherited from Message.

See also
the doc.

◆ Protobuf() [2/2]

TFormat NYT::TFormat::Protobuf ( const TVector< const ::google::protobuf::Descriptor * > & descriptors,
bool withDescriptors = false )
static

Create protobuf format from protobuf message descriptors.

See also
the doc.

◆ YaMRLenval()

TFormat NYT::TFormat::YaMRLenval ( )
static

Create YaMR format.

Deprecated

◆ YsonBinary()

TFormat NYT::TFormat::YsonBinary ( )
static

Create binary YSON format.

See also
the doc

◆ YsonText()

TFormat NYT::TFormat::YsonText ( )
static

Create text YSON format.

See also
the doc

The documentation for this struct was generated from the following file: