Package com.linkedin.whiteelephant.parsing

Examples of com.linkedin.whiteelephant.parsing.Job


        inputSplits.add(path.toString());
      }
     
      String line = value.toString();
     
      Job job = null;
      Attempt attempt = null;
      Task task = null;
     
      job = LineParsing.tryParseJob(line);
     
      if (job == null)
      {     
        attempt = LineParsing.tryParseAttempt(line);
       
        if (attempt == null)
        {
          task = LineParsing.tryParseTask(line);
        }
      }
     
      LogData data = new LogData();
      String jobId = null;
     
      data.setCluster(_clusterName);
     
      try
      {
        if (job != null)
        {
          // log lines are sometimes truncated, so data may be missing - just ignore these
          if (job.getJobId() != null)
          {
            jobId = job.getJobId().toString();
            job.setTasks(new ArrayList<Task>());
            data.setEntry(job);
            data.setPath(findInputSplitForJob(jobId,inputSplits));
            context.write(new AvroKey<String>(jobId), new AvroValue<LogData>(data));
          }
        }
View Full Code Here


        {
          attemptEntries.add(Attempt.newBuilder((Attempt)value.datum().getEntry()).build());
        }
      }
     
      Job job = new Job();
     
      mergeJobEntries(job, jobEntries);
      mergeTaskEntries(job, taskEntries);
      mergeTaskAttemptEntries(job, attemptEntries);     
     
View Full Code Here

  public static Job tryParseJob(String line)
  {
    // these mess with our pattern matching
    line = line.replace("\\\"", "");
   
    Job job = null;
   
    Matcher m = jobLinePattern.matcher(line);
    if (m.matches())
    {
      job = new Job();
     
      job.setJobId(m.group(1));
     
      Matcher paramMatcher = parameterPattern.matcher(line);
      while (paramMatcher.find())
      {
        String name = paramMatcher.group(1);
        String value = paramMatcher.group(2);               
        maybeSetJobParam(job, name, value);
      }
    }
    else if (line.indexOf("USER=") >= 0)
    {
      Matcher jobMatcher = jobPattern.matcher(line);
      if (jobMatcher.find())
      {
        String jobId = jobMatcher.group();
       
        job = new Job();
       
        job.setJobId(jobId);
       
        Matcher paramMatcher = parameterPattern.matcher(line);
        while (paramMatcher.find())
        {
          String name = paramMatcher.group(1);
View Full Code Here

TOP

Related Classes of com.linkedin.whiteelephant.parsing.Job

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.