Package eu.stratosphere.nephele.event.job

Examples of eu.stratosphere.nephele.event.job.RecentJobEvent


   */
  private void updateRecentJobEvent(final JobID jobID, final String jobName, final boolean isProfilingEnabled,
      final long submissionTimestamp, final JobStatus jobStatus) {

    final long currentTime = System.currentTimeMillis();
    final RecentJobEvent recentJobEvent = new RecentJobEvent(jobID, jobName, jobStatus, isProfilingEnabled,
      submissionTimestamp, currentTime);

    synchronized (this.recentJobs) {

      this.recentJobs.put(jobID, recentJobEvent);
View Full Code Here


     
      resp.setStatus(HttpServletResponse.SC_OK);
      PrintWriter wrt = resp.getWriter();
      wrt.write("[");
      for (int i = 0; i < jobs.size(); i++) {
        RecentJobEvent jobEvent = jobs.get(i);
       
        //Serialize job to json
        wrt.write("{");
        wrt.write("\"jobid\": \"" + jobEvent.getJobID() + "\",");
        if(jobEvent.getJobName() != null) {
          wrt.write("\"jobname\": \"" + jobEvent.getJobName()+"\",");
        }
        wrt.write("\"status\": \""+ jobEvent.getJobStatus() + "\",");
        wrt.write("\"time\": " + jobEvent.getTimestamp());
        wrt.write("}");
        //Write seperator between json objects
        if(i != jobs.size() - 1) {
          wrt.write(",");
        }
View Full Code Here

   
      wrt.write("[");
     
      // Loop Jobs
      for (int i = 0; i < jobs.size(); i++) {
        RecentJobEvent jobEvent = jobs.get(i);
 
        writeJsonForJob(wrt, jobEvent);
 
        //Write seperator between json objects
        if(i != jobs.size() - 1) {
View Full Code Here

     
    });
   
    // Loop Jobs
    for (int i = 0; i < jobs.size(); i++) {
      RecentJobEvent jobEvent = jobs.get(i);
     
      //Serialize job to json
      wrt.write("{");
      wrt.write("\"jobid\": \"" + jobEvent.getJobID() + "\",");
      wrt.write("\"jobname\": \"" + jobEvent.getJobName()+"\",");
      wrt.write("\"status\": \""+ jobEvent.getJobStatus() + "\",");
      wrt.write("\"time\": " + jobEvent.getTimestamp());
     
      wrt.write("}");
     
      //Write seperator between json objects
      if(i != jobs.size() - 1) {
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.event.job.RecentJobEvent

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.