@Override public String toString() { return "CarCount{" + "location='" + location + '\'' + ", time=" + toLocalDateTime(time) + ", count=" + count + '}'; } }
@Override public String toString() { return "TrendKey{" + "location='" + location + '\'' + ", time=" + toLocalDateTime(time) + '}'; } }
@Override public String toString() { return "Prediction{" + "location='" + location + '\'' + ", time=" + toLocalDateTime(time) + " (" + time + ")" + ", predictedCounts=" + Arrays.toString(predictedCounts) + '}'; } }
@Override public String toString() { return "JobResult{" + "coordinatorUUID='" + coordinatorUUID + '\'' + ", jobId=" + idToString(jobId) + ", name=" + jobConfig.getName() + ", creationTime=" + toLocalDateTime(creationTime) + ", completionTime=" + toLocalDateTime(completionTime) + ", failureText=" + failureText + '}'; }
@Override public String toString() { StringJoiner sj = new StringJoiner(", ", getClass().getSimpleName() + '{', "}"); for (int i = 0; i < size; i++) { sj.add("[s=" + toLocalDateTime(starts[i]).toLocalTime() + ", e=" + toLocalDateTime(ends[i]).toLocalTime() + ", a=" + accs[i] + ']'); } return sj.toString(); } }
@Override public String toString() { return "Aircraft{" + "reg='" + reg + '\'' + ", alt=" + alt + ", coord=" + String.format("%.2f,%.2f", lat, lon) + ", mdl='" + mdl + '\'' + ", city='" + airport + '\'' + ", posTime=" + Util.toLocalDateTime(posTime).toLocalTime() + '}'; }
", lon=" + lon + ", city=" + airport + ", posTime=" + Util.toLocalDateTime(posTime) + ", posTimeTs=" + posTime + ", posStale=" + posStale +
@Override public String toString() { return "JobRecord{" + "jobId=" + idToString(jobId) + ", name=" + getConfig().getName() + ", creationTime=" + toLocalDateTime(creationTime) + ", dagJson=" + dagJson + ", config=" + config + '}'; } }
private static String formatJob(Job job) { return "id=" + idToString(job.getId()) + ", name=" + job.getName() + ", submissionTime=" + toLocalDateTime(job.getSubmissionTime()); }
@Override public String toString() { return "Job{id=" + getIdString() + ", name=" + getName() + ", submissionTime=" + toLocalDateTime(getSubmissionTime()) + ", status=" + getStatus() + "}"; }
@Command( description = "Lists running jobs on the cluster" ) public void jobs( @Option(names = {"-a", "--all"}, description = "Lists all jobs including completed and failed ones") boolean listAll ) throws IOException { runWithJet(jet -> { JetClientInstanceImpl client = (JetClientInstanceImpl) jet; List<JobSummary> summaries = client.getJobSummaryList(); String format = "%-24s %-19s %-18s %-23s%n"; printf(format, "NAME", "ID", "STATUS", "SUBMISSION TIME"); summaries.stream() .filter(job -> listAll || isActive(job.getStatus())) .forEach(job -> { String idString = idToString(job.getJobId()); String name = job.getName().equals(idString) ? "N/A" : shorten(job.getName(), MAX_STR_LENGTH); printf(format, name, idString, job.getStatus(), toLocalDateTime(job.getSubmissionTime()) ); }); }); }
@Command( description = "Lists saved snapshots on the cluster" ) public void snapshots() throws IOException { runWithJet(jet -> { Collection<JobStateSnapshot> snapshots = jet.getJobStateSnapshots(); printf("%-24s %-15s %-23s %-24s%n", "NAME", "SIZE (bytes)", "TIME", "JOB NAME"); snapshots.forEach(ss -> { String jobName = ss.jobName() == null ? Util.idToString(ss.jobId()) : ss.jobName(); jobName = shorten(jobName, MAX_STR_LENGTH); String ssName = shorten(ss.name(), MAX_STR_LENGTH); LocalDateTime creationTime = toLocalDateTime(ss.creationTime()); printf("%-24s %-,15d %-23s %-24s%n", ssName, ss.payloadSize(), creationTime, jobName); }); }); }