Print this job.
@param job
515845
public void printJob(PrinterJob job)
    {
        Frame frame = this.getFrame();
        dialog = new PrintDialog(frame, false);
        
        dialog.pack();
        if (frame != null)
            this.centerDialogInFrame(dialog, frame);

        
        Map<String,Object> map = new Hashtable<String,Object>();
        map.put("job", job);
        SyncPageWorker thread = new SyncPageWorker(dialog, map)
        {
            public void runPageLoader()
            {
                Thread swingPageLoader = new Thread("SwingPageLoader")
                {
                    public void run()
                    {
                        ((PrintDialog)m_syncPage).setVisible(true);
                    }
                };
                SwingUtilities.invokeLater(swingPageLoader);
            }
            public void afterPageDisplay()
            {
                Thread swingPageLoader = new Thread("SwingPageLoader")
                {
                    public void run()
                    {
                        try {
                            PrinterJob job = (PrinterJob)get("job");
                            job.print();
                        } catch (PrinterException ex) {
                            ex.printStackTrace ();
                        }
                        ((PrintDialog)m_syncPage).setVisible(false);
                    }
                };
                SwingUtilities.invokeLater(swingPageLoader);
            }
        };
        thread.start();
    }
81965
def printAggregateJobStats(self, properties, childNumber):
        """"""
        for job in self.jobsToReport:
            lf = lambda x: "%s:%s" % (x, str(x in properties))
            print("\t".join(("JOB:%s" % job,
                             "LOG_FILE:%s" % job.logJobStoreFileID,
                             "TRYS_REMAINING:%i" % job.remainingRetryCount,
                             "CHILD_NUMBER:%s" % childNumber,
                             lf("READY_TO_RUN"), lf("IS_ZOMBIE"),
                             lf("HAS_SERVICES"), lf("IS_SERVICE"))))
497495
public final void print() {
    System.out.println("=========");
    print_impl(-99,NO_KEY,_val_1);
    _chm.print();
    System.out.println("=========");
  }
689378
public void store(JobInProgress job) {
    if (active && retainTime > 0) {
      JobID jobId = job.getStatus().getJobID();
      Path jobStatusFile = getInfoFilePath(jobId);
      try {
        FSDataOutputStream dataOut = fs.create(jobStatusFile);

        job.getStatus().write(dataOut);

        job.getProfile().write(dataOut);

        job.getCounters().write(dataOut);

        TaskCompletionEvent[] events = 
                job.getTaskCompletionEvents(0, Integer.MAX_VALUE);
        dataOut.writeInt(events.length);
        for (TaskCompletionEvent event : events) {
          event.write(dataOut);
        }

        dataOut.close();
      } catch (IOException ex) {
        LOG.warn("Could not store [" + jobId + "] job info : " +
                 ex.getMessage(), ex);
        try {
          fs.delete(jobStatusFile, true);
        }
        catch (IOException ex1) {
          //ignore
        }
      }
    }
  }
147218
public void runProcess(BaseProcess job, Map<String,Object> properties)
    {
        job.init(this, null, properties);
        job.run();
        job.free();
    }
1150569
public void runJob(CmsScheduledJobInfo job) {

        CmsScheduleManager scheduler = OpenCms.getScheduleManager();
        scheduler.executeDirectly(job.getId());

    }
1086842
public void queueJob(Runnable job) {
        try {
            logger.debug("Queueing job {}", job);
            executor.submit(job);
        } catch (RejectedExecutionException e) {
            logger.error("Unable to queue a send-command-job! ", e);
        }
        checkQueueSize();
    }
909102
protected void print(Object s) throws IOException {
        out.write(Convert.escapeUnicode(s.toString()));
    }
853664
@Override
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, filename);
    Text.writeString(out, jobid);
    out.writeBoolean(isJobConfFile);
    out.writeBoolean(isJobHistoryFile);
  }
814338
private void printLog() {
    Logger.Builder builder = new Logger.Builder();

    String tag = tagView.getText().toString();
    if (!TextUtils.isEmpty(tag)) {
      builder.tag(tag);
    }

    if (threadInfo.isChecked()) {
      builder.t();
    } else {
      builder.nt();
    }

    if (stackTraceInfo.isChecked()) {
      builder.st(STACK_TRACE_DEPTHS[stackTraceDepth.getSelectedItemPosition()]);
    } else {
      builder.nst();
    }

    if (border.isChecked()) {
      builder.b();
    } else {
      builder.nb();
    }

    // Print the log to view, logcat and file.
    if (hasPermission) {
      builder.printers(
          viewPrinter,
          new AndroidPrinter(),
          XLogSampleApplication.globalFilePrinter);
    } else {
      builder.printers(
          viewPrinter,
          new AndroidPrinter());
    }

    Logger logger = builder.build();

    int levelPosition = levelView.getSelectedItemPosition();
    int level = LEVELS[levelPosition];
    switch (level) {
      case LogLevel.VERBOSE:
        logger.v(MESSAGE);
        break;
      case LogLevel.DEBUG:
        logger.d(MESSAGE);
        break;
      case LogLevel.INFO:
        logger.i(MESSAGE);
        break;
      case LogLevel.WARN:
        logger.w(MESSAGE);
        break;
      case LogLevel.ERROR:
        logger.e(MESSAGE);
        break;
    }
  }
853121
public boolean compile(Job job) throws IOException {
        boolean result;

        currentJob = job;
        result = compileCurrent();
        currentJob = null;
        return result;
    }
711590
public static void printOnce(Object msg) {
		if (messagesCache.get(msg.hashCode()) == null) {
			JK.printBlock(msg);
			messagesCache.put(msg.hashCode(), msg);
		}
	}
846788
@Override public JobV3 fillFromImpl( Job job ) {
    if( job == null ) return this;
    // Handle fields in subclasses:
    PojoUtils.copyProperties(this, job, PojoUtils.FieldNaming.ORIGIN_HAS_UNDERSCORES);
    PojoUtils.copyProperties(this, job, PojoUtils.FieldNaming.CONSISTENT);  // TODO: make consistent and remove

    key = new JobKeyV3(job._key);
    description = job._description;
    warnings = job.warns();
    progress = job.progress();
    progress_msg = job.progress_msg();
    // Bogus status; Job no longer has these states, but we fake it for /3/Job poller's.
    // Notice state "CREATED" no long exists and is never returned.
    // Notice new state "CANCEL_PENDING".
    if( job.isRunning() )
      if( job.stop_requested() ) status = "CANCEL_PENDING";
      else status = "RUNNING";
    else
      if( job.stop_requested() ) status = "CANCELLED";
      else status = "DONE";
    Throwable ex = job.ex();
    if( ex != null ) status = "FAILED";
    exception = ex == null ? null : ex.toString();
    if (ex!=null) {
      StringWriter sw = new StringWriter();
      PrintWriter pw = new PrintWriter(sw);
      ex.printStackTrace(pw);
      stacktrace = sw.toString();
    }
    msec = job.msec();
    ready_for_view = job.readyForView();

    Keyed dest_type;
    Value value = null;
    if (job._result != null) {
      value = DKV.get(job._result);
    }
    if (value != null) {
      dest_type = (Keyed) TypeMap.theFreezable(value.type());
    } else {
      dest_type = (Keyed) TypeMap.theFreezable(job._typeid);
    }
    dest = job._result == null ? null : KeyV3.make(dest_type.makeSchema(), job._result);
    return this;
  }
806490
def printJobLog(self):
        """"""
        for job in self.jobsToReport:
            if job.logJobStoreFileID is not None:
                msg = "LOG_FILE_OF_JOB:%s LOG: =======>\n" % job
                with job.getLogFileHandle(self.jobStore) as fH:
                    msg += fH.read()
                msg += "<========="
            else:
                msg = "LOG_FILE_OF_JOB:%s LOG: Job has no log file" % job
            print(msg)
648726
public static void printHelp(PrintStream stream) {
        stream.println();
        stream.println("Voldemort Admin Tool Async-Job Commands");
        stream.println("---------------------------------------");
        stream.println("list   Get async job list from nodes.");
        stream.println("stop   Stop async jobs on one node.");
        stream.println();
        stream.println("To get more information on each command,");
        stream.println("please try \'help async-job <command-name>\'.");
        stream.println();
    }
1267217
private void printRawDiag(PrintWriter pw, String prefix, int pos, String msg) {
        if (source == null || pos == Position.NOPOS) {
            printRawLines(pw, prefix + msg);
        } else {
            int line = source.getLineNumber(pos);
            JavaFileObject file = source.getFile();
            if (file != null)
                printRawLines(pw,
                           file.getName() + ":" +
                           line + ": " + msg);
            printErrLine(pos, pw);
        }
        pw.flush();
    }
724880
protected String statusMsg(final String queue, final Job job) throws IOException {
        final WorkerStatus status = new WorkerStatus();
        status.setRunAt(new Date());
        status.setQueue(queue);
        status.setPayload(job);
        return ObjectMapperFactory.get().writeValueAsString(status);
    }