09.10.2023 Views

Advanced Data Analytics Using Python_ With Machine Learning, Deep Learning and NLP Examples ( 2023)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7

Analytics at Scale

{

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

// TODO Auto-generated method stub

String classname = Utility.getClassName(Utility.

configpath);

Configuration con = new Configuration();

con.set("classname", classname);

Job job = new Job(con);

job.setJarByClass(MainBDAS.class);

job.setJobName("MapReduceBDAS");

job.setOutputKeyClass(Text.class);

job.setOutputValueClass(Text.class);

job.setInputFormatClass(TextInputFormat.class);

job.setOutputFormatClass(TextOutputFormat.class);

FileInputFormat.setInputPaths(job, new

Path(args[0]));

FileOutputFormat.setOutputPath(job, new

Path(args[1]));

job.setMapperClass(MapperBDAS.class);

job.setReducerClass(ReducerBDAS.class);

System.out.println(job.waitForCompletion(true));

}

}

156

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!