Examples of ClusterSystemMetrics


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

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

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

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

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

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

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

    private static String table="[cluster_system_metrics]";
    private static final Log log = LogFactory
  .getLog(ClusterSystemMetricsHome.class);

    private static ClusterSystemMetrics createClusterSystemMetrics(ResultSet rs) {
  ClusterSystemMetrics obj=null;
  try {
      obj= new ClusterSystemMetrics(
            rs.getTimestamp("Timestamp"),
            rs.getInt("host"),
            rs.getDouble("load_15"),
            rs.getDouble("load_5"),
            rs.getDouble("load_1"),
View Full Code Here

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

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

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

  try {
      String query = getTimeBetweenQuery(ClusterSystemMetricsHome.table,starttime,endtime);     
      ResultSet rs = dbw.query(query);
      while (rs.next()) {
    ClusterSystemMetrics obj = createClusterSystemMetrics(rs);
    collection.add(obj);
      }
  } catch (Exception e) {
      log.error("exception:"+e.toString());
  }
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.