@@ -0,0 +1,2254 @@
+package practice;%0A          %0Aimport java.io.IOException;%0A import java.util.*;%0A            %0A    import org.apache.hadoop.fs.Path;%0A    import org.apache.hadoop.conf.*;%0A    import org.apache.hadoop.io.*;%0A    import org.apache.hadoop.mapreduce.*;%0A   import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;%0A   import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;%0A  import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;%0A  import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;%0A           %0A  public class Practice_one %7B%0A          %0A    public static class Map extends Mapper%3CLongWritable, Text, Text, IntWritable%3E %7B%0A       private final static IntWritable one = new IntWritable(1);%0A       private Text word = new Text();%0A          %0A      public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException %7B%0A           String line = value.toString();%0A           StringTokenizer tokenizer = new StringTokenizer(line);%0A           while (tokenizer.hasMoreTokens()) %7B%0A               word.set(tokenizer.nextToken());%0A               context.write(word, one);%0A           %7D%0A %7D%0A   %7D %0A           %0A    public static class Reduce extends Reducer%3CText, IntWritable, Text, IntWritable%3E %7B%0A   %0A       public void reduce(Text key, Iterable%3CIntWritable%3E values, Context context) %0A         throws IOException, InterruptedException %7B%0A           int sum = 0;%0A           for (IntWritable val : values) %7B%0A               sum += val.get();%0A           %7D%0A           context.write(key, new IntWritable(sum));%0A       %7D%0A    %7D%0A           %0A    public static void main(String%5B%5D args) throws Exception %7B%0A       Configuration conf = new Configuration();%0A          %0A           Job job = new Job(conf, %22wordcount%22);%0A       %0A       job.setOutputKeyClass(Text.class);%0A       job.setOutputValueClass(IntWritable.class);%0A           %0A       job.setMapperClass(Map.class);%0A       job.setReducerClass(Reduce.class);%0A           %0A       job.setInputFormatClass(TextInputFormat.class);%0A       job.setOutputFormatClass(TextOutputFormat.class);%0A           %0A      FileInputFormat.addInputPath(job, new Path(args%5B0%5D));%0A       FileOutputFormat.setOutputPath(job, new Path(args%5B1%5D));%0A           job.waitForCompletion(true);%0A    %7D%0A          %0A  %7D%0A

package practice;