Package org.springframework.yarn.support.console.ApplicationsReport

Examples of org.springframework.yarn.support.console.ApplicationsReport.SubmittedReportBuilder


   * @param type the type
   * @param headers the headers
   * @return the submitted report
   */
  protected String getSubmittedReport(YarnClient client, boolean verbose, String type, Map<String,String> headers) {
    SubmittedReportBuilder builder = ApplicationsReport.submittedReportBuilder();
    builder.add(SubmittedField.ID, SubmittedField.USER, SubmittedField.NAME, SubmittedField.QUEUE,
        SubmittedField.TYPE, SubmittedField.STARTTIME, SubmittedField.FINISHTIME, SubmittedField.STATE,
        SubmittedField.FINALSTATUS, SubmittedField.ORIGTRACKURL)
        .sort(SubmittedField.ID);
    if (verbose) {
      builder.from(client.listApplications(type));
    } else {
      builder.from(client.listRunningApplications(type));
    }
    if (headers != null) {
      for (Entry<String, String> entry : headers.entrySet()) {
        builder.header(entry.getKey(), entry.getValue());
      }
    }
    return builder.build().toString();
  }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.support.console.ApplicationsReport.SubmittedReportBuilder

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.