tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-2240. Fix toUpperCase/toLowerCase to use Locale.ENGLISH. (Tsuyoshi Ozawa via hitesh)
Date Mon, 30 Mar 2015 18:43:09 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.5 a510f761f -> 0abc8d874


TEZ-2240. Fix toUpperCase/toLowerCase to use Locale.ENGLISH. (Tsuyoshi Ozawa via hitesh)

(cherry picked from commit 3d5e13f13735e5e5520a7e30ba3c48c036f01406)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/0abc8d87
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/0abc8d87
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/0abc8d87

Branch: refs/heads/branch-0.5
Commit: 0abc8d8746ab129deea6791371282043cf5e9e9a
Parents: a510f76
Author: Hitesh Shah <hitesh@apache.org>
Authored: Mon Mar 30 11:41:52 2015 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Mon Mar 30 11:43:01 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../apache/tez/common/counters/FileSystemCounterGroup.java    | 2 +-
 .../main/java/org/apache/tez/common/TezLog4jConfigurator.java | 3 ++-
 .../java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java  | 7 ++++---
 4 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/0abc8d87/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 55b1cc4..b8f644d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@ Apache Tez Change Log
 Release 0.5.4: Unreleased
 
 ALL CHANGES:
+  TEZ-2240. Fix toUpperCase/toLowerCase to use Locale.ENGLISH.
   TEZ-2238. TestContainerReuse flaky
   TEZ-2217. The min-held-containers being released prematurely
   TEZ-2214. FetcherOrderedGrouped can get stuck indefinitely when MergeManager misses memToDiskMerging

http://git-wip-us.apache.org/repos/asf/tez/blob/0abc8d87/tez-api/src/main/java/org/apache/tez/common/counters/FileSystemCounterGroup.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/FileSystemCounterGroup.java
b/tez-api/src/main/java/org/apache/tez/common/counters/FileSystemCounterGroup.java
index 07df3fb..88d47ca 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/FileSystemCounterGroup.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/FileSystemCounterGroup.java
@@ -194,7 +194,7 @@ public abstract class FileSystemCounterGroup<C extends TezCounter>
   }
 
   private String checkScheme(String scheme) {
-    String fixed = scheme.toUpperCase(Locale.US);
+    String fixed = scheme.toUpperCase(Locale.ENGLISH);
     String interned = schemes.putIfAbsent(fixed, fixed);
     if (schemes.size() > MAX_NUM_SCHEMES) {
       // mistakes or abuses

http://git-wip-us.apache.org/repos/asf/tez/blob/0abc8d87/tez-common/src/main/java/org/apache/tez/common/TezLog4jConfigurator.java
----------------------------------------------------------------------
diff --git a/tez-common/src/main/java/org/apache/tez/common/TezLog4jConfigurator.java b/tez-common/src/main/java/org/apache/tez/common/TezLog4jConfigurator.java
index 24731c2..03324f7 100644
--- a/tez-common/src/main/java/org/apache/tez/common/TezLog4jConfigurator.java
+++ b/tez-common/src/main/java/org/apache/tez/common/TezLog4jConfigurator.java
@@ -18,6 +18,7 @@
 
 package org.apache.tez.common;
 
+import java.util.Locale;
 import java.util.Properties;
 
 
@@ -35,7 +36,7 @@ public class TezLog4jConfigurator extends PropertyConfigurator {
         String [] logParamParts = logParam.split("=");
         if (logParamParts.length == 2) {
           String loggerName = "log4j.logger." + logParamParts[0];
-          String logLevel = logParamParts[1].toUpperCase();
+          String logLevel = logParamParts[1].toUpperCase(Locale.ENGLISH);
           properties.setProperty(loggerName, logLevel);
         } else {
           // Cannot use Log4J logging from here.

http://git-wip-us.apache.org/repos/asf/tez/blob/0abc8d87/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
index 7f9159b..c7d3bf9 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexImpl.java
@@ -37,6 +37,7 @@ import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.Condition;
@@ -2646,7 +2647,7 @@ public class TestVertexImpl {
     Assert.assertEquals(VertexState.FAILED, v.getState());
     Assert.assertEquals(VertexTerminationCause.OWN_TASK_FAILURE, v.getTerminationCause());
     String diagnostics =
-        StringUtils.join(v.getDiagnostics(), ",").toLowerCase();
+        StringUtils.join(v.getDiagnostics(), ",").toLowerCase(Locale.ENGLISH);
     assertTrue(diagnostics.contains("task failed"
         + ", taskid=" + t1.toString()));
   }
@@ -2657,7 +2658,7 @@ public class TestVertexImpl {
     VertexImpl v2 = vertices.get("vertex4");
     killVertex(v2);
     String diagnostics =
-        StringUtils.join(v2.getDiagnostics(), ",").toLowerCase();
+        StringUtils.join(v2.getDiagnostics(), ",").toLowerCase(Locale.ENGLISH);
     LOG.info("diagnostics v2: " + diagnostics);
     assertTrue(diagnostics.contains(
         "vertex received kill in inited state"));
@@ -2672,7 +2673,7 @@ public class TestVertexImpl {
     startVertex(vertices.get("vertex2"));
     killVertex(v3);
     String diagnostics =
-        StringUtils.join(v3.getDiagnostics(), ",").toLowerCase();
+        StringUtils.join(v3.getDiagnostics(), ",").toLowerCase(Locale.ENGLISH);
     assertTrue(diagnostics.contains(
         "vertex received kill while in running state"));
   }


Mime
View raw message