public static void runQueries(Connection con, int numberOfQueryIterations) throws SQLException {
    Statement stmt = con.createStatement();

    for (int i = 0; i < numberOfQueryIterations; i++) {
      System.out.println("Iteration #" + i);

      // select query
      String sql = "from table1 SELECT * group by table1.key order by table1.key desc";
      executeQuery(stmt, sql, true);

      // count query
      sql = "select count(*) from table1";
      executeQuery(stmt, sql, true);

      // join with group-by, having, order-by
      sql = "select t1.key,count(t1.key) as cnt from table1 t1"
              + " join table2 t2 on (t1.key = t2.key) group by t1.key having cnt > 5 order by cnt desc";
      executeQuery(stmt, sql, true);

      // full outer join
      sql = "select table1.value, table2.value from table1 full outer join table2 "
              + "on (table1.key = table2.key)";
      executeQuery(stmt, sql, true);
    }

  }
@param con
@param numberOfQueryIterations
@throws SQLException
testutils/src/java/org/apache/hive/testutils/jdbc/HiveBurnInClient.java