Examples of SystemMetrics


Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    /*
     * convert from a result set record to an object
     */
    private static SystemMetrics createSystemMetrics(ResultSet rs) {
  SystemMetrics obj = null;
  try {
      obj = new SystemMetrics(
                rs.getTimestamp("timestamp"),
                rs.getString("host"),
               
                rs.getDouble("load_15"),
                rs.getDouble("load_5"),
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

      // get simple value
            try {
    String query = getSingleQuery(SystemMetricsHome.table,"timestamp",timestamp);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        SystemMetrics obj = createSystemMetrics(rs);
        return obj;
    }
      } catch (Exception e) {
    log.error("exception:"+e.toString());
      }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    criteriaMap.put("host",host);

    String query = getCriteriaQuery(SystemMetricsHome.table,criteriaMap);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        SystemMetrics obj = createSystemMetrics(rs);
        return obj;
    }
      } catch (Exception e) {
    log.error("exception:"+e.toString());
      }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

  try {
      String query = getTimeBetweenQuery(SystemMetricsHome.table,starttime,endtime);     
      ResultSet rs = dbw.query(query);
      while (rs.next()) {
    SystemMetrics obj = createSystemMetrics(rs);
    collection.add(obj);
      }
  } catch (Exception e) {
      log.error("exception:"+e.toString());
  }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    // get one object
    @GET
    @Path("timestamp/{timestamp}")
    @Produces({"application/xml","text/xml"})
    public String getByTimestampXML( @PathParam ("timestamp") String timestamp) {
  SystemMetrics model = SystemMetricsHome.find(timestamp);
  return convertToXml(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

   
    @GET
    @Path("timestamp/{timestamp}")
    @Produces("application/json")
    public String getByTimestampJason( @PathParam ("timestamp") String timestamp) {
  SystemMetrics model = SystemMetricsHome.find(timestamp);
  return convertToJson(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

   
    @GET
    @Path("timestamp/{timestamp}")
    @Produces({"text/plain","text/csv"})
    public String getByTimestampCsv( @PathParam ("timestamp") String timestamp) {
  SystemMetrics model = SystemMetricsHome.find(timestamp);
  return convertToCsv(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    @GET
    @Path("timestamp/{timestamp}/host/{host}")
    @Produces({"application/xml","text/xml"})
  public String getByTimestampHostXML( @PathParam ("timestamp") String timestamp,
           @PathParam ("host") String host ) {
  SystemMetrics model = SystemMetricsHome.find(timestamp, host);
  return convertToXml(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    @GET
    @Path("timestamp/{timestamp}/host/{host}")
    @Produces("application/json")
  public String getByTimestampHostJason( @PathParam ("timestamp") String timestamp,
             @PathParam ("host") String host ) {
  SystemMetrics model = SystemMetricsHome.find(timestamp, host);
  return convertToJson(model);
    }
View Full Code Here

Examples of org.apache.hadoop.chukwa.rest.objects.SystemMetrics

    @GET
    @Path("timestamp/{timestamp}/host/{host}")
    @Produces({"text/plain","text/csv"})
  public String getByTimestampHostCsv( @PathParam ("timestamp") String timestamp,
           @PathParam ("host") String host ) {
  SystemMetrics model = SystemMetricsHome.find(timestamp, host);
  return convertToCsv(model);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.