The moose likes Distributed Java and the fly likes Hadoop(Beginner Level Question) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Hadoop(Beginner Level Question)" Watch "Hadoop(Beginner Level Question)" New topic
Author

Hadoop(Beginner Level Question)

Supraja Jayakumar
Greenhorn

Joined: Jul 12, 2011
Posts: 7
Hi

I wrote this piece of hadoop to preprocess files and write the files again to the output directory. I see files by name part-000, 0001 and so on being created but they all are empty. I use NullWritable for key. But set Text for value. I am not sure if its because of that.

The following is my code:

Alan Gates
author
Greenhorn

Joined: Nov 29, 2011
Posts: 7
TextInputFormat already splits your input by line and only hands your map function one line at a time. So you don't need the while loop. Also, String.contains() takes a CharSequence, not a regular expression. Unless you are looking for the literal character sequence "[A-Za-z]" you want to use String.matches().
 
 
subject: Hadoop(Beginner Level Question)
 
Threads others viewed
Calculatin number of words repeating in one sentence
Servlet Program doesnt work in Client Side.
After Unzip delete that file programatically??
UnZipping Occurs in Server System only
Hadoop key mismatch
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture