kylin git commit: KYLIN-1596 UT fail, due to String encoding CharsetEncoder mismatch

2016-04-18 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master ef36d6cb4 -> 8ee67a9cd


KYLIN-1596 UT fail, due to String encoding CharsetEncoder mismatch

Signed-off-by: wangxianbin1987 
Signed-off-by: Hongbin Ma 


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8ee67a9c
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8ee67a9c
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8ee67a9c

Branch: refs/heads/master
Commit: 8ee67a9cde465f806a8520009b50b73074564440
Parents: ef36d6c
Author: wangxianbin1987 
Authored: Tue Apr 19 10:04:02 2016 +0800
Committer: Hongbin Ma 
Committed: Tue Apr 19 10:24:18 2016 +0800

--
 .../apache/kylin/invertedindex/InvertedIndexLocalTest.java| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/8ee67a9c/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
--
diff --git 
a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
 
b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
index 4b74fdd..5aff1b0 100644
--- 
a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
+++ 
b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
@@ -171,7 +172,11 @@ public class InvertedIndexLocalTest extends 
LocalFileMetadataTestCase {
 @Nullable
 @Override
 public byte[] apply(String input) {
-return input.getBytes();
+try {
+return input.getBytes("UTF-8");
+} catch (UnsupportedEncodingException e) {
+throw new RuntimeException(e);
+}
 }
 })));
 }



kylin git commit: KYLIN-1596 UT fail, due to String encoding CharsetEncoder mismatch

2016-04-18 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/yang-m1 aef842442 -> 6ff4b940e


KYLIN-1596 UT fail, due to String encoding CharsetEncoder mismatch

Signed-off-by: wangxianbin1987 
Signed-off-by: Hongbin Ma 


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6ff4b940
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6ff4b940
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6ff4b940

Branch: refs/heads/yang-m1
Commit: 6ff4b940ef7c723cfb7f9c2508e8759992fdea2c
Parents: aef8424
Author: wangxianbin1987 
Authored: Tue Apr 19 10:04:02 2016 +0800
Committer: Hongbin Ma 
Committed: Tue Apr 19 10:23:46 2016 +0800

--
 .../apache/kylin/invertedindex/InvertedIndexLocalTest.java| 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6ff4b940/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
--
diff --git 
a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
 
b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
index 4b74fdd..5aff1b0 100644
--- 
a/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
+++ 
b/invertedindex/src/test/java/org/apache/kylin/invertedindex/InvertedIndexLocalTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
@@ -171,7 +172,11 @@ public class InvertedIndexLocalTest extends 
LocalFileMetadataTestCase {
 @Nullable
 @Override
 public byte[] apply(String input) {
-return input.getBytes();
+try {
+return input.getBytes("UTF-8");
+} catch (UnsupportedEncodingException e) {
+throw new RuntimeException(e);
+}
 }
 })));
 }