azkaban.utils.Utils.formatDuration()方法的使用及代码示例

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

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

Utils.formatDuration介绍

暂无

代码示例

代码示例来源:origin: azkaban/azkaban

message.println("<tr><td>" + sdf.format(new Date(triggerInst.getEndTime())) + "</td><td>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(triggerInst.getStartTime(), triggerInst.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + triggerInst.getStatus() + "</td></tr>");

代码示例来源:origin: azkaban/azkaban

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

代码示例来源:origin: azkaban/azkaban

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

代码示例来源:origin: azkaban/azkaban

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

代码示例来源:origin: com.linkedin.azkaban/azkaban

@Override
  public boolean createSuccessEmail(ExecutableFlow flow, EmailMessage message, String azkabanName, String clientHostname, String clientPortNumber, String... vars) {

    ExecutionOptions option = flow.getExecutionOptions();
    List<String> emailList = option.getSuccessEmails();

    int execId = flow.getExecutionId();

    if (emailList != null && !emailList.isEmpty()) {
      message.addAllToAddress(emailList);
      message.setMimeType("text/html");
      message.setSubject("Flow '" + flow.getFlowId() + "' has succeeded on " + azkabanName);

      message.println("<h2> Execution '" + flow.getExecutionId() + "' of flow '" + flow.getFlowId() + "' has succeeded on " + azkabanName + "</h2>");
      message.println("<table>");
      message.println("<tr><td>Start Time</td><td>" + flow.getStartTime() + "</td></tr>");
      message.println("<tr><td>End Time</td><td>" + flow.getEndTime() + "</td></tr>");
      message.println("<tr><td>Duration</td><td>" + Utils.formatDuration(flow.getStartTime(), flow.getEndTime()) + "</td></tr>");
      message.println("</table>");
      message.println("");
      String executionUrl = "https://" + clientHostname + ":" + clientPortNumber + "/" + "executor?" + "execid=" + execId;
      message.println("<a href=\"" + executionUrl + "\">" + flow.getFlowId() + " Execution Link</a>");
      return true;
    }
    return false;
  }
}

代码示例来源:origin: com.linkedin.azkaban/azkaban-common

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

代码示例来源:origin: com.linkedin.azkaban/azkaban

message.println("<tr><td>Start Time</td><td>" + flow.getStartTime() + "</td></tr>");
message.println("<tr><td>End Time</td><td>" + flow.getEndTime() + "</td></tr>");
message.println("<tr><td>Duration</td><td>" + Utils.formatDuration(flow.getStartTime(), flow.getEndTime()) + "</td></tr>");
message.println("</table>");
message.println("");

代码示例来源:origin: com.linkedin.azkaban/azkaban

message.println("<tr><td>Start Time</td><td>" + flow.getStartTime() + "</td></tr>");
message.println("<tr><td>End Time</td><td>" + flow.getEndTime() + "</td></tr>");
message.println("<tr><td>Duration</td><td>" + Utils.formatDuration(flow.getStartTime(), flow.getEndTime()) + "</td></tr>");
message.println("</table>");
message.println("");

代码示例来源:origin: com.linkedin.azkaban/azkaban-common

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

代码示例来源:origin: com.linkedin.azkaban/azkaban-common

+ convertMSToString(flow.getEndTime()) + "</td></tr>");
message.println("<tr><td>Duration</td><td>"
  + Utils.formatDuration(flow.getStartTime(), flow.getEndTime())
  + "</td></tr>");
message.println("<tr><td>Status</td><td>" + flow.getStatus() + "</td></tr>");

相关文章