PROT-4 updated CF JobDateInfo (add new columns), JpredArchive (add column ExecutionSt...
[proteocache.git] / datadb / compbio / cassandra / CassandraReader.java
index 941ad1c..f4ceee5 100644 (file)
@@ -53,12 +53,17 @@ public class CassandraReader {
        /*
         * getting data from the db JobDateInfo
         */
-       public long ReadDateTable(long queryDate) {
-               ResultSet results = session.execute("SELECT Total FROM JobDateInfo WHERE jobday = " + queryDate + ";");
+       public List<Long> ReadDateTable(long queryDate) {
+               ResultSet results = session.execute("SELECT * FROM JobDateInfo WHERE jobday = " + queryDate + ";");
                if (results.isExhausted())
-                       return 0;
+                       return null;
                Row therow = results.one();
-               long res = therow.getLong("Total");
+               List<Long> res = new ArrayList<Long>();
+               res.add(therow.getLong("Total"));
+               res.add(therow.getLong("TotalOK"));
+               res.add(therow.getLong("TotalStopped"));
+               res.add(therow.getLong("TotalError"));
+               res.add(therow.getLong("TotalTimeOut"));
                if (!results.isExhausted()) {
                        Date date = new Date (queryDate);
                        log.warn("CassandraReader.ReadDateTable: date row for " + date.toString () + " ("+ queryDate + ") duplicated ");