hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject hive git commit: HIVE-11950: WebHCat status file doesn't show UTF8 character (Daniel Dai reviewed by Thejas Nair)
Date Fri, 25 Sep 2015 21:01:37 GMT
Repository: hive
Updated Branches:
  refs/heads/master a4eb3c5d4 -> 02121a872


HIVE-11950: WebHCat status file doesn't show UTF8 character (Daniel Dai reviewed by Thejas
Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/02121a87
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/02121a87
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/02121a87

Branch: refs/heads/master
Commit: 02121a872bceead3cd8f84461af68985f6f48d5a
Parents: a4eb3c5
Author: Daniel Dai <daijy@hortonworks.com>
Authored: Fri Sep 25 14:01:25 2015 -0700
Committer: Daniel Dai <daijy@hortonworks.com>
Committed: Fri Sep 25 14:01:25 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/02121a87/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
index 422e75e..a5ff67e 100644
--- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
+++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.mapreduce.Mapper;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.Shell;
 import org.apache.hadoop.util.StringUtils;
+import org.apache.hive.hcatalog.templeton.AppConfig;
 import org.apache.hive.hcatalog.templeton.BadParam;
 import org.apache.hive.hcatalog.templeton.LauncherDelegator;
 
@@ -43,6 +44,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
@@ -544,9 +546,10 @@ public class LaunchMapper extends Mapper<NullWritable, NullWritable,
Text, Text>
     public void run() {
       PrintWriter writer = null;
       try {
-        InputStreamReader isr = new InputStreamReader(in);
+        String enc = conf.get(AppConfig.EXEC_ENCODING_NAME);
+        InputStreamReader isr = new InputStreamReader(in, enc);
         BufferedReader reader = new BufferedReader(isr);
-        writer = new PrintWriter(out);
+        writer = new PrintWriter(new OutputStreamWriter(out, enc));
 
         String line;
         while ((line = reader.readLine()) != null) {


Mime
View raw message