- Timestamp:
- 10/05/11 01:06:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java
r232 r236 34 34 throw new InvalidParameterException(); 35 35 } 36 String source = (String) parameters.get(0);37 String sequencesName = (String) parameters.get(1);36 String source; 37 String sequencesName; 38 38 String serverUrl = null; 39 39 int timeout = -1; … … 42 42 boolean generateFrequentUsers = false; 43 43 int frequentUserThreshold = 20; 44 if (parameters.size() >= 3) { 45 serverUrl = (String) parameters.get(2); 46 } 47 if (parameters.size() >= 6) { 48 timeout = Integer.parseInt((String) parameters.get(3)); 49 minLength = Integer.parseInt((String) parameters.get(4)); 50 maxLength = Integer.parseInt((String) parameters.get(5)); 51 } 52 if (parameters.size() >= 8) { 53 generateFrequentUsers = Boolean.parseBoolean((String) parameters 54 .get(6)); 55 frequentUserThreshold = Integer 56 .parseInt((String) parameters.get(7)); 44 try { 45 source = (String) parameters.get(0); 46 sequencesName = (String) parameters.get(1); 47 if (parameters.size() >= 3) { 48 serverUrl = (String) parameters.get(2); 49 } 50 if (parameters.size() >= 6) { 51 timeout = Integer.parseInt((String) parameters.get(3)); 52 minLength = Integer.parseInt((String) parameters.get(4)); 53 maxLength = Integer.parseInt((String) parameters.get(5)); 54 } 55 if (parameters.size() >= 8) { 56 generateFrequentUsers = Boolean 57 .parseBoolean((String) parameters.get(6)); 58 frequentUserThreshold = Integer.parseInt((String) parameters 59 .get(7)); 60 } 61 } catch (Exception e) { 62 throw new InvalidParameterException(); 57 63 } 58 64 … … 89 95 .getFrequentUserSequences(); 90 96 for (int i = 0; i < frequentUserIDs.size(); i++) { 91 GlobalDataContainer.getInstance().addData(97 if (GlobalDataContainer.getInstance().addData( 92 98 sequencesName + "_" + frequentUserIDs.get(i), 93 frequentUserSessions.get(i)); 99 frequentUserSessions.get(i))) { 100 Console.traceln("Old data \"" + sequencesName 101 + "\" overwritten"); 102 } 94 103 } 95 104 }
Note: See TracChangeset
for help on using the changeset viewer.