hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab ra <rab...@gmail.com>
Subject toolrunner issue
Date Mon, 01 Sep 2014 10:48:40 GMT
Hello

I m having an issue in running one simple map reduce job.
The portion of the code is below. It gives a warning that Hadoop command
line parsing was not peformed.
This occurs despite the class implements Tool interface. Any clue?

public static void main(String[] args) throws Exception {

        try{

            int exitcode = ToolRunner.run(new Configuration(), new
MyClass(), args);

            System.exit(exitcode);

        }

        catch(Exception e)

        {

            e.printStackTrace();

        }

    }



    @Override

    public int run(String[] args) throws Exception {

        JobConf conf = new JobConf(MyClass.class);

        System.out.println(args);

        FileInputFormat.addInputPath(conf, new Path("/smallInput"));

        conf.setInputFormat(CFNInputFormat.class);

        conf.setMapperClass(MyMapper.class);

        conf.setMapOutputKeyClass(Text.class);

        conf.setMapOutputValueClass(Text.class);

        FileOutputFormat.setOutputPath(conf, new Path("/TEST"));

        JobClient.runJob(conf);

        return 0;

Mime
View raw message