Examples of LogData


Examples of com.linkedin.whiteelephant.parsing.LogData

        {
          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));
          }
        }
        else if (attempt != null)
        {
          // log lines are sometimes truncated, so data may be missing - just ignore these
          if (attempt.getJobId() != null && attempt.getTaskId() != null && attempt.getTaskAttemptId() != null && attempt.getType() != null)
          {
            jobId = attempt.getJobId().toString();
            data.setEntry(attempt);
            data.setPath(findInputSplitForJob(jobId,inputSplits));
            context.write(new AvroKey<String>(jobId), new AvroValue<LogData>(data));
          }
        }
        else if (task != null)
        {
          // log lines are sometimes truncated, so data may be missing - just ignore these
          if (task.getJobId() != null && task.getTaskId() != null && task.getType() != null)
          {
            jobId = task.getJobId().toString();
            task.setAttempts(new ArrayList<Attempt>());
            data.setEntry(task);
            data.setPath(findInputSplitForJob(jobId,inputSplits));
            context.write(new AvroKey<String>(jobId), new AvroValue<LogData>(data));
          }
        }
      }
      catch (Exception e)
      {
        System.out.println("Exception writing log data: " + e.toString());
        if (jobId != null)
        {
          System.out.println("jobId: " + jobId);
          CharSequence path = data.getPath();
          if (path != null)
          {
            System.out.println("input: " + path);
          }
        }
View Full Code Here

Examples of com.linkedin.whiteelephant.parsing.LogData

     
      mergeJobEntries(job, jobEntries);
      mergeTaskEntries(job, taskEntries);
      mergeTaskAttemptEntries(job, attemptEntries);     
     
      LogData data = new LogData();
      data.setPath(inputPath);
      data.setEntry(job);
     
      try
      {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MMdd");    
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
View Full Code Here

Examples of com.linkedin.whiteelephant.parsing.LogData

    }
   
    @Override
    protected void map(AvroKey<String> key, AvroValue<LogData> value, Context context) throws java.io.IOException, java.lang.InterruptedException
    {
      LogData data = value.datum();
     
      if (data.getEntry() != null && data.getEntry() instanceof com.linkedin.whiteelephant.parsing.Job)
      {
        com.linkedin.whiteelephant.parsing.Job job = (com.linkedin.whiteelephant.parsing.Job)data.getEntry();
        for (com.linkedin.whiteelephant.parsing.Task task : job.getTasks())
        {
          for (com.linkedin.whiteelephant.parsing.Attempt attempt : task.getAttempts())
          {
            if (attempt.getTaskStatus() == null)
View Full Code Here

Examples of com.sefer.dragonfly.client.core.domain.LogData

    if (o != null) {
      // 记录
      o.toString();
      for (Listener listener : listenerList) {
        listener.onFire(new Event<Object>(new EventContext<Object>(
            new LogData(o, cacheId, timeout),
            CMonitorEvent.ADD_CACHE_DATA)));
      }
    }
    // 传入对象为空则忽略
  }
View Full Code Here

Examples of fitnesse.components.LogData

    socket.setHost("1.2.3.4");
    request.setRequestLine("GET / HTTP/1.1");
    response.setContent("abc");
    request.setCredentials("billy", "bob");

    LogData data = FitNesseExpediter.makeLogData(socket, request, response);

    assertEquals("1.2.3.4", data.host);
    assertNotNull(data.time);
    assertEquals("GET / HTTP/1.1", data.requestLine);
    assertEquals(200, data.status);
View Full Code Here

Examples of fitnesse.components.LogData

    response = new ErrorResponder(e).makeResponse(context, request);
    hasError = true;
  }

  public static LogData makeLogData(Socket socket, Request request, Response response) {
    LogData data = new LogData(
        ((InetSocketAddress) socket.getRemoteSocketAddress()).getAddress().getHostAddress(),
        new GregorianCalendar(),
        request.getRequestLine(),
        response.getStatus(),
        response.getContentSize(),
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.LogData

                LoggingConstants.LOG4J_FILE_FOUND));
        if(!isLogFileFound){
            throw new Exception("Log4j.properties file not found, please put a log4j.properties file to the classpath");
        }

        LogData logData = new LogData();

        // loading initial data
        logData.setLogLevel(LoggingUtil.getSystemLogLevel());
        logData.setLogPattern(LoggingUtil.getSystemLogPattern());
       
        // set the appenders
        AppenderData[] appenderData = getAllAppenderData();
        if (appenderData.length > 0) {
            logData.setAppenderData(appenderData);
            logData.setSelectedAppenderData(appenderData[0]);
        }
        return logData;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.