Package org.apache.hadoop.chukwa.util

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


              table = table + parts[i];
            }
            partition = partition - 3;
            String dropPartition = "drop table if exists " + table + "_"
                + partition + "_" + parts[parts.length - 1];
            dbw.execute(dropPartition);
            partition--;
            if(partition>=0) {
              dropPartition = "drop table if exists " + table + "_" + partition
                  + "_" + parts[parts.length - 1];
              dbw.execute(dropPartition);
View Full Code Here


            dbw.execute(dropPartition);
            partition--;
            if(partition>=0) {
              dropPartition = "drop table if exists " + table + "_" + partition
                  + "_" + parts[parts.length - 1];
              dbw.execute(dropPartition);
            }
          } catch (NumberFormatException e) {
            log
                .error("Error in parsing table partition number, skipping table:"
                    + tableList[0]);
View Full Code Here

    buffer = readFile(aFile);
    String tables[] = buffer.split(";");
    for(String table : tables) {
      if(table.length()>5) {
        try {
          db.execute(table);
        } catch (Exception e) {
          fail("Fail to retrieve meta data for database table: "+table);
        }
      }
    }
View Full Code Here

      while(rs.next()) {
        String table = rs.getString(1);
        list.add(table);
      }
      for(String table : list) {
        db.execute("drop table "+table);
      }
    } catch(Throwable ex) {
    } finally {
      if(db!=null) {
        db.close();
View Full Code Here

                 + File.separator + "database_create_tables.sql");
    buffer = readFile(aFile);
    String tables[] = buffer.split(";");
    for(String table : tables) {
      if(table.length()>5) {
        db.execute(table);
      }
    }
    db.close();
    for(int i=0;i<timeWindow.length;i++) {
      TableCreator tc = new TableCreator();
View Full Code Here

      while(rs.next()) {
        String table = rs.getString(1);
        list.add(table);
      }
      for(String table : list) {
        db.execute("drop table "+table);
      }
    } catch(Throwable ex) {
    } finally {
      if(db!=null) {
        db.close();
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.