Package org.apache.hadoop.chukwa.util

Examples of org.apache.hadoop.chukwa.util.DatabaseWriter.query()


    Map<String, String> criteriaMap = new HashMap<String,String>();
    criteriaMap.put("timestamp",convertLongToDateString(Long.parseLong(timestamp)));
    criteriaMap.put("host",host);

    String query = getCriteriaQuery(DfsNameNodeHome.table,criteriaMap);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        DfsNameNode obj = createDfsNameNode(rs);
        return obj;
    }
      } catch (Exception e) {
View Full Code Here


  Collection<DfsNameNode> collection = new Vector<DfsNameNode>();

  try {
      String query = getTimeBetweenQuery(DfsNameNodeHome.table,starttime,endtime);     
      ResultSet rs = dbw.query(query);
      while (rs.next()) {
    DfsNameNode obj = createDfsNameNode(rs);
    collection.add(obj);
      }
  } catch (Exception e) {
View Full Code Here

  if (timestamp != null) {
      // 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) {
View Full Code Here

  Collection<ClusterSystemMetrics> collection = new Vector<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) {
View Full Code Here

  if (timestamp != null) {
      // get simple value
            try {
    String query = getSingleQuery(DiskHome.table,"timestamp",timestamp);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        Disk obj = createDisk(rs);
        return obj;
    }
      } catch (Exception e) {
View Full Code Here

    criteriaMap.put("timestamp",convertLongToDateString(Long.parseLong(timestamp)));
    criteriaMap.put("host",host);
    criteriaMap.put("mount",mount);

    String query = getCriteriaQuery(DiskHome.table,criteriaMap);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        Disk obj = createDisk(rs);
        return obj;
    }
      } catch (Exception e) {
View Full Code Here

  Collection<Disk> collection = new Vector<Disk>();

  try {
      String query = getTimeBetweenQuery(DiskHome.table,starttime,endtime);     
      ResultSet rs = dbw.query(query);
      while (rs.next()) {
    Disk obj = createDisk(rs);
    collection.add(obj);
      }
  } catch (Exception e) {
View Full Code Here

  if (timestamp != null) {
      // get simple value
            try {
    String query = getSingleQuery(ClusterDiskHome.table,"timestamp",timestamp);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        ClusterDisk obj = createClusterDisk(rs);
        return obj;
    }
      } catch (Exception e) {
View Full Code Here

    Map<String, String> criteriaMap = new HashMap<String,String>();
    criteriaMap.put("timestamp",convertLongToDateString(Long.parseLong(timestamp)));
    criteriaMap.put("mount",mount);

    String query = getCriteriaQuery(ClusterDiskHome.table,criteriaMap);
        ResultSet rs = dbw.query(query);
        if (rs.next()) {
        ClusterDisk obj = createClusterDisk(rs);
        return obj;
    }
      } catch (Exception e) {
View Full Code Here

  Collection<ClusterDisk> collection = new Vector<ClusterDisk>();

  try {
      String query = getTimeBetweenQuery(ClusterDiskHome.table,starttime,endtime);     
      ResultSet rs = dbw.query(query);
      while (rs.next()) {
    ClusterDisk obj = createClusterDisk(rs);
    collection.add(obj);
      }
  } catch (Exception e) {
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.