diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index d7f6932484..8a60a1519a 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -57,6 +57,8 @@ Release 2.3.0 - UNRELEASED YARN-465. fix coverage org.apache.hadoop.yarn.server.webproxy (Aleksey Gorshkov and Andrey Klochkov via jlowe) + YARN-976. Document the meaning of a virtual core. (Sandy Ryza) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java index 5a85e7ce34..88b57f1c68 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java @@ -28,7 +28,18 @@ import org.apache.hadoop.yarn.util.Records; *
Resource
models a set of computer resources in the
* cluster.
Currrently it only models memory.
+ *Currently it models both memory and CPU.
+ * + *The unit for memory is megabytes. CPU is modeled with virtual cores + * (vcores), a unit for expressing parallelism. A node's capacity should + * be configured with virtual cores equal to its number of physical cores. A + * container should be requested with the number of cores it can saturate, i.e. + * the average number of threads it expects to have runnable at a time.
+ * + *Virtual cores take integer values and thus currently CPU-scheduling is + * very coarse. A complementary axis for CPU requests that represents processing + * power will likely be added in the future to enable finer-grained resource + * configuration.
* *Typically, applications request Resource
of suitable
* capability to run their component tasks.