Skip to content

Commit

Permalink
Can setup disk in vanilla jobs (ydb-platform#4108)
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius authored Apr 25, 2024
1 parent f78e8f8 commit 747ac2a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ydb/library/yql/providers/dq/actors/yt/yt_resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,16 @@ namespace NYql {
.DoIf(Options.YtBackend.HasUseTmpFs() && Options.YtBackend.GetUseTmpFs(), [&] (NYT::TFluentMap fluent) {
fluent.Item("tmpfs_path").Value(fileCache);
})
.DoIf(Options.YtBackend.HasDiskRequest(), [&] (NYT::TFluentMap fluent) {
auto& diskRequest = Options.YtBackend.GetDiskRequest();
fluent.Item("disk_request")
.BeginMap()
.DoIf(diskRequest.HasDiskSpace(), [&] (NYT::TFluentMap fluent) { fluent.Item("disk_space").Value(diskRequest.GetDiskSpace()); } )
.DoIf(diskRequest.HasInodeCount(), [&] (NYT::TFluentMap fluent) { fluent.Item("inode_count").Value(diskRequest.GetInodeCount()); } )
.DoIf(diskRequest.HasAccount(), [&] (NYT::TFluentMap fluent) { fluent.Item("account").Value(diskRequest.GetAccount()); } )
.DoIf(diskRequest.HasMediumName(), [&] (NYT::TFluentMap fluent) { fluent.Item("medium_name").Value(diskRequest.GetMediumName()); } )
.EndMap();
})
.EndMap();
})
.EndMap()
Expand Down
8 changes: 8 additions & 0 deletions ydb/library/yql/providers/dq/config/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ message TDqConfig {
optional bool CleanupOnShutdown = 7;
}

message TDiskRequest {
optional uint64 DiskSpace = 1;
optional uint64 InodeCount = 2;
optional string Account = 3;
optional string MediumName = 4;
}

message TYtBackend {
optional string ClusterName = 1 [default = "hume"];
optional string User = 2; // default -- current user name
Expand Down Expand Up @@ -116,6 +123,7 @@ message TDqConfig {
optional bool CanUseComputeActor = 32 [default = false];
optional bool EnforceJobUtc = 33;
optional TSpillingSettings SpillingSettings = 38;
optional TDiskRequest DiskRequest = 39;
}

repeated TYtBackend YtBackends = 5;
Expand Down

0 comments on commit 747ac2a

Please sign in to comment.