MAPREDUCE-2855. Passing a cached class-loader to ResourceBundle creator to minimize counter names lookup time. Contributed by Siddarth Seth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1294436 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2012-02-28 01:24:35 +00:00
parent 12b3ce7205
commit 165cd626c5
2 changed files with 6 additions and 1 deletions

View File

@ -141,6 +141,9 @@ Release 0.23.2 - UNRELEASED
MAPREDUCE-3901. Modified JobHistory records in YARN to lazily load job and
task reports so as to improve UI response times. (Siddarth Seth via vinodkv)
MAPREDUCE-2855. Passing a cached class-loader to ResourceBundle creator to
minimize counter names lookup time. (Siddarth Seth via vinodkv)
BUG FIXES
MAPREDUCE-3918 proc_historyserver no longer in command line arguments for
HistoryServer (Jon Eagles via bobby)

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.mapreduce.util;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.MissingResourceException;
@ -33,7 +34,8 @@ public class ResourceBundles {
* @throws MissingResourceException
*/
public static ResourceBundle getBundle(String bundleName) {
return ResourceBundle.getBundle(bundleName.replace('$', '_'));
return ResourceBundle.getBundle(bundleName.replace('$', '_'),
Locale.getDefault(), Thread.currentThread().getContextClassLoader());
}
/**