com.hazelcast.jet.impl.util.Util.toLocalDateTime()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(420)

本文整理了Java中com.hazelcast.jet.impl.util.Util.toLocalDateTime()方法的一些代码示例,展示了Util.toLocalDateTime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.toLocalDateTime()方法的具体详情如下:
包路径:com.hazelcast.jet.impl.util.Util
类名称:Util
方法名:toLocalDateTime

Util.toLocalDateTime介绍

暂无

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet-demos

@Override
  public String toString() {
    return "CarCount{" +
        "location='" + location + '\'' +
        ", time=" + toLocalDateTime(time) +
        ", count=" + count +
        '}';
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

@Override
  public String toString() {
    return "TrendKey{" +
        "location='" + location + '\'' +
        ", time=" + toLocalDateTime(time) +
        '}';
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

@Override
  public String toString() {
    return "Prediction{" +
        "location='" + location + '\'' +
        ", time=" + toLocalDateTime(time) + " (" + time + ")" +
        ", predictedCounts=" + Arrays.toString(predictedCounts) +
        '}';
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public String toString() {
  return "JobResult{" +
      "coordinatorUUID='" + coordinatorUUID + '\'' +
      ", jobId=" + idToString(jobId) +
      ", name=" + jobConfig.getName() +
      ", creationTime=" + toLocalDateTime(creationTime) +
      ", completionTime=" + toLocalDateTime(completionTime) +
      ", failureText=" + failureText +
      '}';
}

代码示例来源:origin: hazelcast/hazelcast-jet

@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();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

@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() +
      '}';
}

代码示例来源:origin: hazelcast/hazelcast-jet-demos

", lon=" + lon +
", city=" + airport +
", posTime=" + Util.toLocalDateTime(posTime) +
", posTimeTs=" + posTime +
", posStale=" + posStale +

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
  public String toString() {
    return "JobRecord{" +
        "jobId=" + idToString(jobId) +
        ", name=" + getConfig().getName() +
        ", creationTime=" + toLocalDateTime(creationTime) +
        ", dagJson=" + dagJson +
        ", config=" + config +
        '}';
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

private static String formatJob(Job job) {
  return "id=" + idToString(job.getId())
      + ", name=" + job.getName()
      + ", submissionTime=" + toLocalDateTime(job.getSubmissionTime());
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public String toString() {
  return "Job{id=" + getIdString()
      + ", name=" + getName()
      + ", submissionTime=" + toLocalDateTime(getSubmissionTime())
      + ", status=" + getStatus()
      + "}";
}

代码示例来源:origin: hazelcast/hazelcast-jet

@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())
          );
        });
  });
}

代码示例来源:origin: hazelcast/hazelcast-jet

@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);
    });
  });
}

相关文章