|
C++ YT Wrapper
C++ library for working with YT clusters
|
This method is called before feeding input rows to reducer (before Do method). virtual void Start(TWriter* writer) { Y_UNUSED(writer); }. More...
#include <operation.h>
Public Member Functions | |
| virtual void | Do (const TRawJobContext &jobContext)=0 |
| This method is called exactly once for the whole job input. | |
| Public Member Functions inherited from NYT::IJob | |
| virtual void | Save (IOutputStream &stream) const |
| Save job state to stream to be restored on cluster nodes. | |
| virtual void | Load (IInputStream &stream) |
| Restore job state from a stream. | |
| const TNode & | SecureVault () const |
| Get operation secure vault (specified in NYT::TOperationOptions::SecureVault) inside a job. | |
| i64 | GetOutputTableCount () const |
| Get number of output tables. | |
| virtual void | PrepareOperation (const IOperationPreparationContext &context, TJobOperationPreparer &preparer) const |
| Method allowing user to control some properties of input and output tables and formats. | |
Static Public Attributes | |
| static constexpr EType | JobType = EType::RawJob |
| Type of job implemented by this class. | |
Additional Inherited Members | |
| Public Types inherited from NYT::IJob | |
| enum | EType { Mapper , Reducer , ReducerAggregator , RawJob , VanillaJob } |
| Type of job. | |
This method is called before feeding input rows to reducer (before Do method). virtual void Start(TWriter* writer) { Y_UNUSED(writer); }.
@brief Base interface of jobs used inside reduce operations. Unlike @ref NYT::IReducer jobs their `Do' method is called only once and takes whole range of records split by key boundaries. Template argument `TR` must be @ref NYT::TTableRangesReader. */
template <class TR, class TW> class IAggregatorReducer : public IReducerBase { public: using TReader = TR; using TWriter = TW;
public: / Type of job implemented by this class. static constexpr EType JobType = EType::ReducerAggregator;
public: / /
/ / This method is called exactly once for the whole job input. virtual void Do(TReader* reader, TWriter* writer) = 0;
/ / This method is called after feeding input rows to reducer (after Do method). virtual void Finish(TWriter* writer) { Y_UNUSED(writer); }
virtual TStructuredRowStreamDescription GetInputRowStreamDescription() const override; virtual TStructuredRowStreamDescription GetOutputRowStreamDescription() const override; };
/**
Interface for raw jobs (i.e. reading and writing byte streams).
|
pure virtual |
This method is called exactly once for the whole job input.
Implemented in NYT::TCommandRawJob.