Package org.apache.hadoop.chukwa.rest.objects

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


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

    private static ClientTrace createClientTrace(ResultSet rs) {
  ClientTrace obj=null;
  try {
      obj = new ClientTrace(
          rs.getTimestamp("Timestamp"),
          rs.getDouble("local_hdfs_read"),
          rs.getDouble("intra_rack_hdfs_read"),
          rs.getDouble("inter_rack_hdfs_read"),
          rs.getDouble("local_hdfs_write"),
View Full Code Here


    String query = getSingleQuery(ClientTraceHome.table,"timestamp",timestamp);
    log.error(query);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        log.error("find it.");
        ClientTrace obj = createClientTrace(rs);
        return obj;
    }
      } catch (Exception e) {
    log.error("exception:"+e.toString());
      }
View Full Code Here

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

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

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

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

TOP

Related Classes of org.apache.hadoop.chukwa.rest.objects.ClientTrace

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.