hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From welman Lu <welmanwe...@gmail.com>
Subject Re: Writing Bytes from Map and Reduce functions
Date Wed, 31 Mar 2010 13:35:06 GMT
Hi, Saliya,

If you said the part files, I think you are talking about the results of the
reduce function that stored inside the HDFS, right?
If so, I think this example in "Hadoop The Definitive Guide" can help you.
Example 3-1. Displaying files from a Hadoop filesystem on standard output
using a
public class URLCat {
  static {
    URL.setURLStreamHandlerFactory(new FsUrlStreamHandlerFactory());

  public static void main(String[] args) throws Exception {
    InputStream in = null;
    try {
      in = new URL(args[0]).openStream();
      IOUtils.copyBytes(in, System.out, 4096, false);
    } finally {

Take a try, good luck!

Best Regards
Jiamin Lu

View raw message