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

svn merge --ignore-ancestry -c 1294436 ../../trunk


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1294437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2012-02-28 01:25:46 +00:00
parent b2630adaa4
commit 7808418f74
2 changed files with 6 additions and 1 deletions

View File

@ -66,6 +66,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

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());
}
/**