12#include "retry_policy.h"
14#include <util/datetime/base.h>
33 NT_REPLICATED_TABLE = 10 ,
34 NT_TABLE_REPLICA = 11 ,
36 NT_SCHEDULER_POOL = 13 ,
40 NT_CHAOS_TABLE_REPLICA = 17 ,
41 NT_TABLE_COLLOCATION = 18 ,
55template <
typename TDerived>
59 using TSelf = TDerived;
80 FLUENT_FIELD_OPTION(TYPath,
Path);
87template <
typename TDerived>
91 using TSelf = TDerived;
99template <
typename TDerived>
103 using TSelf = TDerived;
114template <
typename TDerived>
151 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
175 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
179template <
typename TDerived>
183 using TSelf = TDerived;
247 FLUENT_FIELD_OPTION(
bool, Force);
285 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
309 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
336 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
359 FLUENT_FIELD_DEFAULT(
int, MaxBatchSize, 20);
384 FLUENT_FIELD_DEFAULT(i64,
PartSize, 4 * 1024 * 1024);
408 FLUENT_FIELD_OPTION(
double,
Cpu);
431 FLUENT_FIELD_OPTION(TString,
Pool);
444struct TSchedulingOptionsPerPoolTree
447 using TSelf = TSchedulingOptionsPerPoolTree;
450 TSchedulingOptionsPerPoolTree(
const THashMap<TString, TSchedulingOptions>& options = {})
457 Y_ENSURE(Options_.emplace(poolTreeName, schedulingOptions).second);
461 THashMap<TString, TSchedulingOptions> Options_;
483 FLUENT_FIELD_OPTION(std::optional<TString>,
Reason);
513 FLUENT_FIELD_OPTION(TString,
Pool);
529template <
class TDerived>
533 using TSelf = TDerived;
891 FLUENT_FIELD_DEFAULT(
bool, PingAncestors,
false);
918 FLUENT_FIELD_OPTION(TString,
Title);
994 FLUENT_FIELD_DEFAULT(
bool, Waitable,
false);
1036template <
class TDerived>
1040 using TSelf = TDerived;
1080 FLUENT_FIELD_DEFAULT(
bool,
Force,
false);
1207 FLUENT_FIELD_DEFAULT(
bool, EnableCodeCache,
true);
1273 FLUENT_FIELD_DEFAULT(TConfigPtr,
Config,
nullptr);
1305 FLUENT_FIELD_OPTION(ui64, BatchPartMaxSize);
1365template <
typename TDerived>
1369 using TSelf = TDerived;
1407 FLUENT_FIELD_OPTION(
bool, Update);
1415 FLUENT_FIELD_OPTION(
bool, Aggregate);
1471 FLUENT_FIELD_OPTION(
bool, Enabled);
1720 FLUENT_FIELD_OPTION(TString,
Pool);
Options that control which control attributes (like row_index) are added to rows during read.
Definition client_method_options.h:762
TSelf & EnableRangeIndex(bool)
Whether to add "range_index" attribute to rows read.
TSelf & EnableRowIndex(bool)
Whether to add "row_index" attribute to rows read.
Definition client_method_options.h:680
TSelf & Attributes(TNode)
Library doesn't interpret it, only pass it to CreateSkiffParser<...>() and GetSkiffSchema<....
TSelf & TableIndex(int)
Index of table in parallel table reader.
Description of table schema.
Definition common.h:771
Main namespace of YT client.
Definition abortable_stream.h:7
EAtomicity
Atomicity mode.
Definition client_method_options.h:1328
@ None
Transactions are non atomic (might reduce latency of write requests).
Definition client_method_options.h:1330
@ Full
Transactions are atomic (default).
Definition client_method_options.h:1333
EPermission
Definition client_method_options.h:1514
@ Remove
Applies to: all objects.
Definition client_method_options.h:1531
@ Administer
Applies to: all objects.
Definition client_method_options.h:1525
@ Write
Applies to: all objects.
Definition client_method_options.h:1519
@ Manage
Applies to: operations.
Definition client_method_options.h:1537
@ Create
Applies to: schemas.
Definition client_method_options.h:1528
@ FullRead
Applies to: tables.
Definition client_method_options.h:1540
@ Read
Applies to: all objects.
Definition client_method_options.h:1516
@ Use
Applies to: accounts / pools.
Definition client_method_options.h:1522
@ Mount
Applies to: tables.
Definition client_method_options.h:1534
ESecurityAction
Whether permission is granted or denied.
Definition client_method_options.h:1545
@ Deny
Permission is denied.
Definition client_method_options.h:1550
@ Allow
Permission is granted.
Definition client_method_options.h:1547
EMasterReadKind
Enumeration for specifying how reading from master is performed.
Definition common.h:1416
EComplexTypeMode
Mode of composite type representation in yson.
Definition client_method_options.h:49
ETablePartitionMode
Table partitioning mode.
Definition client_method_options.h:1610
@ Ordered
The order of table ranges inside each partition obey the order of input tables and their chunk orders...
Definition client_method_options.h:1619
@ Unordered
Ignores the order of input tables and their chunk and sorting orders.
Definition client_method_options.h:1614
ELockType
Row lock type used by modify-rows commands.
Definition client_method_options.h:1354
@ Exclusive
Exclusive write lock on the row (default for modify-rows commands).
Definition client_method_options.h:1356
@ SharedWrite
Definition client_method_options.h:1361
EColumnarStatisticsFetcherMode
Columnar statistics fetching mode.
Definition client_method_options.h:1572
@ FromMaster
Fast mode for fetching lightweight columnar statistics.
Definition client_method_options.h:1582
@ Fallback
Use lightweight columnar statistics (FromMaster) if available otherwise switch to slow but precise mo...
Definition client_method_options.h:1585
@ FromNodes
Slow mode for fetching precise columnar statistics.
Definition client_method_options.h:1574
ENodeType
Type of the cypress node.
Definition client_method_options.h:22
ELockMode
Type of the lock.
Definition client_method_options.h:960
@ LM_SNAPSHOT
Snapshot lock.
Definition client_method_options.h:968
@ LM_SHARED
Shared lock.
Definition client_method_options.h:965
@ LM_EXCLUSIVE
Exclusive lock.
Definition client_method_options.h:962
ETableReplicaMode
Table replica mode.
Definition client_method_options.h:1341
EDurability
Durability mode.
Definition client_method_options.h:1314
@ Async
Async mode (might reduce latency of write requests, but less reliable).
Definition client_method_options.h:1319
@ Sync
Sync mode (default).
Definition client_method_options.h:1316
Options for NYT::IClient::AlterTable.
Definition client_method_options.h:1120
TSelf & Dynamic(bool)
Alter table between static and dynamic mode.
TSelf & Schema(TTableSchema)
Change table schema.
TSelf & UpstreamReplicaId(TReplicaId)
Changes id of upstream replica on metacluster.
Options for NYT::IClient::AlterTableReplica.
Definition client_method_options.h:1462
TSelf & Mode(ETableReplicaMode)
Whether to enable or disable replica.
Options for attaching transaction.
Definition client_method_options.h:932
TSelf & AbortOnTermination(bool)
Abort transaction on program termination.
TSelf & AutoPingable(bool)
Ping transaction automatically.
List of attributes to retrieve in operations like NYT::ICypressClient::Get.
Definition common.h:1389
Options for NYT::IIOClient::CreateBlobTableReader.
Definition client_method_options.h:368
TSelf & PartIndexColumnName(TString)
Name of the part index column. By default it is "part_index".
TSelf & DataColumnName(TString)
Name of the data column. By default it is "data".
TSelf & StartPartIndex(i64)
Part index from which to start reading.
TSelf & PartSize(i64)
Size of each part.
TSelf & Offset(i64)
Offset from which to start reading.
Options for NYT::IClient::CheckClusterLiveness.
Definition client_method_options.h:1728
TSelf & CheckSecondaryMasterCells(bool)
Check secondary master.
TSelf & CheckTabletCellBundle(TString)
Check the given tablet cell bundle's health.
TSelf & CheckCypressRoot(bool)
Check primary master.
Options for NYT::IClient::CheckPermission.
Definition client_method_options.h:1558
FLUENT_VECTOR_FIELD(TString, Column)
Columns to check permission to (for tables only).
Options for NYT::ITransaction::Commit.
Definition client_method_options.h:1029
Options for NYT::ICypressClient::Concatenate.
Definition client_method_options.h:347
TSelf & Append(bool)
Whether we should append to destination or rewrite it.
Options for NYT::ICypressClient::Copy.
Definition client_method_options.h:276
TSelf & PreserveAccount(bool)
Whether to preserves account of source node.
TSelf & PreserveExpirationTime(bool)
Whether to preserve expiration_time attribute of source node.
TSelf & Force(bool)
Allows to use existing node as destination, it will be overwritten.
TSelf & Recursive(bool)
Create missing directories in destination path if required.
Options for NYT::CreateClient;.
Definition client_method_options.h:1212
TSelf & ProxyAddress(TString)
Proxy Address to be used for connection.
TSelf & Config(TConfigPtr)
Override global config for the client.
TSelf & UseTLS(bool)
Use HTTPs (use HTTP client from yt/yt/core always).
TSelf & TvmOnly(bool)
Use tvm-only endpoints in cluster connection.
TSelf & Token(TString)
User token.
NAuth::IServiceTicketAuthPtrWrapperPtr ServiceTicketAuth_
TVM service ticket producer.
Definition client_method_options.h:1247
TSelf & TokenPath(TString)
Path to the file where user token is stored.
TSelf & RetryConfigProvider(IRetryConfigProviderPtr)
RetryConfig provider allows to fine tune request retries.
TSelf & UseCoreHttpClient(bool)
Use HTTP client from yt/yt/core.
TSelf & ImpersonationUser(TString)
Impersonated user name.
TSelf & JobProxySocketPath(TString)
Job proxy unix domain socket used for connection. Typically you will need this option when the RPC pr...
Options for NYT::ICypressClient::Create.
Definition client_method_options.h:126
TSelf & Recursive(bool)
Create missing parent directories if required.
TSelf & Attributes(TNode)
Set node attributes.
TSelf & Force(bool)
Recreate node if it exists.
TSelf & IgnoreTypeMismatch(bool)
Ignore type mismatch with existing node.
TSelf & IgnoreExisting(bool)
Do not raise error if node already exists.
Options for NYT::IClient::DeleteRows.
Definition client_method_options.h:1439
TSelf & RequireSyncReplica(bool)
Whether to fail when deleting from table without sync replica.
Options for NYT::IBatchRequest::ExecuteBatch.
Definition client_method_options.h:1288
TSelf & Concurrency(ui64)
How many requests will be executed in parallel on the cluster.
Options for NYT::ICypressClient::Exists.
Definition client_method_options.h:198
Options for writing file fragment in distributed session.
Definition client_method_options.h:677
Options for NYT::IClient::CreateFilePartitionReader.
Definition client_method_options.h:585
TSelf & Config(TNode)
Advanced options for reader, see NYT::TIOOptions::Config.
Options for reading file from YT.
Definition client_method_options.h:569
TSelf & Length(i64)
Maximum length to read.
TSelf & Offset(i64)
Offset to start reading from.
Options for writing file.
Definition client_method_options.h:647
TSelf & WriterOptions(TWriterOptions)
Options to control how YT server side writes data.
TSelf & ComputeMD5(bool)
Whether to compute MD5 sum of written file.
TSelf & AutoFinish(bool)
Wheter to call Finish automatically in writer destructor.
Options for NYT::IClient::FreezeTable.
Definition client_method_options.h:1105
Options for NYT::IClient::GetFileFromCache.
Definition client_method_options.h:1487
Options for NYT::IClient::GetFilePartitions.
Definition client_method_options.h:1677
TSelf & FetchCookieNodeDescriptors(bool)
Enable partition node descriptors serialization in cookie.
Options for NYT::ICypressClient::Get.
Definition client_method_options.h:208
TSelf & AttributeFilter(TAttributeFilter)
Attributes that should be fetched with each node.
TSelf & MaxSize(i64)
Limit for the number of children node.
Options for NYT::IClient::GetTableColumnarStatistics.
Definition client_method_options.h:1593
TSelf & FetcherMode(EColumnarStatisticsFetcherMode)
Mode of statistics fetching.
Options for NYT::IClient::GetTablePartitions.
Definition client_method_options.h:1626
TSelf & PartitionMode(ETablePartitionMode)
Table partitioning mode.
TSelf & EnableCookies(bool)
Enable partition cookies in response.
TSelf & FetchCookieNodeDescriptors(bool)
Enable partition node descriptors serialization in cookie.
TSelf & MaxPartitionCount(int)
Maximum output partition count.
TSelf & AdjustDataWeightPerPartition(bool)
Allow the data weight per partition to exceed DataWeightPerPartition when MaxPartitionCount is set.
TSelf & DataWeightPerPartition(i64)
Approximate data weight of each output partition.
Options for NYT::IClient::GetTabletInfos.
Definition client_method_options.h:1696
Base class for many options related to IO.
Definition client_method_options.h:531
TSelf & CreateTransaction(bool)
Whether to create internal client transaction for reading / writing table.
TSelf & Config(TNode)
Advanced options for reader/writer.
Options for NYT::IClient::InsertRows.
Definition client_method_options.h:1401
TSelf & LockType(ELockType)
Row lock mode acquired on each modified row.
TSelf & RequireSyncReplica(bool)
Whether to overwrite missing columns with nulls.
Options for NYT::ICypressClient::Link.
Definition client_method_options.h:324
TSelf & Attributes(TNode)
Attributes of created link.
TSelf & Force(bool)
Force rewrite target node.
TSelf & IgnoreExisting(bool)
Do not raise error if link already exists.
TSelf & Recursive(bool)
Create parent directories of destination if they don't exist.
Options for NYT::ICypressClient::List.
Definition client_method_options.h:258
TSelf & AttributeFilter(TAttributeFilter)
Attributes that should be fetched for each node.
TSelf & MaxSize(i64)
Limit for the number of children that will be fetched.
Options for locking cypress node.
Definition client_method_options.h:978
TSelf & AttributeKey(TString)
Whether to wait already locked node to be unlocked.
TSelf & ChildKey(TString)
Also take child_key lock.
Options for NYT::IClient::LookupRows.
Definition client_method_options.h:1143
TSelf & Columns(TColumnNames)
Column names to return.
TSelf & Timeout(TDuration)
Timeout for operation.
TSelf & Versioned(bool)
If set to true returned values will have "timestamp" attribute.
TSelf & KeepMissingRows(bool)
Whether to return rows that were not found in table.
Base class for options for operations that read from master.
Definition client_method_options.h:181
TSelf & ReadFrom(EMasterReadKind)
Where to read from.
Options for NYT::IClient::MountTable.
Definition client_method_options.h:1056
TSelf & CellId(TTabletCellId)
If specified table will be mounted to this cell.
TSelf & Freeze(bool)
If set to true tablets will be mounted in freezed state.
Options for NYT::ICypressClient::Move.
Definition client_method_options.h:300
TSelf & Recursive(bool)
Create missing directories in destination path if required.
TSelf & Force(bool)
Allows to use existing node as destination, it will be overwritten.
TSelf & PreserveExpirationTime(bool)
Whether to preserve expiration_time attribute of source node.
TSelf & PreserveAccount(bool)
Whether to preserves account of source node.
Options for NYT::ICypressClient::MultisetAttributes.
Definition client_method_options.h:242
Server-side preconditions checked before the request is processed.
Definition client_method_options.h:118
Expected revision of a Cypress node, used as a precondition.
Definition client_method_options.h:74
TSelf & Path(TYPath)
Cypress node's path.
TSelf & Revision(ui64)
Expected revision.
Base class for options dealing with prerequisite revisions.
Definition client_method_options.h:101
FLUENT_VECTOR_FIELD(TPrerequisiteRevision, PrerequisiteRevision)
Cypress nodes whose current revisions must match the expected ones.
Base class for options dealing with prerequisite transactions.
Definition client_method_options.h:89
FLUENT_VECTOR_FIELD(TTransactionId, PrerequisiteTransactionId)
Transactions that must be alive.
Options for NYT::IClient::GetTableColumnarStatistics.
Definition client_method_options.h:1500
TSelf & PreserveExpirationTimeout(bool)
Whether to preserve expiration_timeout attribute of source node.
Options for NYT::IClient::RemountTable.
Definition client_method_options.h:1089
Options for NYT::ICypressClient::Remove.
Definition client_method_options.h:163
TSelf & Force(bool)
Do not fail if removing node doesn't exist.
TSelf & Recursive(bool)
Remove whole tree when removing composite cypress node (e.g. map_node).
Options for NYT::IClient::ReshardTable.
Definition client_method_options.h:1097
Resource limits for operation (or pool).
Definition client_method_options.h:399
TSelf & Memory(i64)
Memory in bytes.
TSelf & UserSlots(i64)
Number of slots for user jobs.
TSelf & Cpu(double)
Number of cpu cores.
TSelf & Network(i64)
Network usage. Doesn't have precise physical unit.
Options for NYT::IOperation::ResumeOperation.
Definition client_method_options.h:493
Collection of scheduling options for multiple pool trees.
Definition client_method_options.h:445
TSelf & Add(TStringBuf poolTreeName, const TSchedulingOptions &schedulingOptions)
Add scheduling options for pool tree.
Definition client_method_options.h:455
Scheduling options for single pool tree.
Definition client_method_options.h:422
TSelf & Weight(double)
Operation weight.
TSelf & ResourceLimits(TResourceLimits)
Operation resource limits.
TSelf & Pool(TString)
Pool to switch operation to.
Options for NYT::IClient::SelectRows.
Definition client_method_options.h:1172
TSelf & FailOnIncompleteResult(bool)
Whether to fail if InputRowLimit or OutputRowLimit is exceeded.
TSelf & InputRowLimit(i64)
Limitation for number of rows read by single node.
TSelf & VerboseLogging(bool)
Enable verbose logging on server side.
TSelf & OutputRowLimit(i64)
Limitation for number of output rows on single cluster node.
TSelf & Timeout(TDuration)
Timeout for operation.
TSelf & RangeExpansionLimit(ui64)
Maximum row ranges derived from WHERE clause.
Options for NYT::ICypressClient::Set.
Definition client_method_options.h:223
TSelf & Force(bool)
Allow setting any nodes, not only attribute and document ones.
TSelf & Recursive(bool)
Create missing parent directories if required.
Options for NYT::IClient::SkyShareTable.
Definition client_method_options.h:1704
TSelf & Pool(TString)
Custom pool.
TSelf & KeyColumns(TColumnNames)
Key columns that are used to group files in a table into torrents.
TSelf & EnableFastbone(bool)
Allow skynet manager to return fastbone links to skynet. See YT-11437.
Options for NYT::IClient::StartTransaction.
Definition client_method_options.h:886
TSelf & AutoPingable(bool)
Whether to ping created transaction automatically.
TSelf & Attributes(TNode)
Set custom transaction attributes.
TSelf & Title(TString)
Set the title attribute of transaction.
TSelf & Timeout(TDuration)
How long transaction lives after last ping.
TSelf & Deadline(TInstant)
Moment in the future when transaction is aborted.
Base class for options dealing with access tracking suppression.
Definition client_method_options.h:57
TSelf & SuppressModificationTracking(bool)
Whether to disable update of modification on read/write operations.
TSelf & SuppressAccessTracking(bool)
Whether to disable update of access_time on read/write operations.
Options for NYT::IOperation::SuspendOperation.
Definition client_method_options.h:469
TSelf & Reason(std::optional< TString >)
Something to show in the alert.
TSelf & AbortRunningJobs(bool)
Whether to abort already running jobs.
Options for writing table fragment in distributed session.
Definition client_method_options.h:878
Options for NYT::IClient::CreatePartitionTableReader.
Definition client_method_options.h:805
TSelf & FormatHints(TFormatHints)
Allows fine-tuning of the format used for reading tables.
TSelf & ControlAttributes(TControlAttributes)
Allows to tune which attributes are added to rows while reading tables.
Options for NYT::IClient::CreateTableReader.
Definition client_method_options.h:781
TSelf & FormatHints(TFormatHints)
Allows fine-tuning of the format used for reading tables.
TSelf & SizeLimit(size_t)
TSelf & OmitInaccessibleRows(bool)
Allows to skip rows that the user does not have access to.
TSelf & ControlAttributes(TControlAttributes)
Allows to tune which attributes are added to rows while reading tables.
Options for NYT::IClient::CreateTableWriter.
Definition client_method_options.h:825
TSelf & AutoFinish(bool)
Wheter to call Finish automatically in writer destructor.
TSelf & BufferSize(size_t)
Allows to change the size of locally buffered rows before flushing to yt.
TSelf & InferSchema(bool)
Try to infer schema of inexistent table from the type of written rows.
TSelf & FormatHints(TFormatHints)
Allows to fine tune format that is used for writing tables.
TSelf & WriterOptions(TWriterOptions)
Options to control how YT server side writes data.
TSelf & SingleHttpRequest(bool)
Enable or disable retryful writing.
Base class for options that deal with tablets.
Definition client_method_options.h:1038
TSelf & FirstTabletIndex(i64)
Index of a first tablet to deal with.
TSelf & LastTabletIndex(i64)
Index of a last tablet to deal with.
Base class for options dealing with io to dynamic tables.
Definition client_method_options.h:1367
TSelf & Atomicity(EAtomicity)
Atomicity mode of operation.
TSelf & Durability(EDurability)
Durability mode of operation.
Options for NYT::IClient::TrimRows.
Definition client_method_options.h:1455
Options for NYT::IClient::UnfreezeTable.
Definition client_method_options.h:1113
Options for NYT::ITransaction::Unlock.
Definition client_method_options.h:1017
Options for NYT::IClient::UnmountTable.
Definition client_method_options.h:1074
TSelf & Force(bool)
Advanced option, don't use unless yt team told you so.
Options for NYT::IOperation::UpdateParameters.
Definition client_method_options.h:504
TSelf & Pool(TString)
Pool to switch operation to (for all pool trees it is running in).
FLUENT_VECTOR_FIELD(TString, Owner)
New owners of the operation.
TSelf & SchedulingOptionsPerPoolTree(TSchedulingOptionsPerPoolTree)
Scheduling options for each pool tree the operation is running in.
TSelf & Weight(double)
New operation weight (for all pool trees it is running in).
Options that control how server side of YT stores data.
Definition client_method_options.h:596
TSelf & MinUploadReplicationFactor(ui64)
TSelf & UploadReplicationFactor(ui64)
Number of replicas to be created.
TSelf & RetryBlockSize(size_t)
Size of data block accumulated in memory to provide retries.
TSelf & EnableEarlyFinish(bool)
Whether to wait all replicas to be written.
TSelf & DesiredChunkSize(ui64)
Desired size of a chunk.