- * fill new table
- */
- public void FillNewTable() {
- final long StartTime = System.currentTimeMillis();
- long erldate = CassandraNativeConnector.getEarliestDateInDB();
- Calendar runnicCal = Calendar.getInstance();
- runnicCal.setTime(new Date(erldate));
- Calendar endcal = Calendar.getInstance();
- long endTime = endcal.getTime().getTime();
- for (Date date = runnicCal.getTime(); date.getTime() < endTime; runnicCal.add(Calendar.DATE, 1), date = runnicCal.getTime()) {
- try {
- ResultSet results = session.execute("SELECT * FROM ProteinData WHERE jobtime = " + date.getTime() + ";");
- session.execute("INSERT INTO JobDateInfo " + "(jobday, Total)" + " VALUES (" + date.getTime() + "," + results.all().size()
- + ");");
- } catch (QueryExecutionException e) {
- e.printStackTrace();
- }
- }
- System.out.println("Table JobDateInfo filled: total time is " + (System.currentTimeMillis() - StartTime) + " msec");
- }
-
- /*