From 318d2cde7cb5c05a5f87c4ee967446bb60d28ae4 Mon Sep 17 00:00:00 2001 From: Devaraj K Date: Wed, 17 Jun 2015 13:54:09 +0530 Subject: [PATCH] YARN-3617. Fix WindowsResourceCalculatorPlugin.getCpuFrequency() returning always -1. Contributed by J.Andreina. --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../hadoop/yarn/util/WindowsResourceCalculatorPlugin.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index b61eb275cc..c793a31979 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -530,6 +530,9 @@ Release 2.8.0 - UNRELEASED YARN-3714. AM proxy filter can not get RM webapp address from yarn.resourcemanager.hostname.rm-id. (Masatake Iwasaki via xgong) + YARN-3617. Fix WindowsResourceCalculatorPlugin.getCpuFrequency() + returning always -1. (J.Andreina via devaraj) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsResourceCalculatorPlugin.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsResourceCalculatorPlugin.java index 0e891189c7..cdbf5254ec 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsResourceCalculatorPlugin.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsResourceCalculatorPlugin.java @@ -157,7 +157,7 @@ public int getNumCores() { @Override public long getCpuFrequency() { refreshIfNeeded(); - return -1; + return cpuFrequencyKhz; } /** {@inheritDoc} */