hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehdi Sheikhalishahi" <mehdi.alish...@gmail.com>
Subject Both setMapperClass method and JobClient object
Date Sun, 07 Oct 2007 17:24:50 GMT
I want to run LineIndexer example, but I've got some problem. I want to use
both setMapperClass method and JobClient object. I impoted the following,
but It does not work. What's the matter?

--------------------------------------
import org.apache.hadoop.mapred.*;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.JobClient;
--------------------------------------
           conf.setMapperClass(LineIndexer.LineIndexerMapper.class);
           conf.setReducerClass(LineIndexer.LineIndexerReducer.class);
           if (args.length < 2) {
              System.out.println("Usage: LineIndexer <input path> <output
path>");
              System.exit(0);
           }
           conf.setInputPath(new Path(args[0]));
           conf.setOutputPath(new Path(args[1]));

          JobClient.runJob(conf);
--------------------------------------
-- 
Best Regards,
S.Mehdi Sheikhalishahi,
Web: http://www.cse.shirazu.ac.ir/~alishahi/
Bye.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message