@@ -0,0 +1,3055 @@
+//clase main%0A%0Apackage hadoop1;%0Aimport org.apache.hadoop.fs.Path; %0Aimport org.apache.hadoop.io.*; %0Aimport org.apache.hadoop.mapred.*; %0A%0Apublic class Hadoop1 %7B %0A        %0A    public static void main(String args%5B%5D)throws Exception %0A   %7B %0A      JobConf conf = new JobConf(conexion.class); %0A      %0A      conf.setJobName(%22max_eletricityunits%22); %0A      conf.setOutputKeyClass(Text.class);%0A      conf.setOutputValueClass(IntWritable.class); %0A      conf.setMapperClass(Mapp.class); %0A      conf.setCombinerClass(Reduce.class); %0A      conf.setReducerClass(Reduce.class); %0A      conf.setInputFormat(TextInputFormat.class); %0A      conf.setOutputFormat(TextOutputFormat.class); %0A      %0A      FileInputFormat.setInputPaths(conf, new Path(args%5B0%5D)); %0A      FileOutputFormat.setOutputPath(conf, new Path(args%5B1%5D)); %0A      %0A      JobClient.runJob(conf); %0A   %7D %0A%0A%7D%0A%0A//____________________________________________________________________%0A%0A//clase map%0A%0Apackage hadoop1;%0A%0Aimport java.io.IOException;%0Aimport java.util.StringTokenizer;%0Aimport org.apache.hadoop.io.IntWritable;%0Aimport org.apache.hadoop.io.LongWritable;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mapred.MapReduceBase;%0Aimport org.apache.hadoop.mapred.Mapper;%0Aimport org.apache.hadoop.mapred.OutputCollector;%0Aimport org.apache.hadoop.mapred.Reporter;%0A%0A%0Apublic  class Mapp extends MapReduceBase implements %0A   Mapper%3CLongWritable ,/*Input key Type */ %0A   Text,                /*Input value Type*/ %0A   Text,                /*Output key Type*/ %0A   IntWritable%3E        /*Output value Type*/ %0A   %7B %0A      %0A      //Map function %0A      %0A      @Override%0A      public void map(LongWritable key, Text value, OutputCollector%3CText, IntWritable%3E output,   %0A      Reporter reporter) throws IOException %0A      %7B %0A         String line = value.toString(); %0A         String valor = null; %0A         StringTokenizer s = new StringTokenizer(line,%22%5Ct%22); %0A         String marca = s.nextToken(); %0A                  %0A         while(s.hasMoreTokens())%0A            %7B%0A               valor=s.nextToken();%0A            %7D %0A            %0A         int precio = Integer.parseInt(valor); %0A         output.collect( new Text(marca), new IntWritable(precio)); %0A      %7D%0A   %7D      %0A%0A//_______________________________________________________________________%0A//clase reduce%0A%0Apackage hadoop1;%0A%0Aimport java.util.*; %0Aimport java.io.IOException;%0Aimport org.apache.hadoop.io.*; %0Aimport org.apache.hadoop.mapred.*; %0A%0A  public class Reduce extends MapReduceBase implements Reducer%3C Text, IntWritable, Text, IntWritable %3E %0A   %7B  %0A   %0A      //Reduce function %0A      public void reduce( Text key, Iterator %3CIntWritable%3E values, %0A         OutputCollector%3CText, IntWritable%3E output, Reporter reporter) throws IOException %0A         %7B %0A            int maxavg=30; %0A            int val=Integer.MIN_VALUE; %0A            %0A            while (values.hasNext()) %0A            %7B %0A               if((val=values.next().get())%3Emaxavg) %0A               %7B %0A                  output.collect(key, new IntWritable(val)); %0A               %7D %0A            %7D %0A %0A         %7D %0A   %7D  %0A%0A

Create mapreduce.java