14#include "job_counters.h"
16#include <library/cpp/threading/future/future.h>
17#include <library/cpp/type_info/type_info.h>
19#include <util/datetime/base.h>
20#include <util/generic/vector.h>
21#include <util/generic/maybe.h>
22#include <util/system/file.h>
23#include <util/system/types.h>
42 const ::google::protobuf::Descriptor*
Descriptor =
nullptr;
56struct TStructuredTablePath
59 : RichYPath(std::move(richYPath))
60 , Description(std::move(description))
63 TStructuredTablePath(
TRichYPath richYPath, const ::google::protobuf::Descriptor* descriptor)
64 : RichYPath(std::move(richYPath))
68 TStructuredTablePath(TYPath path)
69 : RichYPath(std::move(path))
73 TStructuredTablePath(
const char* path)
83template <
typename TRow>
87template <
typename TRow>
131 TMaybe<TString> MD5CheckSum;
138 TMaybe<TTransactionId> TransactionId;
146 extern i64 OutputTableCount;
205template <
class TDerived>
210 using TSelf = TDerived;
241template <
class TDerived>
246 using TSelf = TDerived;
254template <
class TDerived>
259 using TSelf = TDerived;
267template <
class TDerived>
274 using TSelf = TDerived;
284template <
class TDerived>
289 using TSelf = TDerived;
311 TVector<TRichYPath> Inputs_;
312 TVector<TRichYPath> Outputs_;
316template <
class TDerived>
321 using TSelf = TDerived;
327 FLUENT_FIELD_OPTION(
TFormat, Format);
330 FLUENT_FIELD_OPTION(
TFormat, InputFormat);
333 FLUENT_FIELD_OPTION(
TFormat, OutputFormat);
337template <
class TDerived>
343 using TSelf = TDerived;
349 FLUENT_FIELD_OPTION(
TFormat, MapperFormat);
352 FLUENT_FIELD_OPTION(
TFormat, MapperInputFormat);
355 FLUENT_FIELD_OPTION(
TFormat, MapperOutputFormat);
360 FLUENT_FIELD_OPTION(
TFormat, ReduceCombinerFormat);
363 FLUENT_FIELD_OPTION(
TFormat, ReduceCombinerInputFormat);
366 FLUENT_FIELD_OPTION(
TFormat, ReduceCombinerOutputFormat);
371 FLUENT_FIELD_OPTION(
TFormat, ReducerFormat);
374 FLUENT_FIELD_OPTION(
TFormat, ReducerInputFormat);
377 FLUENT_FIELD_OPTION(
TFormat, ReducerOutputFormat);
380 TDerived& AddMapOutput(
const TRichYPath& path);
383 TDerived& SetMapOutput(
size_t tableIndex,
const TRichYPath& path);
386 const TVector<TRichYPath>& GetMapOutputs()
const;
389 TVector<TRichYPath> MapOutputs_;
397 template <
class T,
class =
void>
423 TVector<TStructuredTablePath> StructuredInputs_;
424 friend struct TOperationIOSpecBase;
426 friend struct TOperationIOSpec;
434 template <
class T,
class =
void>
460 TVector<TStructuredTablePath> StructuredOutputs_;
461 friend struct TOperationIOSpecBase;
463 friend struct TOperationIOSpec;
468struct TOperationIOSpecBase
475template <
class TDerived>
480 using TSelf = TDerived;
489 TDerived& SetInput(
size_t tableIndex,
const TRichYPath& path);
497 TDerived& SetOutput(
size_t tableIndex,
const TRichYPath& path);
505 TDerived& AddProtobufInput_VerySlow_Deprecated(
const TRichYPath& path);
506 TDerived& AddProtobufOutput_VerySlow_Deprecated(
const TRichYPath& path);
513template <
class TDerived>
517 using TSelf = TDerived;
527 FLUENT_FIELD_OPTION(TString,
Alias);
530 FLUENT_FIELD_OPTION(TString,
Title);
533 FLUENT_FIELD_OPTION(TString,
Pool);
550 FLUENT_FIELD_OPTION(TNode, Annotations);
553 FLUENT_FIELD_OPTION(TNode, Description);
558template <
class TDerived>
563 using TSelf = TDerived;
607template <
class TDerived>
634 TVector<TRichYPath> MapOutputs_;
636 const TVector<TStructuredTablePath>& GetStructuredMapOutputs()
const;
637 const TMaybe<TTableStructure>& GetIntermediateMapOutputDescription()
const;
638 const TMaybe<TTableStructure>& GetIntermediateReduceCombinerInputDescription()
const;
639 const TMaybe<TTableStructure>& GetIntermediateReduceCombinerOutputDescription()
const;
640 const TMaybe<TTableStructure>& GetIntermediateReducerInputDescription()
const;
643 TVector<TStructuredTablePath> StructuredMapOutputs_;
644 TMaybe<TTableStructure> IntermediateMapOutputDescription_;
645 TMaybe<TTableStructure> IntermediateReduceCombinerInputDescription_;
646 TMaybe<TTableStructure> IntermediateReduceCombinerOutputDescription_;
647 TMaybe<TTableStructure> IntermediateReducerInputDescription_;
768 TVector<std::tuple<TLocalFilePath, TAddLocalFileOptions>>
GetLocalFiles()
const;
904 TVector<std::tuple<TLocalFilePath, TAddLocalFileOptions>> LocalFiles_;
905 TJobBinaryConfig JobBinary_;
914template <
typename TDerived>
920 using TSelf = TDerived;
941 FLUENT_FIELD_OPTION(ui32, JobCount);
976template <
typename TDerived>
982 using TSelf = TDerived;
1012 FLUENT_FIELD_OPTION(ui32, JobCount);
1050template <
typename TDerived>
1055 using TSelf = TDerived;
1073 FLUENT_FIELD_OPTION(ui32, JobCount);
1114template <
typename TDerived>
1119 using TSelf = TDerived;
1147 FLUENT_FIELD_OPTION(ui32, MapJobCount);
1271 FLUENT_FIELD_OPTION(ui64, PartitionJobCount);
1345 FLUENT_FIELD_OPTION(ui32, JobCount);
1434 FLUENT_FIELD_OPTION(TNode, ClusterConnection);
1471 FLUENT_FIELD(::TIntrusivePtr<IVanillaJobBase>,
Job);
1551 return static_cast<TSelf&
>(*this);
1665 explicit TRawJobContext(
size_t outputTableCount);
1677 TVector<TFile> OutputFileList_;
1691 virtual void Save(IOutputStream& stream)
const = 0;
1695 virtual void Load(IInputStream& stream) = 0;
1730class TJobOperationPreparer
1741 TInputGroup(TJobOperationPreparer& preparer, TVector<int> indices);
1744 template <
typename TRow>
1759 TJobOperationPreparer& Preparer_;
1760 TVector<int> Indices_;
1770 TOutputGroup(TJobOperationPreparer& preparer, TVector<int> indices);
1776 template <
typename TRow>
1791 TJobOperationPreparer& Preparer_;
1792 TVector<int> Indices_;
1808 template <
typename TCont>
1821 template <
typename TCont>
1843 template <
typename TRow>
1850 template <
typename TRow>
1902 void ValidateMissingOutputSchema(
int tableIndex)
const;
1905 void ValidateMissingInputDescription(
int tableIndex)
const;
1908 void ValidateMissingOutputDescription(
int tableIndex)
const;
1913 void ValidateInputTableIndex(
int tableIndex, TStringBuf message)
const;
1918 void ValidateOutputTableIndex(
int tableIndex, TStringBuf message)
const;
1921 void FinallyValidate()
const;
1928 TVector<TMaybe<TTableSchema>> OutputSchemas_;
1929 TVector<THashMap<TString, TString>> InputColumnRenamings_;
1930 TVector<TMaybe<TVector<TString>>> InputColumnFilters_;
1931 TVector<TMaybe<TTableStructure>> InputTableDescriptions_;
1932 TVector<TMaybe<TTableStructure>> OutputTableDescriptions_;
1941 :
public TThrRefBase
1958 virtual void Save(IOutputStream& stream)
const
1965 virtual void Load(IInputStream& stream)
1981 Y_ABORT_UNLESS(NDetail::OutputTableCount > 0);
1983 return NDetail::OutputTableCount;
2023#define Y_SAVELOAD_JOB(...) \
2024 virtual void Save(IOutputStream& stream) const override { Save(&stream); } \
2025 virtual void Load(IInputStream& stream) override { Load(&stream); } \
2026 Y_PASS_VA_ARGS(Y_SAVELOAD_DEFINE(__VA_ARGS__))
2030#define Y_SAVELOAD_JOB_DERIVED(Base, ...) \
2031 virtual void Save(IOutputStream& stream) const override { \
2032 Base::Save(stream); \
2035 virtual void Load(IInputStream& stream) override { \
2036 Base::Load(stream); \
2039 Y_PASS_VA_ARGS(Y_SAVELOAD_DEFINE(__VA_ARGS__))
2054 virtual THolder<IProxyOutput> CreateCustomRawJobWriter(
size_t outputTableCount)
const;
2080template <
class TR,
class TW>
2103 virtual void Do(TReader* reader, TWriter* writer) = 0;
2128template <
class TR,
class TW>
2151 virtual void Do(TReader* reader, TWriter* writer) = 0;
2177template <
class TR,
class TW>
2178class IAggregatorReducer
2187 static constexpr EType JobType = EType::ReducerAggregator;
2192 virtual void Start(TWriter* writer)
2199 virtual void Do(TReader* reader, TWriter* writer) = 0;
2203 virtual void Finish(TWriter* writer)
2277template <
class TW =
void>
2336 virtual void Do(TWriter* writer) = 0;
2379 TVector<EOperationAttribute> Attributes_;
2385 Attributes_.push_back(attribute);
2402 FLUENT_FIELD_OPTION(
bool, IncludeRuntime);
2429 ReviveInitializing ,
2645 FLUENT_FIELD_OPTION(TString,
Pool);
2649 FLUENT_FIELD_OPTION(TString,
User);
2820 const TString& Get()
const;
2895 THashSet<EJobAttribute> Attributes_;
2901 Attributes_.insert(attribute);
3002 FLUENT_FIELD_OPTION(
bool, IncludeCypress);
3005 FLUENT_FIELD_OPTION(
bool, IncludeControllerAgent);
3008 FLUENT_FIELD_OPTION(
bool, IncludeArchive);
3012 FLUENT_FIELD_OPTION(i64, Limit);
3026 TString ExecutableName;
3028 TMaybe<TYtError> Error;
3243 :
public TThrRefBase
3249 virtual const TOperationId&
GetId()
const = 0;
3304 virtual ::NThreading::TFuture<void>
Watch() = 0;
3337 virtual TMaybe<THashMap<TString, TYtError>>
GetAlerts() = 0;
3393 const TJobId& jobId,
3418 ::TIntrusivePtr<IMapperBase> mapper,
3432 ::TIntrusivePtr<IMapperBase> mapper,
3448 ::TIntrusivePtr<IRawJob> rawJob,
3461 ::TIntrusivePtr<IReducerBase> reducer,
3476 ::TIntrusivePtr<IReducerBase> reducer,
3493 ::TIntrusivePtr<IRawJob> rawJob,
3504 IOperationPtr JoinReduce(
3506 ::TIntrusivePtr<IReducerBase> reducer,
3517 virtual IOperationPtr RawJoinReduce(
3519 ::TIntrusivePtr<IRawJob> rawJob,
3533 ::TIntrusivePtr<IMapperBase> mapper,
3534 ::TIntrusivePtr<IReducerBase> reducer,
3549 ::TIntrusivePtr<IMapperBase> mapper,
3550 ::TIntrusivePtr<IReducerBase> reduceCombiner,
3551 ::TIntrusivePtr<IReducerBase> reducer,
3567 ::TIntrusivePtr<IMapperBase> mapper,
3568 ::TIntrusivePtr<IReducerBase> reducer,
3589 ::TIntrusivePtr<IMapperBase> mapper,
3590 ::TIntrusivePtr<IReducerBase> reduceCombiner,
3591 ::TIntrusivePtr<IReducerBase> reducer,
3610 ::TIntrusivePtr<IRawJob> mapper,
3611 ::TIntrusivePtr<IRawJob> reduceCombiner,
3612 ::TIntrusivePtr<IRawJob> reducer,
3692 const TOperationId& operationId) = 0;
3699 const TOperationId& operationId) = 0;
3704 const TOperationId& operationId) = 0;
3712 const TOperationId& operationId) = 0;
3721 virtual IOperationPtr DoMap(
3723 ::TIntrusivePtr<IStructuredJob> mapper,
3726 virtual IOperationPtr DoReduce(
3728 ::TIntrusivePtr<IStructuredJob> reducer,
3731 virtual IOperationPtr DoJoinReduce(
3733 ::TIntrusivePtr<IStructuredJob> reducer,
3736 virtual IOperationPtr DoMapReduce(
3738 ::TIntrusivePtr<IStructuredJob> mapper,
3739 ::TIntrusivePtr<IStructuredJob> reduceCombiner,
3740 ::TIntrusivePtr<IStructuredJob> reducer,
3748#define OPERATION_INL_H_
3749#include "operation-inl.h"
3750#undef OPERATION_INL_H_
Interface of jobs that run the given bash command.
Definition operation.h:2232
virtual const TString & GetCommand() const =0
Get bash command to run.
Interface for all user jobs.
Definition operation.h:1942
virtual void PrepareOperation(const IOperationPreparationContext &context, TJobOperationPreparer &preparer) const
Method allowing user to control some properties of input and output tables and formats.
virtual void Save(IOutputStream &stream) const
Save job state to stream to be restored on cluster nodes.
Definition operation.h:1958
i64 GetOutputTableCount() const
Get number of output tables.
Definition operation.h:1979
virtual void Load(IInputStream &stream)
Restore job state from a stream.
Definition operation.h:1965
EType
Type of job.
Definition operation.h:1948
const TNode & SecureVault() const
Get operation secure vault (specified in NYT::TOperationOptions::SecureVault) inside a job.
Definition operation.h:1972
Base interface for structured (typed) map jobs.
Definition operation.h:2076
Base interface for structured (typed) map jobs with given reader and writer.
Definition operation.h:2083
virtual void Start(TWriter *writer)
This method is called before feeding input rows to mapper (before Do method).
Definition operation.h:2094
virtual void Do(TReader *reader, TWriter *writer)=0
This method is called exactly once for the whole job input.
virtual void Finish(TWriter *writer)
This method is called after feeding input rows to mapper (after Do method).
Definition operation.h:2107
static constexpr EType JobType
Type of job implemented by this class.
Definition operation.h:2090
Provider of information about operation inputs/outputs during NYT::IJob::PrepareOperation.
Definition operation.h:1703
virtual TMaybe< TYPath > GetInputPath(int index) const =0
Path to the input table if available (Nothing() for intermediate tables).
virtual int GetOutputCount() const =0
Get the number of output tables.
virtual const TVector< TTableSchema > & GetInputSchemas() const =0
Get all the input table schemas.
virtual const TTableSchema & GetInputSchema(int index) const =0
Get the schema of input table no. index.
virtual TMaybe< TYPath > GetOutputPath(int index) const =0
Path to the output table if available (Nothing() for intermediate tables).
virtual int GetInputCount() const =0
Get the number of input tables.
This method is called before feeding input rows to reducer (before Do method). virtual void Start(TWr...
Definition operation.h:2218
static constexpr EType JobType
Type of job implemented by this class.
Definition operation.h:2221
virtual void Do(const TRawJobContext &jobContext)=0
This method is called exactly once for the whole job input.
Base interface for structured (typed) reduce jobs.
Definition operation.h:2124
Base interface for structured (typed) reduce jobs with given reader and writer.
Definition operation.h:2131
virtual void Start(TWriter *writer)
This method is called before feeding input rows to reducer (before Do method).
Definition operation.h:2144
virtual void Do(TReader *reader, TWriter *writer)=0
This method is called exactly once for each range with same value of ReduceBy (or JoinBy) keys.
void Break()
Refuse to process the remaining row ranges and finish the job (successfully).
virtual void Finish(TWriter *writer)
This method is called after feeding input rows to reducer (after Do method).
Definition operation.h:2155
static constexpr EType JobType
Type of job implemented by this class.
Definition operation.h:2138
Interface for classes that can be Saved/Loaded (to be used with Y_SAVELOAD_JOB).
Definition operation.h:1685
virtual void Save(IOutputStream &stream) const =0
Dump state to output stream to be restored in job.
virtual void Load(IInputStream &stream)=0
Load state from a stream.
Interface for jobs with typed inputs and outputs.
Definition operation.h:2047
virtual TRawTableReaderPtr CreateCustomRawJobReader(int fd) const
This methods are called when creating table reader and writer for the job.
Base interface for vanilla jobs.
Definition operation.h:2271
static constexpr EType JobType
Type of job implemented by this class.
Definition operation.h:2274
virtual void Do()=0
This method is called exactly once for each vanilla job.
Interface for vanilla jobs with output tables.
Definition operation.h:2322
virtual void Do(TWriter *writer)=0
This method is called exactly once for each vanilla job.
virtual void Finish(TWriter *)
This method is called after Do method.
Definition operation.h:2340
virtual void Start(TWriter *)
This method is called before Do method.
Definition operation.h:2329
Options for auto merge operation stage.
Definition operation.h:179
TSelf & Mode(EAutoMergeMode)
Mode of the auto merge.
TSelf & MaxIntermediateChunkCount(i64)
Upper limit for number of intermediate chunks.
TSelf & ChunkCountPerMergeJob(i64)
Number of chunks limit to merge in one job.
TSelf & ChunkSizeThreshold(i64)
Automerge will not merge chunks that are larger than DesiredChunkSize * (ChunkSizeThreshold / 100....
TCommandRawJob(TStringBuf command={})
Create job with specified command.
void Do(const TRawJobContext &jobContext) override
This method is called exactly once for the whole job input.
const TString & GetCommand() const override
Get bash command to run.
const TString & GetCommand() const override
Get bash command to run.
TCommandVanillaJob(TStringBuf command={})
Create job with specified command.
Class representing a collection of job counters.
Definition job_counters.h:28
Group of output tables that allows to specify properties on all of them at once.
Definition operation.h:1768
TJobOperationPreparer & EndOutputGroup()
Finish describing the output group.
TOutputGroup & NoSchema()
Specify that all the the tables in this group are unschematized.
TOutputGroup & Description(bool inferSchema=true)
Specify the type of output rows.
TOutputGroup & Schema(const TTableSchema &schema)
Specify schema for these tables.
Fluent builder class for NYT::IJob::PrepareOperation.
Definition operation.h:1731
const TVector< TMaybe< TTableStructure > > & GetOutputDescriptions() const
Get output column descriptions as specified by the user.
const TVector< TMaybe< TVector< TString > > > & GetInputColumnFilters() const
Get input column filters as specified by the user.
TInputGroup BeginInputGroup(const TCont &indices)
Begin input group consisting of tables with indices from indices.
TOutputGroup BeginOutputGroup(const TCont &indices)
Begin input group consisting of tables with indices from indices.
TJobOperationPreparer & OutputSchema(int tableIndex, TTableSchema schema)
Specify the schema for output table no tableIndex.
const TVector< THashMap< TString, TString > > & GetInputColumnRenamings() const
Get input column renamings as specified by the user.
TJobOperationPreparer & OutputDescription(int tableIndex, bool inferSchema=true)
Specify the type of output rows for table no. tableIndex.
const TVector< TMaybe< TTableStructure > > & GetInputDescriptions() const
Get input column descriptions as specified by the user.
TJobOperationPreparer & NoOutputSchema(int tableIndex)
Mark the output table no. tableIndex as unschematized.
TJobOperationPreparer & InputFormatHints(TFormatHints hints)
Specify input format hints.
void Finish()
Finish the building process.
TVector< TTableSchema > GetOutputSchemas()
Get output table schemas as specified by the user.
const TUserJobFormatHints & GetFormatHints() const
Get format hints as specified by the user.
TJobOperationPreparer & OutputFormatHints(TFormatHints hints)
Specify output format hints.
TJobOperationPreparer & FormatHints(TUserJobFormatHints newFormatHints)
Specify format hints.
TInputGroup BeginInputGroup(int begin, int end)
Begin input group consisting of tables with indices [begin, end).
TOutputGroup BeginOutputGroup(int begin, int end)
Begin output group consisting of tables with indices [begin, end).
TJobOperationPreparer & InputDescription(int tableIndex)
Specify the type of input rows for table no. tableIndex.
TJobOperationPreparer & NodeOutput(int tableIndex)
Set type of output rows for table no. tableIndex to TNode.
TJobOperationPreparer & InputColumnRenaming(int tableIndex, const THashMap< TString, TString > &renaming)
Specify renaming of input columns for table no. tableIndex.
TJobOperationPreparer & InputColumnFilter(int tableIndex, const TVector< TString > &columns)
Specify what input columns of table no. tableIndex to send to job.
Class representing a collection of job statistics.
Definition job_statistics.h:35
Base spec of operations with output tables.
Definition operation.h:432
void SetOutput(size_t tableIndex, const TRichYPath &path)
Set output table path and type.
TVector< TRichYPath > Outputs_
All output paths.
Definition operation.h:453
void AddOutput(const TRichYPath &path)
Add output table path to output path list and specify type of rows.
const TVector< TStructuredTablePath > & GetStructuredOutputs() const
Get all output structured paths.
void AddStructuredOutput(TStructuredTablePath path)
Add output table path as structured paths.
Context passed to NYT::IRawJob::Do.
Definition operation.h:1663
const TVector< TFile > & GetOutputFileList() const
Get files corresponding to output streams.
const TFile & GetInputFile() const
Get file corresponding to input stream.
Spec for IO in MapReduce operation.
Definition operation.h:340
Spec of input and output tables of a raw operation.
Definition operation.h:286
TDerived & SetOutput(size_t tableIndex, const TRichYPath &path)
Set output table path no. tableIndex.
TDerived & AddInput(const TRichYPath &path)
Add input table path to input path list.
const TVector< TRichYPath > & GetOutputs() const
Get all output table paths.
TDerived & SetInput(size_t tableIndex, const TRichYPath &path)
Set input table path no. tableIndex.
const TVector< TRichYPath > & GetInputs() const
Get all input table paths.
TDerived & AddOutput(const TRichYPath &path)
Add output table path to output path list.
Resources controlled by scheduler and used by running operations.
Definition operation.h:224
FLUENT_FIELD_OPTION_ENCAPSULATED(i64, UserSlots)
Each job consumes exactly one user slot.
FLUENT_FIELD_OPTION_ENCAPSULATED(i64, Cpu)
Number of (virtual) cpu cores consumed by all jobs.
FLUENT_FIELD_OPTION_ENCAPSULATED(i64, Memory)
Amount of memory in bytes.
List of TSortColumn.
Definition common.h:558
Description of table schema.
Definition common.h:771
TTaskName(TString taskName)
Construct a custom task name.
TTaskName(ETaskName taskName)
Construct a well-known task name.
TTaskName(const char *taskName)
Construct a custom task name.
Base for operations with auto merge options.
Definition operation.h:207
TSelf & AutoMerge(TAutoMergeSpec)
Options for auto merge operation stage.
Main namespace of YT client.
Definition abortable_stream.h:7
@ None
Transactions are non atomic (might reduce latency of write requests).
Definition client_method_options.h:1330
ECursorDirection
Direction of cursor for paging, see NYT::TListOperationsOptions::CursorDirection.
Definition operation.h:2589
ETaskName
Well-known task names.
Definition operation.h:2780
TTableStructure StructuredTableDescription()
Create tag class from row type.
EOperationAttribute
Attributes to request for an operation.
Definition operation.h:2352
EJobType
Job type.
Definition operation.h:2749
EOperationBriefState
"Coarse-grained" state of an operation.
Definition operation.h:2408
@ Failed
Failed.
Definition operation.h:2414
EOperationState
Operation state.
Definition operation.h:2421
EProfilingBinary
Binary to run job profiler on.
Definition operation.h:682
@ JobProxy
Profile job proxy.
Definition operation.h:684
@ UserJob
Profile user job.
Definition operation.h:687
THolder< IProxyOutput > CreateRawJobWriter(size_t outputTableCount)
Create default raw job writer.
EListJobsDataSource
Data source for NYT::IClient::ListJobs command.
Definition operation.h:2739
bool operator==(const TColumnSchema &lhs, const TColumnSchema &rhs)
Equality check checks all fields of column schema.
const TNode & GetJobSecureVault()
Get operation secure vault (specified in NYT::TOperationOptions::SecureVault) inside a job.
EJobState
Job state.
Definition operation.h:2829
EJobSortDirection
Job sort direction.
Definition operation.h:2862
std::variant< TUnspecifiedTableStructure, TProtobufTableStructure > TTableStructure
Tag class to specify table row type.
Definition operation.h:47
TTableReaderIterator< T > end(TTableReader< T > &)
Function to facilitate range-based-for for NYT::TTableReader.
Definition io.h:359
TStructuredTablePath Structured(TRichYPath richYPath)
Create marked table path from row type.
EMergeMode
Merge mode.
Definition operation.h:1299
std::variant< TVoidStructuredRowStream, TTNodeStructuredRowStream, TTYaMRRowStructuredRowStream, TProtobufStructuredRowStream > TStructuredRowStreamDescription
Tag class to specify type of rows in an operation row stream.
Definition operation.h:114
ESchemaInferenceMode
Schema inference mode.
Definition operation.h:1229
TRawTableReaderPtr CreateRawJobReader(int fd=0)
Create default raw job reader.
EJobSortField
Job sort field.
Definition operation.h:2845
EProfilerType
Type of job profiler.
Definition operation.h:692
@ Memory
Profile memory usage.
Definition operation.h:697
@ PeakMemory
Profiler peak memory usage.
Definition operation.h:700
@ Cpu
Profile CPU usage.
Definition operation.h:694
EAutoMergeMode
Auto merge mode.
Definition operation.h:157
@ Relaxed
Mode that tries to achieve good chunk sizes and doesn't limit usage of chunk quota for intermediate c...
Definition operation.h:162
@ Economy
Mode that tries to optimize usage of chunk quota for intermediate chunks, operation might run slower.
Definition operation.h:165
@ Disabled
Auto merge is disabled.
Definition operation.h:159
@ Manual
Manual configuration of automerge parameters.
Definition operation.h:171
ESortOrder
Sort order.
Definition common.h:431
EOperationType
Operation type.
Definition operation.h:2445
TTableReaderIterator< T > begin(TTableReader< T > &reader)
Function to facilitate range-based-for for NYT::TTableReader.
Definition io.h:350
EJobAttribute
Attributes to request for a job.
Definition operation.h:2870
Interface of client capable of managing operations.
Definition operation.h:3407
IOperationPtr MapReduce(const TMapReduceOperationSpec &spec, ::TIntrusivePtr< IMapperBase > mapper, ::TIntrusivePtr< IReducerBase > reducer, const TOperationOptions &options=TOperationOptions())
Run JoinReduce operation.
virtual void CompleteOperation(const TOperationId &operationId)=0
Complete operation.
virtual IOperationPtr AttachOperation(const TOperationId &operationId)=0
Create an operation object given operation id.
IOperationPtr Reduce(const TReduceOperationSpec &spec, ::TIntrusivePtr< IReducerBase > reducer, const TOperationOptions &options=TOperationOptions())
Run Reduce operation.
IOperationPtr Map(const TMapOperationSpec &spec, ::TIntrusivePtr< IMapperBase > mapper, const TOperationOptions &options=TOperationOptions())
Run Map operation.
virtual IOperationPtr Sort(const TSortOperationSpec &spec, const TOperationOptions &options=TOperationOptions())=0
Run Sort operation.
virtual IOperationPtr Merge(const TMergeOperationSpec &spec, const TOperationOptions &options=TOperationOptions())=0
Run Merge operation.
virtual IOperationPtr RemoteCopy(const TRemoteCopyOperationSpec &spec, const TOperationOptions &options=TOperationOptions())=0
Run RemoteCopy operation.
virtual IOperationPtr Erase(const TEraseOperationSpec &spec, const TOperationOptions &options=TOperationOptions())=0
Run Erase operation.
IOperationPtr Reduce(::TIntrusivePtr< IReducerBase > reducer, const TOneOrMany< TStructuredTablePath > &input, const TOneOrMany< TStructuredTablePath > &output, const TSortColumns &reduceBy, const TReduceOperationSpec &spec=TReduceOperationSpec(), const TOperationOptions &options=TOperationOptions())
Run Reduce operation.
virtual IOperationPtr RawReduce(const TRawReduceOperationSpec &spec, ::TIntrusivePtr< IRawJob > rawJob, const TOperationOptions &options=TOperationOptions())=0
Run raw Reduce operation.
IOperationPtr MapReduce(const TMapReduceOperationSpec &spec, ::TIntrusivePtr< IMapperBase > mapper, ::TIntrusivePtr< IReducerBase > reduceCombiner, ::TIntrusivePtr< IReducerBase > reducer, const TOperationOptions &options=TOperationOptions())
Run MapReduce operation.
virtual void WaitForOperation(const TOperationId &operationId)=0
Wait for operation to finish.
virtual IOperationPtr RawMapReduce(const TRawMapReduceOperationSpec &spec, ::TIntrusivePtr< IRawJob > mapper, ::TIntrusivePtr< IRawJob > reduceCombiner, ::TIntrusivePtr< IRawJob > reducer, const TOperationOptions &options=TOperationOptions())=0
Run raw MapReduce operation.
IOperationPtr Map(::TIntrusivePtr< IMapperBase > mapper, const TOneOrMany< TStructuredTablePath > &input, const TOneOrMany< TStructuredTablePath > &output, const TMapOperationSpec &spec=TMapOperationSpec(), const TOperationOptions &options=TOperationOptions())
Run Map operation.
virtual IOperationPtr RawMap(const TRawMapOperationSpec &spec, ::TIntrusivePtr< IRawJob > rawJob, const TOperationOptions &options=TOperationOptions())=0
Run raw Map operation.
virtual EOperationBriefState CheckOperation(const TOperationId &operationId)=0
Check and return operation status.
IOperationPtr MapReduce(::TIntrusivePtr< IMapperBase > mapper, ::TIntrusivePtr< IReducerBase > reducer, const TOneOrMany< TStructuredTablePath > &input, const TOneOrMany< TStructuredTablePath > &output, const TSortColumns &reduceBy, TMapReduceOperationSpec spec=TMapReduceOperationSpec(), const TOperationOptions &options=TOperationOptions())
Run MapReduce operation.
virtual void AbortOperation(const TOperationId &operationId)=0
Abort operation.
IOperationPtr Sort(const TOneOrMany< TRichYPath > &input, const TRichYPath &output, const TSortColumns &sortBy, const TSortOperationSpec &spec=TSortOperationSpec(), const TOperationOptions &options=TOperationOptions())
Run Sort operation.
virtual IOperationPtr RunVanilla(const TVanillaOperationSpec &spec, const TOperationOptions &options=TOperationOptions())=0
Run Vanilla operation.
IOperationPtr MapReduce(::TIntrusivePtr< IMapperBase > mapper, ::TIntrusivePtr< IReducerBase > reduceCombiner, ::TIntrusivePtr< IReducerBase > reducer, const TOneOrMany< TStructuredTablePath > &input, const TOneOrMany< TStructuredTablePath > &output, const TSortColumns &reduceBy, TMapReduceOperationSpec spec=TMapReduceOperationSpec(), const TOperationOptions &options=TOperationOptions())
Run MapReduce operation.
Interface representing an operation.
Definition operation.h:3244
virtual void SuspendOperation(const TSuspendOperationOptions &options=TSuspendOperationOptions())=0
Suspend operation.
virtual void ResumeOperation(const TResumeOperationOptions &options=TResumeOperationOptions())=0
Resume previously suspended operation.
virtual TListJobsResult ListJobs(const TListJobsOptions &options=TListJobsOptions())=0
virtual TJobAttributes GetJob(const TJobId &jobId, const TGetJobOptions &options=TGetJobOptions())=0
Get job attributes.
virtual void CompleteOperation()=0
Complete operation.
virtual bool IsStarted() const =0
Is the operation started.
virtual ::NThreading::TFuture< void > Watch()=0
Start watching operation.
virtual TString GetWebInterfaceUrl() const =0
Get URL of the operation in YT Web UI.
virtual TVector< TFailedJobInfo > GetFailedJobInfo(const TGetFailedJobInfoOptions &options=TGetFailedJobInfoOptions())=0
Get information about failed jobs.
virtual void Start()=0
Start operation synchronously.
virtual const TOperationId & GetId() const =0
Get operation id.
virtual ::NThreading::TFuture< void > GetPreparedFuture()=0
Get preparation future.
virtual EOperationBriefState GetBriefState()=0
Get operation brief state.
virtual void AbortOperation()=0
Abort operation.
virtual void UpdateParameters(const TUpdateOperationParametersOptions &options=TUpdateOperationParametersOptions())=0
Update operation runtime parameters.
virtual TMaybe< TYtError > GetError()=0
Get error (if operation has failed).
virtual TString GetStatus() const =0
Get last error for not started operations. Get state on YT cluster for started operations.
virtual TMaybe< TOperationBriefProgress > GetBriefProgress()=0
virtual ::NThreading::TFuture< void > GetStartedFuture()=0
Get start future.
virtual TOperationAttributes GetAttributes(const TGetOperationOptions &options=TGetOperationOptions())=0
Get operation attributes.
virtual TMaybe< THashMap< TString, TYtError > > GetAlerts()=0
Get operation alerts.
virtual TJobStatistics GetJobStatistics()=0
Get job statistics.
Definition operation.h:653
TSelf & MD5CheckSum(TString)
MD5 checksum of uploaded file.
TSelf & PathInJob(TString)
Path by which job will see the uploaded file.
TSelf & BypassArtifactCache(bool)
Do not put file into node cache.
Description of a core dump that happened in the job.
Definition operation.h:3024
Specification of a disk that will be available in job.
Definition operation.h:731
TSelf & MediumName(TString)
Name of the medium corresponding to required disk type.
TSelf & DiskSpace(i64)
Required disk space in bytes.
TSelf & InodeCount(i64)
Limit for inodes.
Spec of Erase operation.
Definition operation.h:1367
TSelf & CombineChunks(bool)
Combine output chunks to larger ones.
TSelf & SchemaInferenceMode(ESchemaInferenceMode)
Inference mode for output table schema.
TSelf & TablePath(TRichYPath)
Which table (or row range) to erase.
Options for NYT::IOperation::GetFailedJobInfo.
Definition operation.h:3168
TSelf & StderrTailSize(ui64)
How much of stderr tail should be downloaded.
TSelf & MaxJobCount(ui64)
How many jobs to download. Which jobs will be chosen is undefined.
Options for NYT::IClient::GetJobFailContext.
Definition operation.h:3148
Options for NYT::IClient::GetJob.
Definition operation.h:3126
TSelf & AttributeFilter(TJobAttributeFilter)
Return only requested job attributes.
Options for NYT::IClient::GetJobStderr.
Definition operation.h:3157
Options for NYT::IClient::GetJobTrace.
Definition operation.h:3187
TSelf & ToTime(TInstant)
Search for traces with time <= ToTime.
TSelf & FromTime(TInstant)
Search for traces with time >= FromTime.
TSelf & JobId(TJobId)
Id of the job.
TSelf & TraceId(TJobTraceId)
Id of the trace.
Options for NYT::IClient::GetOperation call.
Definition operation.h:2393
TSelf & AttributeFilter(TOperationAttributeFilter)
What attributes to request (if omitted, the default set of attributes will be requested).
A class that specifies which attributes to request when using NYT::IClient::GetJob or NYT::IClient::L...
Definition operation.h:2890
TSelf & Add(EJobAttribute attribute)
Add attribute to the filter. Calls are supposed to be chained.
Definition operation.h:2899
Job attributes.
Definition operation.h:3038
TMaybe< TYtError > Error
Error for a unsuccessfully finished job.
Definition operation.h:3077
TMaybe< double > Progress
Estimated ratio of job's completed work.
Definition operation.h:3069
TMaybe< EJobType > Type
Job type.
Definition operation.h:3045
TMaybe< TInstant > FinishTime
Job finish time (for a finished job).
Definition operation.h:3065
TMaybe< TJobId > Id
Job id.
Definition operation.h:3041
TMaybe< TNode > BriefStatistics
Job brief statistics.
Definition operation.h:3081
TMaybe< TNode > ExecAttributes
Job exec attributes.
Definition operation.h:3093
TMaybe< TString > Address
Address of a cluster node where job was running.
Definition operation.h:3053
TMaybe< EJobState > State
Job state.
Definition operation.h:3049
TMaybe< TInstant > StartTime
Job start time.
Definition operation.h:3061
TMaybe< TVector< TCoreInfo > > CoreInfos
Infos for core dumps produced by job.
Definition operation.h:3089
TMaybe< i64 > StderrSize
Size of saved job stderr.
Definition operation.h:3073
TMaybe< TString > TaskName
The name of the task that job corresponds to.
Definition operation.h:3057
TMaybe< TVector< TRichYPath > > InputPaths
Job input paths (with ranges).
Definition operation.h:3085
TMaybe< ui64 > Cookie
Job cookie.
Definition operation.h:3097
Tag class marking that binary from specified Cypress path should be used in operation.
Definition operation.h:136
Tag class marking that current binary should be used in operation.
Definition operation.h:125
Tag class marking that binary from specified local path should be used in operation.
Definition operation.h:129
Specifies a job profiler.
Definition operation.h:705
TSelf & ProfilerType(EProfilerType)
Type of the profiler.
TSelf & SamplingFrequency(int)
For sampling profilers, sets the number of samples per second.
TSelf & ProfilingBinary(EProfilingBinary)
Binary to profile.
TSelf & ProfilingProbability(double)
Probability of the job being selected for profiling.
Response for NYT::IOperation::GetJobTrace.
Definition operation.h:3212
TOperationId OperationId
Id of the operation.
Definition operation.h:3215
TJobId JobId
Id of the job.
Definition operation.h:3219
TJobTraceId TraceId
Id of the trace.
Definition operation.h:3223
TInstant EventTime
Time of the event.
Definition operation.h:3235
i64 EventIndex
Index of the trace event.
Definition operation.h:3227
std::string Event
Raw event in json format.
Definition operation.h:3231
Spec of JoinReduce operation.
Definition operation.h:1053
TSelf & JoinBy(TSortColumns)
Columns to join foreign tables by (must be prefix of ReduceBy).
TSelf & DataSizePerJob(ui64)
Recommended number of jobs to run.
TSelf & ReducerSpec(TUserJobSpec)
Spec of reduce job.
Spec of JoinReduce operation.
Definition operation.h:1094
Options for NYT::IClient::ListJobs.
Definition operation.h:2911
TSelf & Address(TString)
Address of the cluster node where job was running.
TSelf & WithFailContext(bool)
Return only jobs whose fail context has been saved.
TSelf & AttributeFilter(TJobAttributeFilter)
Return only requested job attributes.
TSelf & WithSpec(bool)
Return only jobs whose spec has been saved.
TSelf & SortOrder(ESortOrder)
Sort order.
TSelf & WithStderr(bool)
Return only jobs whose stderr has been saved.
TSelf & ContinuationToken(TString)
Search for jobs with filters encoded in token.
TSelf & ToTime(TInstant)
Search for jobs with start time <= ToTime.
TSelf & WithInterruptionInfo(bool)
Return only jobs with interruption info.
TSelf & Type(EJobType)
Job type.
TSelf & OperationIncarnation(TString)
Return only jobs with given operation incarnation.
TSelf & Offset(i64)
Data source.
TSelf & SortField(EJobSortField)
Sort by this field.
TSelf & MonitoringDescriptor(TString)
Return only jobs with given monitoring descriptor.
TSelf & State(EJobState)
Job state.
TSelf & FromTime(TInstant)
Search for jobs with start time >= FromTime.
TSelf & WithMonitoringDescriptor(bool)
Return only jobs with monitoring descriptor.
Response for NYT::IOperation::ListJobs.
Definition operation.h:3103
TMaybe< i64 > ArchiveJobCount
Number of jobs retrieved from archive.
Definition operation.h:3118
TVector< TJobAttributes > Jobs
Jobs.
Definition operation.h:3106
TMaybe< i64 > ControllerAgentJobCount
Number of jobs retrieved from controller agent.
Definition operation.h:3114
TMaybe< i64 > CypressJobCount
Definition operation.h:3110
Options of NYT::IClient::ListOperations command.
Definition operation.h:2599
TSelf & WithFailedJobs(bool)
Choose operations having (or not having) any failed jobs.
TSelf & Limit(i64)
Return no more than Limit operations (current default and maximum value is 1000).
TSelf & ToTime(TInstant)
Search for operations with start time < ToTime.
TSelf & CursorDirection(ECursorDirection)
Direction of pagination (see NYT::TListOperationsOptions::CursorTime).
TSelf & IncludeArchive(bool)
Search for operations in the archive in addition to Cypress.
TSelf & State(EOperationState)
Choose operations with given NYT::TOperationAttributes::State.
TSelf & Type(EOperationType)
Choose operations with given NYT::TOperationAttributes::Type.
TSelf & Filter(TString)
Search for Filter as a substring in operation text factors (e.g. title or input/output table paths).
TSelf & User(TString)
Choose operations with given NYT::TOperationAttributes::AuthenticatedUser.
TSelf & FromTime(TInstant)
Search for operations with start time >= FromTime.
TSelf & IncludeCounters(bool)
Include the counters for different filter parameters in the response.
TSelf & CursorTime(TInstant)
Additional restriction on operation start time (useful for pagination).
TSelf & Pool(TString)
Choose operations whose pools include Pool.
Response for NYT::IClient::ListOperations command.
Definition operation.h:2684
TMaybe< THashMap< TString, i64 > > StateCounts
Number of operations for each state (subject to previous filters).
Definition operation.h:2712
TMaybe< THashMap< TString, i64 > > UserCounts
Number of operations for each user (subject to previous filters).
Definition operation.h:2708
bool Incomplete
Whether some operations were not returned due to NYT::TListOperationsOptions::Limit.
Definition operation.h:2731
TMaybe< i64 > WithFailedJobsCount
Number of operations having failed jobs (subject to all previous filters).
Definition operation.h:2720
TVector< TOperationAttributes > Operations
Found operations' attributes.
Definition operation.h:2687
TMaybe< THashMap< EOperationType, i64 > > TypeCounts
Number of operations for each type (subject to previous filters).
Definition operation.h:2716
TMaybe< THashMap< TString, i64 > > PoolCounts
Number of operations for each pool.
Definition operation.h:2704
Spec of Map operation.
Definition operation.h:918
TSelf & DataSizePerJob(ui64)
Recommended number of jobs to run.
TSelf & Ordered(bool)
Whether to guarantee the order of rows passed to mapper matches the order in the table.
TSelf & MapperSpec(TUserJobSpec)
Spec of mapper job.
Spec of Map operation.
Definition operation.h:959
Spec of MapReduce operation.
Definition operation.h:1117
TSelf & ReduceCombinerSpec(TUserJobSpec)
Spec of reduce combiner.
TSelf & ReduceBy(TSortColumns)
Columns to group rows by.
TSelf & IntermediateDataReplicationFactor(ui64)
Replication factor for intermediate data (1 by default).
TSelf & PartitionCount(ui64)
Recommended number of intermediate data partitions.
TSelf & SortBy(TSortColumns)
Columns to sort rows by (must include ReduceBy as prefix).
TSelf & ReducerSpec(TUserJobSpec)
Spec of reduce job.
TSelf & DataSizePerSortJob(ui64)
Recommended size of data to be passed to a single reduce combiner.
TSelf & MapperSpec(TUserJobSpec)
Spec of map job.
TSelf & ForceReduceCombiners(bool)
Guarantee to run reduce combiner before reducer.
TSelf & DataSizePerMapJob(ui64)
Recommended number of map jobs to run.
TSelf & IntermediateDataAccount(TString)
Account to use for intermediate data.
TSelf & Ordered(bool)
Whether to guarantee the order of rows passed to mapper matches the order in the table.
TSelf & PartitionDataSize(ui64)
Recommended size of intermediate data partitions.
Spec of MapReduce operation.
Definition operation.h:1195
TSelf & MapperFormatHints(TUserJobFormatHints)
Format hints for mapper.
TSelf & ReduceCombinerFormatHints(TUserJobFormatHints)
Format hints for reduce combiner.
TSelf & ReducerFormatHints(TUserJobFormatHints)
Format hints for reducer.
Spec of Merge operation.
Definition operation.h:1311
TSelf & SchemaInferenceMode(ESchemaInferenceMode)
Inference mode for output table schema.
TSelf & CombineChunks(bool)
Combine output chunks to larger ones.
TSelf & ForceTransform(bool)
Guarantee that all input chunks will be read.
TSelf & Output(TRichYPath)
Path to output table.
TSelf & Mode(EMergeMode)
Merge mode.
FLUENT_VECTOR_FIELD(TRichYPath, Input)
Paths to input tables.
TSelf & DataSizePerJob(ui64)
Recommended number of jobs to run.
TSelf & MergeBy(TSortColumns)
Columns by which to merge (for NYT::EMergeMode::MM_SORTED).
Convenience class that keeps sequence of items.
Definition common.h:280
Class describing which attributes to request in NYT::IClient::GetOperation or NYT::IClient::ListOpera...
Definition operation.h:2374
TSelf & Add(EOperationAttribute attribute)
Add attribute to the filter. Calls are supposed to be chained.
Definition operation.h:2383
Operation info.
Definition operation.h:2516
TMaybe< TOperationId > Id
Operation id.
Definition operation.h:2519
TMaybe< TVector< TOperationEvent > > Events
List of operation events (changes of state).
Definition operation.h:2579
TMaybe< THashMap< TString, TYtError > > Alerts
Map from alert name to its description.
Definition operation.h:2583
TMaybe< EOperationType > Type
Operation type.
Definition operation.h:2523
TMaybe< TNode > Spec
Spec of the operation as provided by the user.
Definition operation.h:2555
TMaybe< TNode > BriefSpec
Brief spec of operation (light-weight fields only).
Definition operation.h:2551
TMaybe< bool > Suspended
Is operation suspended.
Definition operation.h:2567
TMaybe< TInstant > StartTime
Operation start time.
Definition operation.h:2539
TMaybe< TOperationBriefProgress > BriefProgress
Brief progress of the operation.
Definition operation.h:2547
TMaybe< TOperationResult > Result
Operation result.
Definition operation.h:2571
TMaybe< TNode > UnrecognizedSpec
Fields not recognized by scheduler.
Definition operation.h:2563
TMaybe< TInstant > FinishTime
Operation finish time (if the operation has finished).
Definition operation.h:2543
TMaybe< EOperationBriefState > BriefState
"Coarse-grained" operation state.
Definition operation.h:2531
TMaybe< TOperationProgress > Progress
Operation progress.
Definition operation.h:2575
TMaybe< TString > State
Operation state.
Definition operation.h:2527
TMaybe< TString > AuthenticatedUser
Name of user that started the operation.
Definition operation.h:2535
TMaybe< TNode > FullSpec
Full spec of operation (all fields not specified by user are filled with default values).
Definition operation.h:2559
Brief operation progress (numbers of jobs in these states).
Definition operation.h:2477
Operation event (change of state).
Definition operation.h:2499
TString State
New state of operation.
Definition operation.h:2502
TInstant Time
Time of state change.
Definition operation.h:2506
Base spec for operations with inputs and outputs.
Definition operation.h:471
Base spec for operations with inputs and outputs.
Definition operation.h:478
Options for NYT::IOperationClient::Map and other operation start commands.
Definition operation.h:1511
TSelf & StartOperationMode(EStartOperationMode)
Start operation mode.
TSelf & FileExpirationTimeout(TDuration)
Expiration timeout for uploaded files.
TSelf & MinJobStateSizeToPassViaFile(i64)
If job state size is less than specified value, job state will be passed via environment variable in ...
TSelf & FileStorageTransactionId(TTransactionId)
Id of transaction within which all Cypress file storage entries will be checked/created.
EStartOperationMode
Start operation mode.
Definition operation.h:1523
@ AsyncStart
Prepare and start operation asynchronously. Don't wait for operation completion.
Definition operation.h:1530
@ SyncWait
Prepare, start and wait for operation completion synchronously.
Definition operation.h:1538
@ AsyncPrepare
Prepare operation asynchronously. Call IOperation::Start() to start operation.
Definition operation.h:1526
@ SyncStart
Prepare and start operation synchronously. Don't wait for operation completion.
Definition operation.h:1534
TSelf & CreateDebugOutputTables(bool)
Ensure stderr and core tables exist before starting operation.
TSelf & Wait(bool value)
Wait for operation finish synchronously.
Definition operation.h:1549
EFileCacheMode
File cache mode.
Definition operation.h:1602
@ CachelessRandomPathUpload
Upload files to random paths inside NYT::TOperationOptions::FileStorage without caching.
Definition operation.h:1609
@ ApiCommandBased
Use YT API commands "get_file_from_cache" and "put_file_to_cache".
Definition operation.h:1605
TSelf & JobCommandSuffix(TString)
Suffix for bash command running the jobs.
TSelf & InferOutputSchema(bool)
Try to infer schema of inexistent table from the type of written rows.
TSelf & Spec(TNode)
Additional field to put to operation spec.
TSelf & FileCacheMode(EFileCacheMode)
File cache mode.
TSelf & JobCommandPrefix(TString)
Prefix for bash command running the jobs.
TSelf & SecureVault(TNode)
Info to be passed securely to the job.
TSelf & CreateOutputTables(bool)
Ensure output tables exist before starting operation.
TSelf & MountSandboxInTmpfs(bool)
Put all files required by the job into tmpfs.
TSelf & FileStorage(TString)
Path to directory to store temporary files. Useful if you want to control how lifetime of uploaded fi...
TSelf & UseTableFormats(bool)
Use format from table attribute (for YAMR-like format).
Operation progress.
Definition operation.h:2460
TMaybe< TInstant > BuildTime
Time when this progress was built on scheduler or CA.
Definition operation.h:2471
TJobStatistics JobStatistics
Total job statistics.
Definition operation.h:2463
TJobCounters JobCounters
Job counter for various job states with hierarchy.
Definition operation.h:2467
Operation result.
Definition operation.h:2490
TMaybe< TYtError > Error
For a unsuccessfully finished operation: description of error.
Definition operation.h:2493
Base spec for all operations.
Definition operation.h:515
TSelf & Weight(double)
Weight of operation.
TSelf & Alias(TString)
Alias for searching for an operation in the future.
TSelf & Pool(TString)
Pool to be used for this operation.
TSelf & MaxFailedJobCount(ui64)
How many jobs can fail before operation is failed.
FLUENT_FIELD_OPTION_ENCAPSULATED(TSchedulerResources, ResourceLimits)
How much resources can be consumed by operation.
FLUENT_OPTIONAL_VECTOR_FIELD_ENCAPSULATED(TString, PoolTree)
Pool tree list that operation will use.
TSelf & Title(TString)
Title to be shown in web interface.
TSelf & TimeLimit(TDuration)
Limit on operation execution time.
Tag class marking that row stream consists of protobuf rows of given type.
Definition operation.h:106
const ::google::protobuf::Descriptor * Descriptor
Descriptor of the protobuf type of table rows.
Definition operation.h:110
Tag class marking that table rows have protobuf type.
Definition operation.h:37
const ::google::protobuf::Descriptor * Descriptor
Descriptor of the protobuf type of table rows.
Definition operation.h:42
Spec of raw JoinReduce operation.
Definition operation.h:1106
Spec of raw Map operation.
Definition operation.h:968
Spec of raw MapReduce operation.
Definition operation.h:1220
Spec of raw Reduce operation.
Definition operation.h:1039
Spec of Reduce operation.
Definition operation.h:980
TSelf & JoinBy(TSortColumns)
Columns to join foreign tables by (must be prefix of ReduceBy).
TSelf & ReduceBy(TSortColumns)
Columns to group rows by.
TSelf & ReducerSpec(TUserJobSpec)
Spec of reduce job.
TSelf & EnableKeyGuarantee(bool)
Guarantee to feed all rows with same ReduceBy columns to a single job (true by default).
TSelf & DataSizePerJob(ui64)
Recommended number of jobs to run.
TSelf & SortBy(TSortColumns)
Columns to sort rows by (must include ReduceBy as prefix).
Spec of Reduce operation.
Definition operation.h:1030
Spec of RemoteCopy operation.
Definition operation.h:1393
FLUENT_VECTOR_FIELD(TString, AttributeKey)
Names of user attributes to copy from input to output table.
TSelf & ClusterName(TString)
Source cluster name.
TSelf & NetworkName(TString)
Network to use for copy (all remote cluster nodes must have it configured).
TSelf & Output(TRichYPath)
Path to output table.
TSelf & CopyAttributes(bool)
Copy user attributes from input to output table (allowed only for single input table).
TSelf & SchemaInferenceMode(ESchemaInferenceMode)
Inference mode for output table schema.
FLUENT_VECTOR_FIELD(TRichYPath, Input)
Paths to input tables.
Options for NYT::IOperation::ResumeOperation.
Definition client_method_options.h:493
Path with additional attributes.
Definition common.h:1040
Base spec for IO in "simple" raw operations (Map, Reduce etc.).
Definition operation.h:319
Spec of Sort operation.
Definition operation.h:1241
TSelf & IntermediateDataReplicationFactor(ui64)
Replication factor for intermediate data (1 by default).
TSelf & PartitionCount(ui64)
Recommended number of intermediate data partitions.
TSelf & PartitionDataSize(ui64)
Recommended size of intermediate data partitions.
TSelf & SortBy(TSortColumns)
Columns to sort table by.
TSelf & IntermediateDataAccount(TString)
Account to use for intermediate data.
TSelf & DataSizePerPartitionJob(ui64)
Recommended number of partition jobs to run.
TSelf & Output(TRichYPath)
Path to output table.
TSelf & SchemaInferenceMode(ESchemaInferenceMode)
Inference mode for output table schema.
FLUENT_VECTOR_FIELD(TRichYPath, Input)
Paths to input tables.
Table path marked with NYT::TTableStructure tag.
Definition operation.h:57
Options for NYT::IOperation::SuspendOperation.
Definition client_method_options.h:469
Tag class marking that row stream consists of NYT::TNode.
Definition operation.h:98
Tag class marking that row stream consists of NYT::TYaMRRow.
Definition operation.h:102
Tag class marking that the row type for table is not specified.
Definition operation.h:33
Options for NYT::IOperation::UpdateParameters.
Definition client_method_options.h:504
Spec of user job.
Definition operation.h:757
FLUENT_MAP_FIELD(TString, TString, Environment)
Map of environment variables that will be set for jobs.
TSelf & CpuLimit(double)
Maximum number of CPU cores for a single job to use.
TVector< std::tuple< TLocalFilePath, TAddLocalFileOptions > > GetLocalFiles() const
Get the list of all added local files.
TSelf & EnableRpcProxyInJobProxy(bool)
Activates the RPC proxy within the job proxy.
TSelf & MemoryReserveFactor(double)
Fraction of NYT::TUserJobSpec::MemoryLimit that job gets at start.
const TJobBinaryConfig & GetJobBinary() const
Get job binary config.
TSelf & JobCommandPrefix(TString)
String that will be prepended to the command.
TSelf & JobCommandSuffix(TString)
String that will be appended to the command.
FLUENT_VECTOR_FIELD(TYPath, Layer)
Porto layers to use in the job. Layers are listed from top to bottom.
TSelf & DockerImage(TString)
Docker image to use in the job.
TSelf & PortCount(ui16)
Number of ports reserved for the job (passed through environment in YT_PORT_0, YT_PORT_1,...
FLUENT_VECTOR_FIELD(TJobProfilerSpec, JobProfiler)
List of profilers to run.
TSelf & DiskRequest(TDiskRequest)
Specification of a disk required for job.
TSelf & ExtraTmpfsSize(i64)
Size of data that is going to be written to tmpfs.
TSelf & NetworkProject(TString)
Network project used to isolate job network.
TSelf & DiskSpaceLimit(ui64)
Limit for all files inside job sandbox (in bytes).
TSelf & JobTimeLimit(TDuration)
Limit on job execution time.
TUserJobSpec & JobBinaryLocalPath(TString path, TMaybe< TString > md5=Nothing())
Local path to executable to be used inside jobs.
TSelf & AddLocalFile(const TLocalFilePath &path, const TAddLocalFileOptions &options=TAddLocalFileOptions())
Specify a local file to upload to Cypress and prepare for use in job.
TUserJobSpec & JobBinaryCypressPath(TString path, TMaybe< TTransactionId > transactionId=Nothing())
Cypress path to executable to be used inside jobs.
FLUENT_VECTOR_FIELD(TRichYPath, File)
Paths to files in Cypress to use in job.
TSelf & MemoryLimit(i64)
MemoryLimit specifies how much memory job process can use.
Base spec for all operations with user jobs.
Definition operation.h:561
TSelf & CoreTablePath(TYPath)
Table to save coredumps of operation.
TSelf & WaitingJobTimeout(TDuration)
How long should the scheduler wait for the job to be started on a node.
TSelf & FailOnJobRestart(bool)
On any unsuccessful job completion (i.e. abortion or failure) force the whole operation to fail.
TSelf & StderrTablePath(TYPath)
Table to save whole stderr of operation.
Spec of Vanilla operation.
Definition operation.h:1496
FLUENT_VECTOR_FIELD(TVanillaTask, Task)
Description of tasks to run in this operation.
Task of Vanilla operation.
Definition operation.h:1446
TSelf & Name(TString)
Task name.
TSelf & Job(::TIntrusivePtr< IVanillaJobBase >)
Job to be executed in this task.
TSelf & JobCount(ui64)
Number of jobs to run and wait for successful completion.
TSelf & NetworkProject(TMaybe< TString >)
Network project name.
TSelf & AddOutput(const TRichYPath &path)
Add output table path and specify the task output type (i.e. TMyProtoMessage).
TSelf & AddStructuredOutput(TStructuredTablePath path)
Add output table path as structured path.
TSelf & Spec(TUserJobSpec)
User job spec.
TSelf & SetOutput(size_t tableIndex, const TRichYPath &path)
Set output table path and specify the task output type (i.e. TMyProtoMessage).
Tag class marking that row stream is empty.
Definition operation.h:94