Package org.apache.aurora.scheduler.stats.ResourceCounter

Examples of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType


        FluentIterable.from(counter.computeConsumptionTotals()).transform(TO_DISPLAY).toList();
    return Response.ok(fillTemplate(metrics)).build();
  }

  private MetricType getTypeByName(String name) throws WebApplicationException {
    MetricType type = MetricType.valueOf(name.toUpperCase(Locale.ENGLISH));
    if (type == null) {
      throw new WebApplicationException(
          Response.status(Status.BAD_REQUEST).entity("Invalid metric type.").build());
    }
    return type;
View Full Code Here


   */
  @GET
  @Path("/{metric}")
  @Produces(MediaType.TEXT_HTML)
  public Response aggregateRoles(@PathParam("metric") final String metric) {
    final MetricType type = getTypeByName(metric);

    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        String role = task.getOwner().getRole();
View Full Code Here

  @Produces(MediaType.TEXT_HTML)
  public Response aggregateJobs(
      @PathParam("metric") String metric,
      @PathParam("role") String role) {

    MetricType type = getTypeByName(metric);
    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        return new Display(task.getJobName(), null);
      }
View Full Code Here

        FluentIterable.from(counter.computeConsumptionTotals()).transform(TO_DISPLAY).toList();
    return Response.ok(fillTemplate(metrics)).build();
  }

  private MetricType getTypeByName(String name) throws WebApplicationException {
    MetricType type = MetricType.valueOf(name.toUpperCase(Locale.ENGLISH));
    if (type == null) {
      throw new WebApplicationException(
          Response.status(Status.BAD_REQUEST).entity("Invalid metric type.").build());
    }
    return type;
View Full Code Here

   */
  @GET
  @Path("/{metric}")
  @Produces(MediaType.TEXT_HTML)
  public Response aggregateRoles(@PathParam("metric") final String metric) {
    final MetricType type = getTypeByName(metric);

    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        String role = task.getJob().getRole();
View Full Code Here

  @Produces(MediaType.TEXT_HTML)
  public Response aggregateJobs(
      @PathParam("metric") String metric,
      @PathParam("role") String role) {

    MetricType type = getTypeByName(metric);
    Function<ITaskConfig, Display> toKey = new Function<ITaskConfig, Display>() {
      @Override
      public Display apply(ITaskConfig task) {
        return new Display(task.getJobName(), null);
      }
View Full Code Here

TOP

Related Classes of org.apache.aurora.scheduler.stats.ResourceCounter.MetricType

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.