code: public void
      doAnalyze(String inputFilesDirectory, String outputDirectory,
                String grepPattern, String sortColumns, String columnSeparator)
      throws IOException
    {		
      Path grepInput = new Path(inputFilesDirectory);
      
      Path analysisOutput = null;
      if (outputDirectory.equals("")) {
        analysisOutput =  new Path(inputFilesDirectory, "logalyzer_" + 
                                   Integer.toString(new Random().nextInt(Integer.MAX_VALUE)));
      } else {
        analysisOutput = new Path(outputDirectory);
      }
      
      JobConf grepJob = new JobConf(fsConfig);
      grepJob.setJobName("logalyzer-grep-sort");
      
      FileInputFormat.setInputPaths(grepJob, grepInput);
      grepJob.setInputFormat(TextInputFormat.class);
      
      grepJob.setMapperClass(LogRegexMapper.class);
      grepJob.set("mapred.mapper.regex", grepPattern);
      grepJob.set("mapred.reducer.sort", sortColumns);
      grepJob.set("mapred.reducer.separator", columnSeparator);
      
      grepJob.setCombinerClass(LongSumReducer.class);
      grepJob.setReducerClass(LongSumReducer.class);
      
      FileOutputFormat.setOutputPath(grepJob, analysisOutput);
      grepJob.setOutputFormat(TextOutputFormat.class);
      grepJob.setOutputKeyClass(Text.class);
      grepJob.setOutputValueClass(LongWritable.class);
      grepJob.setOutputKeyComparatorClass(LogComparator.class);
      
      grepJob.setNumReduceTasks(1);                 // write a single file
      
      JobClient.runJob(grepJob);
    }
docs: doAnalyze:
  @param inputFilesDirectory : Directory containing the files to be analyzed.
  @param outputDirectory : Directory to store analysis (output).
  @param grepPattern : Pattern to *grep* for.
  @param sortColumns : Sort specification for output.
  @param columnSeparator : Column separator.
  @throws IOException