Ejemplo n.º 1
0
 public void map(LongWritable key, Text value, Context context)
     throws IOException, InterruptedException {
   String filter = value.toString().replaceAll(" ", "");
   String[] line = filter.split("\t");
   if (line.length == 7) {
     try {
       delay.set(line[4]);
       tempDelay = Integer.parseInt(line[4]);
     } catch (Exception e) {
     }
     // if(tempDelay>0)// && !line[3].isEmpty() )
     for (int i = 0; i < preferences.length; i++) {
       if (line[3].toUpperCase().equals(preferences[i])) {
         gameName.set(line[3].toUpperCase());
         pair.set(gameName, delay);
         context.write(new IntWritable(1), pair);
         break;
       }
     }
     // }
   }
 }