Changeset 6367
- Timestamp:
- 06/06/11 16:30:05 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 4 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConsoleTests/Program.cs
r6357 r6367 133 133 134 134 //TestAbortAll(mockPluginService, jobManager); 135 TestStopAll(mockPluginService, jobManager);135 //TestStopAll(mockPluginService, jobManager); 136 136 //TestPauseAll(mockPluginService, jobManager); 137 137 … … 143 143 StartStatusObservationThread(); 144 144 145 Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4);145 Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 10, 1000); 146 146 Task.WaitAll(tasks); 147 147 … … 209 209 StartStatusObservationThread(); 210 210 211 Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4, 5000);211 Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4, 1000); 212 212 Task.WaitAll(tasks); 213 213 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ApplicationConstants.cs
r6267 r6367 21 21 22 22 using System; 23 using System.Data;24 23 25 24 namespace HeuristicLab.Services.Hive.Common { 26 25 public class ApplicationConstants { 27 28 public static System.Data.IsolationLevel IsolationLevel = IsolationLevel.ReadUncommitted;29 30 26 public static TimeSpan SlaveHeartbeatTimeout = TimeSpan.FromMinutes(1); 31 27 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveItem.cs
r5614 r6367 10 10 11 11 public HiveItem() { } 12 13 12 } 14 13 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/NamedHiveItem.cs
r5614 r6367 1 using System.Runtime.Serialization; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Runtime.Serialization; 2 23 3 24 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 10 31 11 32 protected NamedHiveItem() { } 12 13 33 } 14 34 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Plugin.cs
r5614 r6367 40 40 41 41 public Plugin() { } 42 43 44 42 } 45 43 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/PluginData.cs
r5614 r6367 35 35 36 36 public PluginData() { } 37 38 39 37 } 40 38 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Resource.cs
r5614 r6367 31 31 32 32 public Resource() { } 33 34 33 } 35 34 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/SlaveStatistics.cs
r6229 r6367 39 39 [DataMember] 40 40 public double CpuUtilization { get; set; } 41 42 41 } 43 42 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/StateLog.cs
r5614 r6367 41 41 42 42 public StateLog() { } 43 44 43 } 45 44 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Statistics.cs
r6229 r6367 31 31 public DateTime TimeStamp { get; set; } 32 32 [DataMember] 33 public IEnumerable<UserStatistics> UserStatistics { get;set;}33 public IEnumerable<UserStatistics> UserStatistics { get; set; } 34 34 [DataMember] 35 public IEnumerable<SlaveStatistics> SlaveStatistics { get;set;}35 public IEnumerable<SlaveStatistics> SlaveStatistics { get; set; } 36 36 37 37 public Statistics() { } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/UserStatistics.cs
r6229 r6367 37 37 [DataMember] 38 38 public TimeSpan StartToEndTime { get; set; } 39 40 41 42 39 } 43 40 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/MessageContainer.cs
r5599 r6367 48 48 ShutdownSlave, // slave should shutdown immediately without submitting results 49 49 SayHello, // Slave should say hello, because he is unknown to the server 50 51 // *** commands from execution engine ***52 AddChildJob, // adds a new child job for the provided jobId53 GetChildJobs, // return all child jobs of the provided jobId54 DeleteChildJobs, // delete all child jobs of the provided jobId55 50 }; 56 51 … … 63 58 public Guid JobId { get; set; } 64 59 60 [StorableConstructor] 61 protected MessageContainer(bool deserializing) { } 65 62 protected MessageContainer() { } 66 63 public MessageContainer(MessageType message) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Exceptions/DaoException.cs
r5404 r6367 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 5 23 6 24 namespace HeuristicLab.Services.Hive.DataAccess { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r6357 r6367 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 68 68 if (entity == null) db.Jobs.InsertOnSubmit(Convert.ToEntity(dto)); 69 69 else Convert.ToEntity(dto, entity); 70 // todo: update required plugins 70 foreach (Guid pluginId in dto.PluginsNeededIds) { 71 if (db.RequiredPlugins.Count(p => p.PluginId == pluginId) == 0) { 72 db.RequiredPlugins.InsertOnSubmit(new RequiredPlugin() { JobId = entity.JobId, PluginId = pluginId }); 73 } 74 } 71 75 db.SubmitChanges(); 72 76 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs
r6267 r6367 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Transactions; 3 24 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6362 r6367 41 41 jobData.JobId = job.Id; 42 42 jobData.LastUpdate = DateTime.Now; 43 if (resourceIds != null) { 44 foreach (Guid slaveGroupId in resourceIds) { 45 dao.AssignJobToResource(job.Id, slaveGroupId); 46 } 47 } else { 48 // todo: use default group 43 foreach (Guid slaveGroupId in resourceIds) { 44 dao.AssignJobToResource(job.Id, slaveGroupId); 49 45 } 50 46 dao.AddJobData(jobData); … … 138 134 job.Command = null; 139 135 } else if (jobState == JobState.Paused && !job.Command.HasValue) { 140 // job was paused and uploaded by slave without the user-command to pause it -> set waiting136 // slave paused and uploaded the job (no user-command) -> set waiting. 141 137 job = dao.UpdateJobState(jobId, JobState.Waiting, slaveId, userId, exception); 142 138 } … … 256 252 dbSlave.SlaveState = SlaveState.Idle; 257 253 258 // don't update those properties: 259 // dbSlave.IsAllowedToCalculate = slaveInfo.IsAllowedToCalculate; 260 // dbSlave.ParentResourceId = slaveInfo.ParentResourceId; 254 // don't update those properties: dbSlave.IsAllowedToCalculate, dbSlave.ParentResourceId 261 255 262 256 dao.UpdateSlave(dbSlave); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs
r6267 r6367 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; … … 48 69 } 49 70 stats.SlaveStatistics = slaveStats; 50 51 71 stats.UserStatistics = dao.GetUserStatistics(); 52 53 72 dao.AddStatistics(stats); 54 73 } … … 91 110 /// </summary> 92 111 private void SetTimeoutJobsWaiting() { 93 var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.CalculatingJobHeartbeatTimeout) 112 var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.CalculatingJobHeartbeatTimeout) 94 113 || (x.State == JobState.Transferring && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.TransferringJobHeartbeatTimeout)); 95 114 foreach (var j in jobs) {
Note: See TracChangeset
for help on using the changeset viewer.