在Luigi Python中,“资源”指什么?

5

3
我不知道我有一个以我的名字命名的Python模块! - Luigi
1个回答

4

我没有测试过这个,但它看起来是一个任意值,可以被调度器用来决定是否基于配置中的值来限制作业。从文档中得知:

This section can contain arbitrary keys. Each of these specifies the amount of a global resource that the scheduler can allow workers to use. The scheduler will prevent running jobs with resources specified from exceeding the counts in this section. Unspecified resources are assumed to have limit 1. Example resources section for a configuration with 2 hive resources and 1 mysql resource:

[resources]
hive: 2
mysql: 1

Note that it was not necessary to specify the 1 for mysql here, but it is good practice to do so when you have a fixed set of resources.


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接