Changeset 434
- Timestamp:
- 01/12/11 23:25:41 (2 years ago)
- Location:
- raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua
- Files:
-
- 4 edited
-
engine/statistics/AuthenticationStatistic.java (modified) (2 diffs)
-
service/MUAProcess.java (modified) (2 diffs)
-
service/impl/MUAProcessImpl.java (modified) (2 diffs)
-
wsinterface/impl/MultiUnitAggregatorImpl.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/AuthenticationStatistic.java
r432 r434 254 254 String tableName = ReflectionHelper.findEntrySubclassForMethod(groupByField); 255 255 log.debug("Select {}, tableName {}",groupByField,tableName); 256 List results = getEntryHandler().query("select "+groupByField+",count(*) from "+tableName+" group by ("+groupByField+")");256 List results = getEntryHandler().query("select "+groupByField+",count(*) from "+tableName+" where (eventTime between '" + start + "' and '" + end + "') group by ("+groupByField+")"); 257 257 258 258 ArrayList<Group> groups = new ArrayList(); … … 306 306 String tableName = ReflectionHelper.findEntrySubclassForMethod(groupByField); 307 307 log.debug("Select {}, tableName {}",groupByField,tableName); 308 List results = getEntryHandler().query("select "+groupByField+" from "+tableName+" group by ("+groupByField+")");308 List results = getEntryHandler().query("select "+groupByField+" from "+tableName+" where (eventTime between '" + start + "' and '" + end + "') group by ("+groupByField+")"); 309 309 310 310 ArrayList<Group> groups = new ArrayList(); -
raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/MUAProcess.java
r415 r434 32 32 public interface MUAProcess { 33 33 34 34 /** 35 * 36 */ 35 37 public void poll(); 36 38 … … 59 61 */ 60 62 public void addAuthentications(UAEntryPush pushed); 63 64 /** 65 * 66 * @param statisticalUnitInformation 67 * @return 68 */ 69 public AggregatorGraphModel updateAndInvokeStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation); 61 70 } -
raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/service/impl/MUAProcessImpl.java
r415 r434 39 39 */ 40 40 public class MUAProcessImpl implements MUAProcess { 41 42 /* class logger */ 41 43 static Logger log = LoggerFactory.getLogger(MUAProcessImpl.class); 42 44 … … 178 180 } 179 181 182 @Override 183 public AggregatorGraphModel updateAndInvokeStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) { 184 if (lockR.tryLock()) { 185 try { 186 log.info("Webservice call to update and perform statistic {}",statisticalUnitInformation.getStatisticParameters().getUnitName()); 187 engine.updateStatisticalUnit(statisticalUnitInformation); 188 return engine.performStatistic(statisticalUnitInformation.getStatisticParameters().getUnitName()); 189 } catch (Exception e) { 190 // TODO either throw as service output, or deal with here 191 log.error(e.getMessage()); 192 e.printStackTrace(); 193 } finally { 194 lockR.unlock(); 195 } 196 } 197 return null; 198 199 } 200 180 201 } -
raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/wsinterface/impl/MultiUnitAggregatorImpl.java
r415 r434 109 109 } 110 110 111 @Override 112 public AggregatorGraphModel updateAndInvokeStatisticalUnit(StatisticalUnitInformation statisticalUnitInformation) { 113 return processService.updateAndInvokeStatisticalUnit(statisticalUnitInformation); 114 } 115 111 116 }
Note: See TracChangeset
for help on using the changeset viewer.
