引用:http://blog.csdn.net/zklth/article/details/11829563 Hadoop处理GBK文本时,发现输出出现了乱码,原来HADOOP在涉及编码时都是写死的UTF-8,如果文件编码格式是其它类型(如GBK),则会出现乱码. 此时只需在mapper或reducer程序中读取Text时,使用transformTextToUTF8(text, "GBK");进行一下转码,以确保都是以UTF-8的编码方式在运行. public static Text
参考链接 http://hadoop.apache.org/common/docs/stable/mapred_tutorial.html http://blog.endlesscode.com/2010/06/16/simple-demo-of-mapreduce-in-java/ When you run a hadoop jar this is the command which you should run in the directory you put the jar in (e.g