Changeset 5156
- Timestamp:
- 12/21/10 18:46:12 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 13 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs
r5155 r5156 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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.IO; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockJob.cs
r5137 r5156 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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 using System.Linq; 4 using System.Text; 24 using System.Diagnostics; 25 using System.Threading; 26 using HeuristicLab.Common; 27 using HeuristicLab.Core; 5 28 using HeuristicLab.Hive; 6 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 using HeuristicLab.Core;8 using HeuristicLab.Common;9 using System.Drawing;10 using System.Threading;11 using System.Diagnostics;12 30 13 31 namespace HeuristicLab.Clients.Hive.Slave.Tests { … … 172 190 if (handler != null) handler(this, EventArgs.Empty); 173 191 } 174 192 175 193 public event EventHandler JobFailed; 176 194 protected virtual void OnJobFailed(Exception e) { 177 195 EventHandler handler = JobFailed; 178 EventArgs<Exception> ev = new EventArgs<Exception>(e); 196 EventArgs<Exception> ev = new EventArgs<Exception>(e); 179 197 if (handler != null) handler(this, ev); 180 198 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockServiceLocator.cs
r5104 r5156 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-2010 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 5 22 using HeuristicLab.Clients.Common; 6 23 using HeuristicLab.Services.Hive.Common.ServiceContracts; 7 24 8 25 namespace HeuristicLab.Clients.Hive.Slave.Tests { 9 internalclass MockServiceLocator : IServiceLocator {26 public class MockServiceLocator : IServiceLocator { 10 27 11 28 private MockHiveService service; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/PluginLoader.cs
r5055 r5156 1 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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 2 22 using System; 3 23 using System.Collections.Generic; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveTest.cs
r5137 r5156 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r5137 r5156 26 26 using System.Threading; 27 27 using HeuristicLab.Clients.Hive.Slave; 28 using HeuristicLab.Clients.Hive.Slave.ServiceContracts; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; … … 45 46 46 47 private WcfService wcfService; 47 public HeartbeatManager heartbeatManager; 48 48 private HeartbeatManager heartbeatManager; 49 49 private int coreThreadId; 50 51 private ISlaveCommunication ClientCom; 50 52 51 53 public Dictionary<Guid, Executor> ExecutionEngines { … … 66 68 public void Start() { 67 69 abortRequested = false; 68 Logger.Info("Hive Slave started"); 69 //TODO: implement slave console server 70 //SlaveConsoleServer server = new SlaveConsoleServer(); 71 //server.Start(); 70 71 ClientCom = SlaveClientCom.Instance.ClientCom; 72 ClientCom.LogMessage("Hive Slave started"); 72 73 73 74 ConfigManager manager = ConfigManager.Instance; … … 82 83 DeRegisterServiceEvents(); 83 84 84 //server.Close(); 85 Logger.Info("Program shutdown"); 85 ClientCom.LogMessage("Program shutdown"); 86 86 } 87 87 … … 101 101 102 102 private void RegisterServiceEvents() { 103 //TODO 103 WcfService.Instance.Connected += new EventHandler(wcfService_Connected); 104 WcfService.Instance.ExceptionOccured += new EventHandler<EventArgs<Exception>>(wcfService_ExceptionOccured); 104 105 } 105 106 106 107 private void DeRegisterServiceEvents() { 107 //TODO 108 WcfService.Instance.Connected -= wcfService_Connected; 109 WcfService.Instance.ExceptionOccured -= wcfService_ExceptionOccured; 110 } 111 112 void wcfService_ExceptionOccured(object sender, EventArgs<Exception> e) { 113 ClientCom.LogMessage("Connection to server interruped with exception: " + e.Value.Message); 114 ShutdownCore(); 115 } 116 117 void wcfService_Connected(object sender, EventArgs e) { 118 ClientCom.LogMessage("Connected successfully to Hive server"); 108 119 } 109 120 … … 113 124 /// <param name="container">The Container, containing the message</param> 114 125 private void DetermineAction(MessageContainer container) { 115 Logger.Info("Message: " + container.Message.ToString() + " for job: " + container.JobId);126 ClientCom.LogMessage("Message: " + container.Message.ToString() + " for job: " + container.JobId); 116 127 //TODO: find a better solution 117 128 if (container is ExecutorMessageContainer<Guid>) { … … 129 140 // appdomain already unloaded. Finishing job probably ongoing 130 141 } else 131 Logger.Error("AbortJob: Engine doesn't exist");142 ClientCom.LogMessage("AbortJob: Engine doesn't exist"); 132 143 break; 133 144 … … 146 157 } 147 158 } else { 148 Logger.Warn("Unknown MessageContainer: " + container);159 ClientCom.LogMessage("Unknown MessageContainer: " + container); 149 160 } 150 161 } 151 162 152 163 public void ShutdownCore() { 153 Logger.Info("Shutdown Signal received");154 Logger.Debug("Stopping heartbeat");164 ClientCom.LogMessage("Shutdown Signal received"); 165 ClientCom.LogMessage("Stopping heartbeat"); 155 166 heartbeatManager.StopHeartBeat(); 156 167 abortRequested = true; 157 Logger.Debug("Logging out");168 ClientCom.LogMessage("Logging out"); 158 169 159 170 lock (engines) { 160 Logger.Debug("engines locked");171 ClientCom.LogMessage("engines locked"); 161 172 foreach (KeyValuePair<Guid, AppDomain> kvp in appDomains) { 162 Logger.Debug("Shutting down Appdomain for " + kvp.Key);173 ClientCom.LogMessage("Shutting down Appdomain for " + kvp.Key); 163 174 appDomains[kvp.Key].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 164 175 AppDomain.Unload(kvp.Value); … … 166 177 } 167 178 WcfService.Instance.Disconnect(); 179 ClientCom.Shutdown(); 180 SlaveClientCom.Close(); 168 181 } 169 182 … … 176 189 public void PauseJob(JobData data) { 177 190 if (!Jobs.ContainsKey(data.JobId)) { 178 Logger.Error("Can't find job with id " + data.JobId);191 ClientCom.LogMessage("Can't find job with id " + data.JobId); 179 192 } else { 180 193 Job job = Jobs[data.JobId]; … … 194 207 try { 195 208 Guid jId = (Guid)jobId; 196 Logger.Info("Getting the finished job with id: " + jId);209 ClientCom.LogMessage("Getting the finished job with id: " + jId); 197 210 if (!engines.ContainsKey(jId)) { 198 Logger.Info("Engine doesn't exist");211 ClientCom.LogMessage("Engine doesn't exist"); 199 212 return; 200 213 } 201 214 if (!jobs.ContainsKey(jId)) { 202 Logger.Info("Job doesn't exist");215 ClientCom.LogMessage("Job doesn't exist"); 203 216 return; 204 217 } … … 210 223 211 224 try { 212 Logger.Info("Sending the finished job with id: " + jId);225 ClientCom.LogMessage("Sending the finished job with id: " + jId); 213 226 wcfService.UpdateJob(cJob, sJob); 214 227 SlaveStatusInfo.JobsProcessed++; 215 228 } 216 229 catch (Exception e) { 217 Logger.Info("Transmitting to server failed. Storing the finished job with id: " + jId + " to hdd (" + e.ToString() + ")");230 ClientCom.LogMessage("Transmitting to server failed. Storing the finished job with id: " + jId + " to hdd (" + e.ToString() + ")"); 218 231 } 219 232 finally { … … 233 246 /// <param name="e"></param> 234 247 private void StartJobInAppDomain(Job myJob, JobData jobData) { 235 Logger.Info("Received new job with id " + myJob.Id);248 ClientCom.LogMessage("Received new job with id " + myJob.Id); 236 249 String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString()); 237 250 bool pluginsPrepared = false; … … 239 252 try { 240 253 PluginCache.Instance.PreparePlugins(myJob, jobData); 241 Logger.Debug("Plugins fetched for job " + myJob.Id);254 ClientCom.LogMessage("Plugins fetched for job " + myJob.Id); 242 255 pluginsPrepared = true; 243 256 } 244 257 catch (Exception exception) { 245 Logger.Error(string.Format("Copying plugins for job {0} failed: {1}", myJob.Id, exception));258 ClientCom.LogMessage(string.Format("Copying plugins for job {0} failed: {1}", myJob.Id, exception)); 246 259 } 247 260 … … 254 267 jobs.Add(myJob.Id, myJob); 255 268 appDomains.Add(myJob.Id, appDomain); 256 Logger.Debug("Creating AppDomain");269 ClientCom.LogMessage("Creating AppDomain"); 257 270 Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName); 258 Logger.Debug("Created AppDomain");271 ClientCom.LogMessage("Created AppDomain"); 259 272 engine.JobId = myJob.Id; 260 273 engine.core = this; 261 Logger.Debug("Starting Engine for job " + myJob.Id);274 ClientCom.LogMessage("Starting Engine for job " + myJob.Id); 262 275 engines.Add(myJob.Id, engine); 263 276 engine.Start(jobData.Data); 264 277 SlaveStatusInfo.JobsFetched++; 265 Logger.Info("Increment FetchedJobs to:" + SlaveStatusInfo.JobsFetched);278 ClientCom.LogMessage("Increment FetchedJobs to:" + SlaveStatusInfo.JobsFetched); 266 279 } 267 280 } … … 269 282 } 270 283 catch (Exception exception) { 271 Logger.Error("Creating the Appdomain and loading the job failed for job " + myJob.Id);272 Logger.Error("Error thrown is: ", exception);284 ClientCom.LogMessage("Creating the Appdomain and loading the job failed for job " + myJob.Id); 285 ClientCom.LogMessage("Error thrown is: " + exception.ToString()); 273 286 KillAppDomain(myJob.Id); 274 287 } … … 278 291 public event EventHandler<EventArgs<Exception>> ExceptionOccured; 279 292 private void OnExceptionOccured(Exception e) { 280 Logger.Error("Error: " + e.ToString());293 ClientCom.LogMessage("Error: " + e.ToString()); 281 294 var handler = ExceptionOccured; 282 295 if (handler != null) handler(this, new EventArgs<Exception>(e)); … … 284 297 285 298 private void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 286 Logger.Error("Exception in AppDomain: " + e.ExceptionObject.ToString());299 ClientCom.LogMessage("Exception in AppDomain: " + e.ExceptionObject.ToString()); 287 300 KillAppDomain(new Guid(e.ExceptionObject.ToString())); 288 301 } … … 316 329 public void KillAppDomain(Guid id) { 317 330 if (EnqueueExecutorMessage<Guid>(KillAppDomain, id)) { 318 Logger.Debug("Shutting down Appdomain for Job " + id);331 ClientCom.LogMessage("Shutting down Appdomain for Job " + id); 319 332 lock (engines) { 320 333 try { … … 334 347 } 335 348 catch (CannotUnloadAppDomainException) { 336 Logger.Error("Could not unload AppDomain, will try again in 1 sec.");349 ClientCom.LogMessage("Could not unload AppDomain, will try again in 1 sec."); 337 350 Thread.Sleep(1000); 338 351 repeat--; … … 350 363 } 351 364 catch (Exception ex) { 352 Logger.Error("Exception when unloading the appdomain: ", ex);365 ClientCom.LogMessage("Exception when unloading the appdomain: " + ex.ToString()); 353 366 } 354 367 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeartbeatManager.cs
r5137 r5156 97 97 }; 98 98 99 Logger.Debug("Sending Heartbeat: " + heartBeatData);99 SlaveClientCom.Instance.ClientCom.LogMessage("Sending Heartbeat: " + heartBeatData); 100 100 List<MessageContainer> msgs = wcfService.SendHeartbeat(heartBeatData); 101 101 102 102 if (msgs == null) { 103 Logger.Debug("Error getting response from Heartbeat");103 SlaveClientCom.Instance.ClientCom.LogMessage("Error getting response from Heartbeat"); 104 104 OnExceptionOccured(new Exception("Error getting response from Heartbeat")); 105 105 } 106 106 107 Logger.Debug("Heartbeat Response received: ");108 msgs.ForEach(mc => Logger.Debug(mc.Message.ToString()));107 SlaveClientCom.Instance.ClientCom.LogMessage("Heartbeat Response received: "); 108 msgs.ForEach(mc => SlaveClientCom.Instance.ClientCom.LogMessage(mc.Message.ToString())); 109 109 msgs.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc)); 110 110 } … … 112 112 } 113 113 catch (Exception e) { 114 Logger.Error("Heartbeat Thread failed badly: " + e.Message);114 SlaveClientCom.Instance.ClientCom.LogMessage("Heartbeat Thread failed badly: " + e.Message); 115 115 OnExceptionOccured(e); 116 116 } … … 118 118 } 119 119 waitHandle.Close(); 120 Logger.Debug("Heartbeat thread stopped");120 SlaveClientCom.Instance.ClientCom.LogMessage("Heartbeat thread stopped"); 121 121 } 122 122 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj
r5137 r5156 64 64 <ItemGroup> 65 65 <Compile Include="ConfigManager.cs" /> 66 <Compile Include="SlaveClientCom.cs" /> 66 67 <Compile Include="Core.cs" /> 68 <Compile Include="DummyListener.cs" /> 67 69 <Compile Include="Executor.cs" /> 68 70 <Compile Include="HeartbeatManager.cs" /> … … 82 84 <DependentUpon>Settings.settings</DependentUpon> 83 85 </Compile> 86 <Compile Include="ServiceContracts\ISlaveCommunication.cs" /> 87 <Compile Include="ServiceContracts\ISlaveCommunicationCallbacks.cs" /> 88 <Compile Include="SlaveCommunicationService.cs" /> 84 89 <Compile Include="SlaveStatusInfo.cs" /> 85 90 <Compile Include="StatusCommons.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r5105 r5156 24 24 using System.IO; 25 25 using System.Linq; 26 using System.Reflection; 26 27 using System.Runtime.CompilerServices; 27 using HeuristicLab.Services.Hive.Common.ServiceContracts;28 using HeuristicLab. Services.Hive.Common.DataTransfer;28 using System.Threading; 29 using HeuristicLab.Clients.Hive.Salve; 29 30 using HeuristicLab.PluginInfrastructure; 30 31 using HeuristicLab.PluginInfrastructure.Manager; 31 using System.Threading; 32 using System.Reflection; 33 using HeuristicLab.Clients.Hive.Salve; 32 using HeuristicLab.Services.Hive.Common.DataTransfer; 34 33 35 34 namespace HeuristicLab.Clients.Hive.Slave { … … 127 126 internal void PreparePlugins(Job myJob, JobData jobData) { 128 127 lock (locker) { 129 Logger.Debug("Fetching plugins for job");128 SlaveClientCom.Instance.ClientCom.LogMessage("Fetching plugins for job"); 130 129 131 130 IEnumerable<Plugin> pluginDescriptions = WcfService.Instance.GetPlugins(); … … 153 152 } 154 153 if (!found) { 155 Logger.Debug("Plugin NOT found " + info.Name + ", " + info.Version);154 SlaveClientCom.Instance.ClientCom.LogMessage("Plugin NOT found " + info.Name + ", " + info.Version); 156 155 missingPlugins.Add(info); 157 156 missingGuids.Add(info.Id); … … 160 159 } 161 160 162 Logger.Debug("First run - Update the plugins in the cache");161 SlaveClientCom.Instance.ClientCom.LogMessage("First run - Update the plugins in the cache"); 163 162 localPlugins.AddRange(missingPlugins); 164 163 … … 176 175 if (pd != null) { 177 176 foreach (IPluginFile ipf in pd.Files) { 178 Logger.Debug(string.Format("deleting {0}", Path.GetFileName(ipf.Name)));177 SlaveClientCom.Instance.ClientCom.LogMessage(string.Format("deleting {0}", Path.GetFileName(ipf.Name))); 179 178 File.Delete(ipf.Name); 180 179 } … … 195 194 internal void DeletePluginsForJob(Guid id) { 196 195 try { 197 Logger.Debug("unloading...");196 SlaveClientCom.Instance.ClientCom.LogMessage("unloading..."); 198 197 int tries = 5; 199 198 while (tries > 0) { … … 210 209 } 211 210 catch (Exception ex) { 212 Logger.Debug("failed while unloading " + id + " with exception " + ex);211 SlaveClientCom.Instance.ClientCom.LogMessage("failed while unloading " + id + " with exception " + ex); 213 212 } 214 213 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs
r5105 r5156 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Clients.Common; 25 using HeuristicLab.Clients.Hive.Slave.Properties; 24 26 using HeuristicLab.Common; 25 using HeuristicLab.Clients.Common; 27 using HeuristicLab.Services.Hive.Common; 28 using HeuristicLab.Services.Hive.Common.DataTransfer; 26 29 using HeuristicLab.Services.Hive.Common.ServiceContracts; 27 using HeuristicLab.Services.Hive.Common.DataTransfer;28 using HeuristicLab.Services.Hive.Common;29 using HeuristicLab.Clients.Hive.Slave.Properties;30 30 31 31 namespace HeuristicLab.Clients.Hive.Salve { … … 43 43 get { 44 44 if (instance == null) { 45 Logger.Debug("New WcfService Instance created");46 45 instance = new WcfService(); 47 46 } … … 54 53 55 54 public event EventHandler Connected; 56 p ublicvoid OnConnected() {55 private void OnConnected() { 57 56 var handler = Connected; 58 57 if (handler != null) handler(this, EventArgs.Empty); 59 58 } 60 59 60 public event EventHandler<EventArgs<Exception>> ExceptionOccured; 61 private void OnExceptionOccured(Exception e) { 62 var handler = ExceptionOccured; 63 if (handler != null) handler(this, new EventArgs<Exception>(e)); 64 } 65 61 66 /// <summary> 62 67 /// Constructor … … 72 77 using (Disposable<IHiveService> service = ServiceLocator.Instance.GetService()) { 73 78 try { 74 Logger.Debug("Starting the Connection Process");75 79 ConnState = NetworkEnum.WcfConnState.Connected; 76 80 ConnectedSince = DateTime.Now; … … 105 109 private void HandleNetworkError(Exception e) { 106 110 ConnState = NetworkEnum.WcfConnState.Failed; 107 Logger.Error("Network exception occurred: " + e);108 111 OnExceptionOccured(e); 109 112 } … … 247 250 } 248 251 } 249 250 public event EventHandler<EventArgs<Exception>> ExceptionOccured;251 private void OnExceptionOccured(Exception e) {252 Logger.Error("Error: " + e.ToString());253 var handler = ExceptionOccured;254 if (handler != null) handler(this, new EventArgs<Exception>(e));255 }256 252 } 257 253 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/app.config
r5105 r5156 13 13 </HeuristicLab.Clients.Hive.Slave.Properties.Settings> 14 14 </userSettings> 15 16 <system.serviceModel> 17 <services> 18 <service name="HeuristicLab.Clients.Hive.Slave.SlaveCommunicationService"> 19 <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" 20 binding="netNamedPipeBinding" 21 contract="HeuristicLab.Clients.Hive.Slave.ServiceContracts.ISlaveCommunication" 22 /> 23 </service> 24 </services> 25 </system.serviceModel> 26 15 27 </configuration> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/IServiceLocator.cs
r5055 r5156 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-2010 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 HeuristicLab.Clients.Common; 5 23 using HeuristicLab.Services.Hive.Common.ServiceContracts; 6 using HeuristicLab.Services.Hive.Common;7 using HeuristicLab.Clients.Common;8 24 9 25 namespace HeuristicLab.Clients.Hive { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/PersistenceUtil.cs
r4629 r5156 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-2010 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 5 22 using System.IO; 6 23 using HeuristicLab.Persistence.Default.Xml; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Hive 3.4.sln
r5078 r5156 55 55 EndProject 56 56 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Hive.Tests-3.4", "HeuristicLab.Services.Hive.Tests\HeuristicLab.Services.Hive.Tests-3.4.csproj", "{17187EAC-5D8C-4B11-9CEA-D88F71B59658}" 57 EndProject 58 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4", "HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4\HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj", "{464D70B8-2D91-485C-B622-22E4A4891C68}" 57 59 EndProject 58 60 Global … … 179 181 {17187EAC-5D8C-4B11-9CEA-D88F71B59658}.Release|Mixed Platforms.Build.0 = Release|Any CPU 180 182 {17187EAC-5D8C-4B11-9CEA-D88F71B59658}.Release|x86.ActiveCfg = Release|Any CPU 183 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 184 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|Any CPU.Build.0 = Debug|Any CPU 185 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 186 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|Mixed Platforms.Build.0 = Debug|x86 187 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|x86.ActiveCfg = Debug|x86 188 {464D70B8-2D91-485C-B622-22E4A4891C68}.Debug|x86.Build.0 = Debug|x86 189 {464D70B8-2D91-485C-B622-22E4A4891C68}.Release|Any CPU.ActiveCfg = Release|x86 190 {464D70B8-2D91-485C-B622-22E4A4891C68}.Release|Mixed Platforms.ActiveCfg = Release|x86 191 {464D70B8-2D91-485C-B622-22E4A4891C68}.Release|Mixed Platforms.Build.0 = Release|x86 192 {464D70B8-2D91-485C-B622-22E4A4891C68}.Release|x86.ActiveCfg = Release|x86 193 {464D70B8-2D91-485C-B622-22E4A4891C68}.Release|x86.Build.0 = Release|x86 181 194 EndGlobalSection 182 195 GlobalSection(SolutionProperties) = preSolution -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r5155 r5156 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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; 4 using System.Text;5 25 using System.Linq.Expressions; 6 26 7 27 namespace HeuristicLab.Services.Hive.DataAccess { 8 using DT = HeuristicLab.Services.Hive.Common.DataTransfer;9 28 using HeuristicLab.Services.Hive.Common.DataTransfer; 10 29 using HeuristicLab.Services.Hive.DataAccess.Properties; 30 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 11 31 12 32 public class HiveDao : IHiveDao { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockAuthorizationManager.cs
r5095 r5156 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-2010 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.Tests.Mocks { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockLifecycleManager.cs
r5095 r5156 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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 using System.Linq; 4 using System.Text; 24 using HeuristicLab.Services.Hive.Common; 5 25 using HeuristicLab.Services.Hive.Common.DataTransfer; 6 using HeuristicLab.Services.Hive.Common;7 26 8 27 namespace HeuristicLab.Services.Hive.Tests.Mocks { … … 10 29 11 30 public void Start() { 12 31 13 32 } 14 33 15 34 public void Stop() { 16 35 17 36 } 18 37 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs
r5106 r5156 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-2010 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 HeuristicLab.Services.Hive.DataAccess; 5 23 using HeuristicLab.Services.Hive.Tests.Mocks; 6 using HeuristicLab.Services.Hive.DataAccess;7 24 8 25 namespace HeuristicLab.Services.Hive.Tests { … … 24 41 private ILifecycleManager lifecycleManager; 25 42 public ILifecycleManager LifecycleManager { 26 get { 27 return defaultServiceLocator.LifecycleManager; 43 get { 44 return defaultServiceLocator.LifecycleManager; 28 45 } 29 46 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/PluginLoader.cs
r5078 r5156 1 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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 2 22 using System; 3 23 using System.Collections.Generic; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs
r5155 r5156 1 using System; 2 using System.Text; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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; 3 23 using System.Collections.Generic; 4 24 using System.Linq; 5 using Microsoft.VisualStudio.TestTools.UnitTesting; 25 using HeuristicLab.Clients.Hive; 26 using HeuristicLab.Clients.Hive.Slave.Tests; 6 27 using HeuristicLab.Services.Hive.Common.DataTransfer; 7 28 using HeuristicLab.Services.Hive.Common.ServiceContracts; 8 using HeuristicLab.Clients.Hive.Slave.Tests; 9 using HeuristicLab.Clients.Hive; 29 using Microsoft.VisualStudio.TestTools.UnitTesting; 10 30 11 31 namespace HeuristicLab.Services.Hive.Tests { 12 using DA = HeuristicLab.Services.Hive.DataAccess;13 using DT = HeuristicLab.Services.Hive.Common.DataTransfer;14 using HeuristicLab.Services.Hive.Common;15 32 using System.Threading; 16 33 using HeuristicLab.Hive; 34 using HeuristicLab.Services.Hive.Common; 35 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 17 36 18 37 [TestClass]
Note: See TracChangeset
for help on using the changeset viewer.