Simplify the jobdateinfo table (remove Total, Program, Version)
[proteocache.git] / datadb / compbio / cassandra / readers / DailyStatisticsReader.java
index 2a41621..123af43 100644 (file)
@@ -43,9 +43,12 @@ public class DailyStatisticsReader extends CassandraReader {
                                return null;
                        if (results.isExhausted())
                                continue;
-                       Row therow = results.one();
-                       Total res = new Total(therow.getLong("Total"), therow.getLong("TotalOK"), therow.getLong("TotalStopped"),
-                                       therow.getLong("TotalError"), therow.getLong("TotalTimeOut"));
+                       Row row = results.one();
+                       long nOK = row.getLong("TotalOK");
+                       long nStopped = row.getLong("TotalStopped");
+                       long nError = row.getLong("TotalError");
+                       long nTimeOut = row.getLong("TotalTimeOut");
+                       Total res = new Total(nOK + nStopped + nError + nTimeOut, nOK, nStopped, nError, nTimeOut);
                        if (!results.isExhausted()) {
                                Date dat = new Date(date.getTime());
                                log.warn("CassandraReader.ReadDateTable: date row for " + dat.toString() + " (" + date.getTime() + ") duplicated ");