tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject [05/35] tez git commit: TEZ-2240. Fix toUpperCase/toLowerCase to use Locale.ENGLISH. (Tsuyoshi Ozawa via hitesh)
Date Tue, 07 Apr 2015 20:12:23 GMT
TEZ-2240. Fix toUpperCase/toLowerCase to use Locale.ENGLISH. (Tsuyoshi Ozawa via hitesh)


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

Branch: refs/heads/TEZ-2003
Commit: 3d5e13f13735e5e5520a7e30ba3c48c036f01406
Parents: 1c9b2fd
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:41:52 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/3d5e13f1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e2d3c2b..e91e4a2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -255,6 +255,7 @@ TEZ-UI CHANGES (TEZ-8):
 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/3d5e13f1/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 771f523..5024154 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
@@ -197,7 +197,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/3d5e13f1/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/3d5e13f1/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 a4b3f1f..35f35e6 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.Callable;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -2686,7 +2687,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()));
   }
@@ -2697,7 +2698,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"));
@@ -2712,7 +2713,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