Changeset 3578
- Timestamp:
- 05/01/10 13:58:24 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Grid/3.2/ProcessingEngine.cs ¶
r2073 r3578 81 81 } catch(Exception ex) { 82 82 errorMessage = CreateErrorMessage(ex); 83 HeuristicLab.Tracing. HiveLogger.Error(errorMessage);83 HeuristicLab.Tracing.Logger.Error(errorMessage); 84 84 // push operation on stack again 85 85 myExecutionStack.Push(atomicOperation); -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Common/3.2/HeuristicLab.Hive.Client.Common-3.2.csproj ¶
r3022 r3578 82 82 <ItemGroup> 83 83 <Compile Include="CommonPlugin.cs" /> 84 <Compile Include="Logging.cs" />85 84 <Compile Include="MessageQueue.cs" /> 86 85 <Compile Include="NetworkEnum.cs" /> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/CommunicationsPlugin.cs ¶
r2591 r3578 35 35 [PluginDependency("HeuristicLab.Hive.Client.Common-3.2")] 36 36 [PluginDependency("HeuristicLab.Hive.Contracts-3.2")] 37 [PluginDependency("HeuristicLab.Tracing")] 37 38 public class CommunicationsPlugin : PluginBase { 38 39 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/HeuristicLab.Hive.Client.Communication-3.2.csproj ¶
r3203 r3578 120 120 <Name>HeuristicLab.PluginInfrastructure</Name> 121 121 </ProjectReference> 122 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 123 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 124 <Name>HeuristicLab.Tracing-3.2</Name> 125 </ProjectReference> 122 126 </ItemGroup> 123 127 <ItemGroup> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs ¶
r3203 r3578 33 33 using System.IO; 34 34 using System.Runtime.Serialization.Formatters.Binary; 35 using HeuristicLab.Tracing; 35 36 36 37 namespace HeuristicLab.Hive.Client.Communication { … … 45 46 /// <returns>the Instance of the WcfService class</returns> 46 47 public static WcfService Instance { 47 get { 48 get { 48 49 if (instance == null) { 50 Logger.Debug("New WcfService Instance created"); 49 51 instance = new WcfService(); 50 52 } … … 76 78 public void Connect() { 77 79 try { 80 Logger.Debug("Starting the Connection Process"); 78 81 if (String.Empty.Equals(ServerIP) || ServerPort == 0) { 79 Logg ing.Instance.Info(this.ToString(),"No Server IP or Port set!");82 Logger.Info("No Server IP or Port set!"); 80 83 return; 81 84 } 85 86 Logger.Debug("Creating the new connection proxy"); 82 87 proxy = new ClientFacadeClient( 83 88 WcfSettings.GetStreamedBinding(), 84 89 new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator") 85 90 ); 86 91 Logger.Debug("Created the new connection proxy"); 92 93 Logger.Debug("Registring new Events"); 87 94 proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted); 88 95 proxy.SendStreamedJobCompleted += new EventHandler<SendStreamedJobCompletedEventArgs>(proxy_SendStreamedJobCompleted); … … 90 97 proxy.ProcessSnapshotStreamedCompleted += new EventHandler<ProcessSnapshotStreamedCompletedEventArgs>(proxy_ProcessSnapshotStreamedCompleted); 91 98 proxy.ProcessHeartBeatCompleted += new EventHandler<ProcessHeartBeatCompletedEventArgs>(proxy_ProcessHeartBeatCompleted); 99 Logger.Debug("Registered new Events"); 100 Logger.Debug("Opening the Connection"); 92 101 proxy.Open(); 102 Logger.Debug("Opened the Connection"); 93 103 94 104 ConnState = NetworkEnum.WcfConnState.Connected; 95 105 ConnectedSince = DateTime.Now; 96 97 if (Connected != null) 98 Connected(this, new EventArgs()); 99 //Todo: This won't be hit. EVER 106 107 if (Connected != null) { 108 Logger.Debug("Calling the connected Event"); 109 Connected(this, new EventArgs()); 110 //Todo: This won't be hit. EVER 111 } 100 112 if (ConnState == NetworkEnum.WcfConnState.Failed) 101 113 ConnectionRestored(this, new EventArgs()); … … 113 125 /// <param name="serverPort">current Server Port</param> 114 126 public void Connect(String serverIP, int serverPort) { 127 Logger.Debug("Called Connected with " + serverIP + ":" + serverPort); 115 128 String oldIp = this.ServerIP; 116 129 int oldPort = this.ServerPort; … … 124 137 125 138 public void SetIPAndPort(String serverIP, int serverPort) { 139 Logger.Debug("Called with " + serverIP + ":" + serverPort); 126 140 this.ServerIP = serverIP; 127 141 this.ServerPort = serverPort; … … 141 155 private void HandleNetworkError(Exception e) { 142 156 ConnState = NetworkEnum.WcfConnState.Failed; 143 Logg ing.Instance.Error(this.ToString(), "exception: ",e);157 Logger.Error("Network exception occurred: " + e); 144 158 } 145 159 … … 152 166 public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted; 153 167 public void LoginAsync(ClientDto clientInfo) { 154 if (ConnState == NetworkEnum.WcfConnState.Connected) 168 if (ConnState == NetworkEnum.WcfConnState.Connected) { 169 Logger.Debug("STARTED: Login Async"); 155 170 proxy.LoginAsync(clientInfo); 171 } 156 172 } 157 173 private void proxy_LoginCompleted(object sender, LoginCompletedEventArgs e) { 158 if (e.Error == null) 174 if (e.Error == null) { 175 Logger.Debug("ENDED: Login Async"); 159 176 LoginCompleted(sender, e); 160 else177 } else 161 178 HandleNetworkError(e.Error.InnerException); 162 179 } … … 165 182 try { 166 183 if (ConnState == NetworkEnum.WcfConnState.Connected) { 184 Logger.Debug("STARTED: Login Sync"); 167 185 Response res = proxy.Login(clientInfo); 168 186 if (!res.Success) { 169 Logg ing.Instance.Error(this.ToString(), "Login Failed! " + res.StatusMessage);170 HandleNetworkError(new Exception(res.StatusMessage));187 Logger.Error("FAILED: Login Failed! " + res.StatusMessage); 188 throw new Exception(res.StatusMessage); 171 189 } else { 172 ConnState = NetworkEnum.WcfConnState.Loggedin;173 Logging.Instance.Info(this.ToString(), res.StatusMessage);190 Logger.Info("ENDED: Login succeeded" + res.StatusMessage); 191 ConnState = NetworkEnum.WcfConnState.Loggedin; 174 192 } 175 193 } … … 188 206 public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted; 189 207 public void SendJobAsync(Guid guid) { 190 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 208 if (ConnState == NetworkEnum.WcfConnState.Loggedin) { 209 Logger.Debug("STARTED: Fetching of Jobs from Server for Client"); 191 210 proxy.SendStreamedJobAsync(guid); 211 } 192 212 } 193 213 194 214 void proxy_SendStreamedJobCompleted(object sender, SendStreamedJobCompletedEventArgs e) { 195 215 if (e.Error == null) { 216 Logger.Debug("ENDED: Fetching of Jobs from Server for Client"); 196 217 Stream stream = null; 197 218 MemoryStream memStream = null; … … 220 241 new SendJobCompletedEventArgs(new object[] { response, memStream.GetBuffer() }, e.Error, e.Cancelled, e.UserState); 221 242 SendJobCompleted(sender, completedEventArgs); 222 } 223 finally { 243 } catch (Exception ex) { 244 Logger.Error(ex); 245 } finally { 224 246 if(stream != null) 225 247 stream.Dispose(); … … 241 263 public void StoreFinishedJobResultAsync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception, bool finished) { 242 264 if (ConnState == NetworkEnum.WcfConnState.Loggedin) { 265 Logger.Debug("STARTED: Sending back the finished job results"); 266 Logger.Debug("Building stream"); 243 267 Stream stream = 244 268 GetStreamedJobResult(clientId, jobId, result, percentage, exception); 245 269 Logger.Debug("Builded stream"); 270 Logger.Debug("Making the call"); 246 271 proxy.StoreFinishedJobResultStreamedAsync(stream, stream); 247 272 } 248 273 } 249 274 private void proxy_StoreFinishedJobResultStreamedCompleted(object sender, StoreFinishedJobResultStreamedCompletedEventArgs e) { 275 Logger.Debug("Finished storing the job"); 250 276 Stream stream = 251 277 (Stream)e.UserState; 252 if (stream != null) 278 if (stream != null) { 279 Logger.Debug("Stream not null, disposing it"); 253 280 stream.Dispose(); 254 281 } 255 282 if (e.Error == null) { 256 283 StoreFinishedJobResultCompletedEventArgs args = 257 284 new StoreFinishedJobResultCompletedEventArgs( 258 285 new object[] { e.Result }, e.Error, e.Cancelled, e.UserState); 286 Logger.Debug("calling the Finished Job Event"); 259 287 StoreFinishedJobResultCompleted(sender, args); 288 Logger.Debug("ENDED: Sending back the finished job results"); 260 289 } else 261 290 HandleNetworkError(e.Error); … … 300 329 public void SendHeartBeatAsync(HeartBeatData hbd) { 301 330 if (ConnState == NetworkEnum.WcfConnState.Loggedin) 331 Logger.Debug("STARTING: sending heartbeat"); 302 332 proxy.ProcessHeartBeatAsync(hbd); 303 333 } 304 334 305 335 private void proxy_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) { 306 if (e.Error == null && e.Result.Success == true) 336 if (e.Error == null && e.Result.Success == true) { 307 337 SendHeartBeatCompleted(sender, e); 308 else { 338 Logger.Debug("ENDED: sending heartbeats"); 339 } else { 309 340 try { 310 Logging.Instance.Error(this.ToString(), "Error: " + e.Result.StatusMessage); 311 } catch (Exception ex) { 312 Logging.Instance.Error(this.ToString(), "Error: ", ex); 341 Logger.Error("Error: " + e.Result.StatusMessage); 342 } 343 catch (Exception ex) { 344 Logger.Error("Error: ", ex); 313 345 } 314 346 HandleNetworkError(e.Error); … … 351 383 public Response IsJobStillNeeded(Guid jobId) { 352 384 try { 353 return proxy.IsJobStillNeeded(jobId); 385 Logger.Debug("STARTING: Sync call: IsJobStillNeeded"); 386 Response res = proxy.IsJobStillNeeded(jobId); 387 Logger.Debug("ENDED: Sync call: IsJobStillNeeded"); 388 return res; 354 389 } 355 390 catch (Exception e) { … … 361 396 362 397 public ResponseResultReceived ProcessSnapshotSync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) { 363 try { 364 Logging.Instance.Info(this.ToString(), "Snapshot for Job " + jobId + " submitted"); 398 try { 365 399 return proxy.ProcessSnapshotStreamed( 366 400 GetStreamedJobResult(clientId, jobId, result, percentage, exception)); … … 374 408 public List<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) { 375 409 try { 410 Logger.Debug("STARTED: Requesting Plugins for Job"); 411 Logger.Debug("STARTED: Getting the stream"); 376 412 Stream stream = proxy.SendStreamedPlugins(requestedPlugins.ToArray()); 377 413 Logger.Debug("ENDED: Getting the stream"); 378 414 BinaryFormatter formatter = 379 415 new BinaryFormatter(); 416 Logger.Debug("STARTED: Deserializing the stream"); 380 417 ResponsePlugin response = (ResponsePlugin)formatter.Deserialize(stream); 418 Logger.Debug("ENDED: Deserializing the stream"); 419 if (stream != null) 420 stream.Dispose(); 381 421 return response.Plugins; 382 422 } … … 389 429 public void Logout(Guid guid) { 390 430 try { 431 Logger.Debug("STARTED: Logout"); 391 432 proxy.Logout(guid); 433 Logger.Debug("ENDED: Logout"); 392 434 } 393 435 catch (Exception e) { … … 398 440 public ResponseCalendar GetCalendarSync(Guid clientId) { 399 441 try { 400 return proxy.GetCalendar(clientId); 442 Logger.Debug("STARTED: Syncing Calendars"); 443 ResponseCalendar cal = proxy.GetCalendar(clientId); 444 Logger.Debug("ENDED: Syncing Calendars"); 445 return cal; 401 446 } 402 447 catch (Exception e) { … … 408 453 public Response SetCalendarStatus (Guid clientId, CalendarState state) { 409 454 try { 410 return proxy.SetCalendarStatus(clientId, state); 455 Logger.Debug("STARTED: Setting Calendar status to: " + state); 456 Response resp = proxy.SetCalendarStatus(clientId, state); 457 Logger.Debug("ENDED: Setting Calendar status to: " + state); 458 return resp; 411 459 } catch (Exception e) { 412 460 HandleNetworkError(e); -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/ConfigurationManager/UptimeManager.cs ¶
r3220 r3578 9 9 using HeuristicLab.Hive.Contracts.BusinessObjects; 10 10 using HeuristicLab.Hive.Contracts; 11 using HeuristicLab.Tracing; 11 12 12 13 namespace HeuristicLab.Hive.Client.Core.ConfigurationManager { … … 49 50 } 50 51 catch (Exception e) { 51 Logg ing.Instance.Error(this.ToString(),"Persistance of the Calendar failed!", e);52 Logger.Error("Persistance of the Calendar failed!", e); 52 53 } 53 54 finally { … … 68 69 } 69 70 catch (Exception e) { 70 Logg ing.Instance.Error(this.ToString(),"Deserialization of Calendar failed", e);71 Logg ing.Instance.Info(this.ToString(),"Starting with a new one");71 Logger.Error("Deserialization of Calendar failed", e); 72 Logger.Info("Starting with a new one"); 72 73 _appContainer = new AppointmentContainer(); 73 74 CalendarAvailable = false; -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs ¶
r3220 r3578 44 44 using HeuristicLab.Hive.JobBase; 45 45 using HeuristicLab.Hive.Client.Core.JobStorage; 46 using HeuristicLab.Tracing; 46 47 47 48 namespace HeuristicLab.Hive.Client.Core { … … 51 52 public class Core : MarshalByRefObject { 52 53 public static bool abortRequested { get; set; } 53 private bool currentlyFetching = false; 54 55 private bool _currentlyFetching; 56 private bool CurrentlyFetching { 57 get { 58 return _currentlyFetching; 59 } set { 60 _currentlyFetching = value; 61 Logger.Debug("Set CurrentlyFetching to " + _currentlyFetching); 62 } 63 } 54 64 55 65 private Dictionary<Guid, Executor> engines = new Dictionary<Guid, Executor>(); … … 65 75 public void Start() { 66 76 abortRequested = false; 67 Logg ing.Instance.Info(this.ToString(),"Hive Client started");77 Logger.Info("Hive Client started"); 68 78 ClientConsoleServer server = new ClientConsoleServer(); 69 79 server.StartClientConsoleServer(new Uri("net.tcp://127.0.0.1:8000/ClientConsole/")); … … 104 114 DetermineAction(container); 105 115 } 106 System.Console.WriteLine("ended");116 Logger.Info("Program shutdown"); 107 117 } 108 118 … … 112 122 /// <param name="container">The Container, containing the message</param> 113 123 private void DetermineAction(MessageContainer container) { 114 Logg ing.Instance.Info(this.ToString(),"Message: " + container.Message.ToString() + " for job: " + container.JobId);124 Logger.Info("Message: " + container.Message.ToString() + " for job: " + container.JobId); 115 125 switch (container.Message) { 116 126 //Server requests to abort a job … … 119 129 engines[container.JobId].Abort(); 120 130 else 121 Logg ing.Instance.Error(this.ToString(),"AbortJob: Engine doesn't exist");131 Logger.Error("AbortJob: Engine doesn't exist"); 122 132 break; 123 133 //Job has been successfully aborted … … 136 146 GC.Collect(); 137 147 } else 138 Logg ing.Instance.Error(this.ToString(),"JobAbort: Engine doesn't exist");148 Logger.Error("JobAbort: Engine doesn't exist"); 139 149 } 140 150 break; … … 146 156 engines[container.JobId].RequestSnapshot(); 147 157 else 148 Logg ing.Instance.Error(this.ToString(),"RequestSnapshot: Engine doesn't exist");158 Logger.Error("RequestSnapshot: Engine doesn't exist"); 149 159 break; 150 160 … … 158 168 //Pull a Job from the Server 159 169 case MessageContainer.MessageType.FetchJob: 160 if (! currentlyFetching) {170 if (!CurrentlyFetching) { 161 171 wcfService.SendJobAsync(ConfigManager.Instance.GetClientInfo().Id); 162 currentlyFetching = true;172 CurrentlyFetching = true; 163 173 } else 164 Logg ing.Instance.Info(this.ToString(),"Currently fetching, won't fetch this time!");174 Logger.Info("Currently fetching, won't fetch this time!"); 165 175 break; 166 176 … … 174 184 //When the timeslice is up 175 185 case MessageContainer.MessageType.UptimeLimitDisconnect: 176 Logg ing.Instance.Info(this.ToString(),"Uptime Limit reached, storing jobs and sending them back");186 Logger.Info("Uptime Limit reached, storing jobs and sending them back"); 177 187 178 188 //check if there are running jobs 179 189 if (engines.Count > 0) { 180 190 //make sure there is no more fetching of jobs while the snapshots get processed 181 currentlyFetching = true;191 CurrentlyFetching = true; 182 192 //request a snapshot of each running job 183 193 foreach (KeyValuePair<Guid, Executor> kvp in engines) { … … 193 203 //Fetch or Force Fetch Calendar! 194 204 case MessageContainer.MessageType.FetchOrForceFetchCalendar: 195 ResponseCalendar rescal = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id); 196 if(rescal.Success) { 197 if(!UptimeManager.Instance.SetAppointments(false, rescal)) { 198 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 199 } else { 200 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched); 201 } 202 } else { 203 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 204 } 205 Logger.Info("Fetch Calendar from Server"); 206 FetchCalendarFromServer(); 205 207 break; 206 208 207 209 //Hard shutdown of the client 208 210 case MessageContainer.MessageType.Shutdown: 211 Logger.Info("Shutdown Signal received"); 209 212 lock (engines) { 213 Logger.Debug("engines locked"); 210 214 foreach (KeyValuePair<Guid, AppDomain> kvp in appDomains) { 215 Logger.Debug("Shutting down Appdomain for " + kvp.Key); 211 216 appDomains[kvp.Key].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 212 217 AppDomain.Unload(kvp.Value); 213 218 } 214 219 } 220 Logger.Debug("Stopping heartbeat"); 215 221 abortRequested = true; 216 222 beat.StopHeartBeat(); 223 Logger.Debug("Logging out"); 217 224 WcfService.Instance.Logout(ConfigManager.Instance.GetClientInfo().Id); 218 225 break; … … 230 237 private void GetFinishedJob(object jobId) { 231 238 Guid jId = (Guid)jobId; 232 Logg ing.Instance.Info(this.ToString(),"Getting the finished job with id: " + jId);239 Logger.Info("Getting the finished job with id: " + jId); 233 240 try { 234 241 if (!engines.ContainsKey(jId)) { 235 Logg ing.Instance.Error(this.ToString(), "GetFinishedJob:Engine doesn't exist");242 Logger.Info("Engine doesn't exist"); 236 243 return; 237 244 } … … 240 247 241 248 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) { 242 Logg ing.Instance.Info(this.ToString(),"Sending the finished job with id: " + jId);249 Logger.Info("Sending the finished job with id: " + jId); 243 250 wcfService.StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id, 244 251 jId, … … 248 255 true); 249 256 } else { 250 Logg ing.Instance.Info(this.ToString(),"Storing the finished job with id: " + jId + " to hdd");257 Logger.Info("Storing the finished job with id: " + jId + " to hdd"); 251 258 JobStorageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob); 252 259 lock (engines) { 253 260 appDomains[jId].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException); 254 261 AppDomain.Unload(appDomains[jId]); 255 appDomains.Remove(jId); 256 engines.Remove(jId); 262 Logger.Debug("Unloaded appdomain"); 263 appDomains.Remove(jId); 264 engines.Remove(jId); 257 265 jobs.Remove(jId); 266 Logger.Debug("Removed job from appDomains, Engines and Jobs"); 258 267 } 259 268 } 260 269 } 261 270 catch (InvalidStateException ise) { 262 Logg ing.Instance.Error(this.ToString(), "Exception:", ise);271 Logger.Error("Invalid State while Snapshoting:", ise); 263 272 } 264 273 } 265 274 266 275 private void GetSnapshot(object jobId) { 267 Logg ing.Instance.Info(this.ToString(),"Fetching a snapshot for job " + jobId);276 Logger.Info("Fetching a snapshot for job " + jobId); 268 277 Guid jId = (Guid)jobId; 269 278 byte[] obj = engines[jId].GetSnapshot(); 270 Logg ing.Instance.Info(this.ToString(),"BEGIN: Sending snapshot sync");279 Logger.Debug("BEGIN: Sending snapshot sync"); 271 280 wcfService.ProcessSnapshotSync(ConfigManager.Instance.GetClientInfo().Id, 272 281 jId, … … 274 283 engines[jId].Progress, 275 284 null); 276 Logg ing.Instance.Info(this.ToString(),"END: Sended snapshot sync");285 Logger.Debug("END: Sended snapshot sync"); 277 286 //Uptime Limit reached, now is a good time to destroy this jobs. 287 Logger.Debug("Checking if uptime limit is reached"); 278 288 if (!UptimeManager.Instance.IsOnline()) { 289 Logger.Debug("Uptime limit reached"); 290 Logger.Debug("Killing Appdomain"); 279 291 KillAppDomain(jId); 280 //Still anything running? 281 if (engines.Count == 0) 292 //Still anything running? 293 if (engines.Count == 0) { 294 Logger.Info("All jobs snapshotted and sent back, disconnecting"); 282 295 WcfService.Instance.Disconnect(); 296 } else { 297 Logger.Debug("There are still active Jobs in the Field, not disconnecting"); 298 } 283 299 284 300 } else { 285 Logg ing.Instance.Info(this.ToString(),"Restarting the job" + jobId);301 Logger.Debug("Restarting the job" + jobId); 286 302 engines[jId].StartOnlyJob(); 303 Logger.Info("Restarted the job" + jobId); 287 304 } 288 305 } … … 299 316 void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) { 300 317 if (e.Result.Success) { 301 currentlyFetching = false;302 Logg ing.Instance.Info(this.ToString(),"Login completed to Hive Server @ " + DateTime.Now);318 CurrentlyFetching = false; 319 Logger.Info("Login completed to Hive Server @ " + DateTime.Now); 303 320 } else 304 Logg ing.Instance.Error(this.ToString(),e.Result.StatusMessage);321 Logger.Error("Error during login: " + e.Result.StatusMessage); 305 322 } 306 323 … … 312 329 void wcfService_SendJobCompleted(object sender, SendJobCompletedEventArgs e) { 313 330 if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) { 314 Logg ing.Instance.Info(this.ToString(),"Received new job with id " + e.Result.Job.Id);331 Logger.Info("Received new job with id " + e.Result.Job.Id); 315 332 bool sandboxed = false; 316 333 List<byte[]> files = new List<byte[]>(); 317 Logg ing.Instance.Info(this.ToString(),"Fetching plugins for job " + e.Result.Job.Id);334 Logger.Debug("Fetching plugins for job " + e.Result.Job.Id); 318 335 foreach (CachedHivePluginInfoDto plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded)) 319 336 files.AddRange(plugininfo.PluginFiles); 320 Logg ing.Instance.Info(this.ToString(),"Plugins fetched for job " + e.Result.Job.Id);337 Logger.Debug("Plugins fetched for job " + e.Result.Job.Id); 321 338 AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(e.Result.Job.Id.ToString(), files); 322 339 appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException); … … 325 342 jobs.Add(e.Result.Job.Id, e.Result.Job); 326 343 appDomains.Add(e.Result.Job.Id, appDomain); 327 Logg ing.Instance.Info(this.ToString(),"Creating AppDomain");344 Logger.Debug("Creating AppDomain"); 328 345 Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName); 329 Logg ing.Instance.Info(this.ToString(),"Created AppDomain");346 Logger.Debug("Created AppDomain"); 330 347 engine.JobId = e.Result.Job.Id; 331 348 engine.Queue = MessageQueue.GetInstance(); 332 Logg ing.Instance.Info(this.ToString(),"Starting Engine for job " + e.Result.Job.Id);349 Logger.Debug("Starting Engine for job " + e.Result.Job.Id); 333 350 engine.Start(e.Data); 334 351 engines.Add(e.Result.Job.Id, engine); … … 336 353 ClientStatusInfo.JobsFetched++; 337 354 338 Debug.WriteLine("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched);355 Logger.Info("Increment FetchedJobs to:" + ClientStatusInfo.JobsFetched); 339 356 } 340 357 } 341 358 } else 342 Logg ing.Instance.Info(this.ToString(),"No more jobs left!");343 currentlyFetching = false;359 Logger.Info("No more jobs left!"); 360 CurrentlyFetching = false; 344 361 } 345 362 … … 350 367 /// <param name="e"></param> 351 368 void wcfService_StoreFinishedJobResultCompleted(object sender, StoreFinishedJobResultCompletedEventArgs e) { 352 Logg ing.Instance.Info(this.ToString(),"Job submitted with id " + e.Result.JobId);369 Logger.Info("Job submitted with id " + e.Result.JobId); 353 370 KillAppDomain(e.Result.JobId); 354 371 if (e.Result.Success) { 355 372 ClientStatusInfo.JobsProcessed++; 356 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed);373 Logger.Info("Increased ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 357 374 } else { 358 Logg ing.Instance.Error(this.ToString(),"Sending of job " + e.Result.JobId + " failed, job has been wasted. Message: " + e.Result.StatusMessage);375 Logger.Error("Sending of job " + e.Result.JobId + " failed, job has been wasted. Message: " + e.Result.StatusMessage); 359 376 } 360 377 } … … 366 383 /// <param name="e"></param> 367 384 void wcfService_ProcessSnapshotCompleted(object sender, ProcessSnapshotCompletedEventArgs e) { 368 Logg ing.Instance.Info(this.ToString(),"Snapshot " + e.Result.JobId + " has been transmitted according to plan.");385 Logger.Info("Snapshot " + e.Result.JobId + " has been transmitted according to plan."); 369 386 } 370 387 … … 375 392 /// <param name="e"></param> 376 393 void wcfService_ServerChanged(object sender, EventArgs e) { 377 Logg ing.Instance.Info(this.ToString(),"ServerChanged has been called");394 Logger.Info("ServerChanged has been called"); 378 395 lock (engines) { 379 396 foreach (KeyValuePair<Guid, Executor> entries in engines) { … … 394 411 /// <param name="e"></param> 395 412 void wcfService_Connected(object sender, EventArgs e) { 413 Logger.Info("WCF Service got a connection"); 396 414 if (!UptimeManager.Instance.CalendarAvailable) { 397 ResponseCalendar calres = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id); 398 if(calres.Success) { 399 if (UptimeManager.Instance.SetAppointments(false, calres)) 400 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched); 401 else 402 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 403 } 404 else { 405 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 406 } 415 Logger.Info("No local calendar available, fetch it"); 416 FetchCalendarFromServer(); 407 417 } 408 418 //if the fetching from the server failed - still set the client online... maybe we get 409 //a result within the next few heartbeats 419 //a result within the next few heartbeats 410 420 if (!UptimeManager.Instance.CalendarAvailable || UptimeManager.Instance.IsOnline()) { 421 Logger.Info("CalendarAvailable is " + UptimeManager.Instance.CalendarAvailable + " and IsOnline is: " + UptimeManager.Instance.IsOnline()); 422 Logger.Info("Setting client online"); 411 423 wcfService.LoginSync(ConfigManager.Instance.GetClientInfo()); 412 424 JobStorageManager.CheckAndSubmitJobsFromDisc(); 413 currentlyFetching = false; 425 CurrentlyFetching = false; 426 } 427 } 428 429 private void FetchCalendarFromServer() { 430 ResponseCalendar calres = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id); 431 if(calres.Success) { 432 if (UptimeManager.Instance.SetAppointments(false, calres)) { 433 Logger.Info("Remote calendar installed"); 434 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.Fetched); 435 } else { 436 Logger.Info("Remote calendar installation failed, setting state to " + CalendarState.NotAllowedToFetch); 437 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 438 } 439 } else { 440 Logger.Info("Remote calendar installation failed, setting state to " + CalendarState.NotAllowedToFetch); 441 wcfService.SetCalendarStatus(ConfigManager.Instance.GetClientInfo().Id, CalendarState.NotAllowedToFetch); 414 442 } 415 443 } … … 417 445 //this is a little bit tricky - 418 446 void wcfService_ConnectionRestored(object sender, EventArgs e) { 419 Logg ing.Instance.Info(this.ToString(),"Reconnected to old server - checking currently running appdomains");447 Logger.Info("Reconnected to old server - checking currently running appdomains"); 420 448 421 449 foreach (KeyValuePair<Guid, Executor> execKVP in engines) { 422 450 if (!execKVP.Value.Running && execKVP.Value.CurrentMessage == MessageContainer.MessageType.NoMessage) { 423 Logg ing.Instance.Info(this.ToString(),"Checking for JobId: " + execKVP.Value.JobId);451 Logger.Info("Checking for JobId: " + execKVP.Value.JobId); 424 452 Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob)); 425 453 finThread.Start(execKVP.Value.JobId); … … 435 463 436 464 void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { 437 Logg ing.Instance.Error(this.ToString(), "Exception in AppDomain: " + e.ExceptionObject.ToString());465 Logger.Error("Exception in AppDomain: " + e.ExceptionObject.ToString()); 438 466 } 439 467 … … 447 475 /// <param name="id">the GUID of the job</param> 448 476 private void KillAppDomain(Guid id) { 449 Logg ing.Instance.Info(this.ToString(),"Shutting down Appdomain for Job " + id);477 Logger.Debug("Shutting down Appdomain for Job " + id); 450 478 lock (engines) { 451 479 try { … … 457 485 } 458 486 catch (Exception ex) { 459 Logg ing.Instance.Error(this.ToString(),"Exception when unloading the appdomain: ", ex);487 Logger.Error("Exception when unloading the appdomain: ", ex); 460 488 } 461 489 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/CorePlugin.cs ¶
r2591 r3578 36 36 [PluginDependency("HeuristicLab.Hive.Contracts-3.2")] 37 37 [PluginDependency("HeuristicLab.Hive.JobBase-3.2")] 38 [PluginDependency("HeuristicLab.Tracing", "3.2.0")] 38 39 public class CorePlugin: PluginBase { 39 40 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Heartbeat.cs ¶
r3203 r3578 32 32 using HeuristicLab.Hive.Client.Core.ConfigurationManager; 33 33 using HeuristicLab.Hive.Client.Communication.ServerService; 34 using HeuristicLab.Tracing; 34 35 //using BO = HeuristicLab.Hive.Contracts.BusinessObjects; 35 36 … … 92 93 //That's quiet simple: Just reconnect and you're good for new jobs 93 94 if (wcfService.ConnState != NetworkEnum.WcfConnState.Loggedin) { 94 Logg ing.Instance.Info(this.ToString(),"Client goes online according to timetable");95 Logger.Info("Client goes online according to timetable"); 95 96 wcfService.Connect(); 96 97 } … … 103 104 wcfService.Connect(); 104 105 } else if (wcfService.ConnState == NetworkEnum.WcfConnState.Loggedin) { 105 Logg ing.Instance.Info(this.ToString(),"Sending Heartbeat: " + heartBeatData);106 Logger.Debug("Sending Heartbeat: " + heartBeatData); 106 107 wcfService.SendHeartBeatAsync(heartBeatData); 107 108 } … … 109 110 110 111 void wcfService_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) { 111 Logg ing.Instance.Info(this.ToString(),"Heartbeat received");112 Logger.Debug("Heartbeat received"); 112 113 e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc)); 113 114 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/HeuristicLab.Hive.Client.Core-3.2.csproj ¶
r3203 r3578 157 157 <Name>HeuristicLab.PluginInfrastructure</Name> 158 158 </ProjectReference> 159 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 160 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 161 <Name>HeuristicLab.Tracing-3.2</Name> 162 </ProjectReference> 163 </ItemGroup> 164 <ItemGroup> 165 <WCFMetadata Include="Service References\" /> 159 166 </ItemGroup> 160 167 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs ¶
r3220 r3578 11 11 using System.Diagnostics; 12 12 using System.Xml; 13 using HeuristicLab.Tracing; 13 14 14 15 namespace HeuristicLab.Hive.Client.Core.JobStorage { … … 28 29 jobstream.Write(job, 0, job.Length); 29 30 storedJobsList.Add(info); 30 Logg ing.Instance.Info("JobStorageManager","Job " + info.JobID + " stored on the harddisc");31 Logger.Info("Job " + info.JobID + " stored on the harddisc"); 31 32 } 32 33 catch (Exception e) { 33 Logg ing.Instance.Error("JobStorageManager","Exception: ", e);34 Logger.Error("Exception: ", e); 34 35 } 35 36 finally { … … 46 47 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (storedJobsList[index-1].ServerIP == WcfService.Instance.ServerIP && storedJobsList[index-1].ServerPort == WcfService.Instance.ServerPort)) { 47 48 String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString(); 48 Logg ing.Instance.Info("JobStorageManager","Sending stored job " + storedJobsList[index - 1].JobID + " to the server");49 Logger.Info("Sending stored job " + storedJobsList[index - 1].JobID + " to the server"); 49 50 try { 50 51 byte[] job = File.ReadAllBytes(path + filename + ".dat"); … … 52 53 ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true); 53 54 if (!res.Success) 54 Logg ing.Instance.Error("JobStorageManager","sending of job failed: " + res.StatusMessage);55 Logger.Error("sending of job failed: " + res.StatusMessage); 55 56 else 56 Logg ing.Instance.Info("JobStorageManager","Sending of job " + storedJobsList[index - 1].JobID + " done");57 Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done"); 57 58 } 58 59 ClientStatusInfo.JobsProcessed++; … … 61 62 } 62 63 catch (Exception e) { 63 Logg ing.Instance.Error("JobStorageManager", "Job not on hdd but on list - deleting job from list", e);64 Logger.Error("Job not on hdd but on list - deleting job from list ", e); 64 65 storedJobsList.Remove(storedJobsList[index - 1]); 65 66 StoreJobList(); … … 78 79 79 80 static JobStorageManager() { 80 Logg ing.Instance.Info("JobStorageManager","Restoring Joblist from Harddisk");81 Logger.Info("Restoring Joblist from Harddisk"); 81 82 if (!Directory.Exists(path)) 82 83 Directory.CreateDirectory(path); … … 89 90 XmlTextReader reader = new XmlTextReader(stream); 90 91 storedJobsList = (List<JobStorageInfo>)serializer.Deserialize(reader); 91 Logg ing.Instance.Info("JobStorageManager","Loaded " + storedJobsList.Count + " Elements");92 Logger.Info("Loaded " + storedJobsList.Count + " Elements"); 92 93 } 93 94 catch (Exception e) { 94 Logg ing.Instance.Error("JobStorageManager","Exception while loading the Stored Job List", e);95 Logger.Error("Exception while loading the Stored Job List", e); 95 96 } finally { 96 97 if(stream != null) … … 98 99 } 99 100 } else { 100 Logg ing.Instance.Info("JobStorageManager","no stored jobs on harddisk, starting new list");101 Logger.Info("no stored jobs on harddisk, starting new list"); 101 102 storedJobsList = new List<JobStorageInfo>(); 102 103 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/PluginCache.cs ¶
r3011 r3578 7 7 using HeuristicLab.Hive.Client.Common; 8 8 using HeuristicLab.Hive.Contracts.BusinessObjects; 9 using HeuristicLab.Tracing; 9 10 10 11 namespace HeuristicLab.Hive.Client.Core { … … 32 33 33 34 public List<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> requests) { 35 Logger.Debug("Fetching plugins for job"); 34 36 List<CachedHivePluginInfoDto> neededPlugins = new List<CachedHivePluginInfoDto>(); 35 37 List<HivePluginInfoDto> missingPlugins = new List<HivePluginInfoDto>(); … … 40 42 foreach (CachedHivePluginInfoDto cache in pluginCache) { 41 43 if (info.Name.Equals(cache.Name) && info.Version.Equals(cache.Version) && info.BuildDate <= cache.BuildDate) { 44 Logger.Debug("Found plugin " + info.Name + ", " + info.Version); 42 45 neededPlugins.Add(cache); 43 46 found = true; … … 46 49 } 47 50 if (!found) 51 Logger.Debug("Found NOT found " + info.Name + ", " + info.Version); 48 52 missingPlugins.Add(info); 49 53 found = false; 50 54 } 51 55 56 Logger.Debug("Requesting missing plugins"); 52 57 List<CachedHivePluginInfoDto> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins); 58 Logger.Debug("Requested missing plugins"); 59 53 60 if (receivedPlugins != null) { 54 61 neededPlugins.AddRange(receivedPlugins); 55 62 pluginCache.AddRange(receivedPlugins); 56 63 } else 57 Logg ing.Instance.Error(this.ToString(),"Fetching of the plugins failed!");64 Logger.Error("Fetching of the plugins failed!"); 58 65 59 66 return neededPlugins; -
TabularUnified trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Properties/Settings.Designer.cs ¶
r944 r3578 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:2.0.50727. 30534 // Runtime Version:2.0.50727.4927 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if -
TabularUnified trunk/sources/HeuristicLab.Hive.Contracts/3.2/ApplicationConstants.cs ¶
r3203 r3578 24 24 using System.Linq; 25 25 using System.Text; 26 using System.Data; 26 27 27 28 namespace HeuristicLab.Hive.Contracts { 28 29 public class ApplicationConstants { 29 30 31 public static System.Data.IsolationLevel ISOLATION_LEVEL = IsolationLevel.ReadCommitted; 32 33 public static System.Transactions.IsolationLevel ISOLATION_LEVEL_SCOPE = 34 System.Transactions.IsolationLevel.ReadCommitted; 30 35 public static int HEARTBEAT_MAX_DIF = 120; // value in seconds 31 36 public static int JOB_TIME_TO_LIVE = 5; -
TabularUnified trunk/sources/HeuristicLab.Hive.Contracts/3.2/BusinessObjects/JobDto.cs ¶
r3018 r3578 48 48 public DateTime? DateCalculated { get; set; } 49 49 [DataMember] 50 public DateTime? DateFinished { get; set; } 51 [DataMember] 50 52 public int Priority { get; set; } 51 53 [DataMember] -
TabularUnified trunk/sources/HeuristicLab.Hive.Contracts/3.2/HeuristicLab.Hive.Contracts-3.2.csproj ¶
r3203 r3578 76 76 <RequiredTargetFramework>3.0</RequiredTargetFramework> 77 77 </Reference> 78 <Reference Include="System.Transactions" /> 78 79 <Reference Include="System.Xml.Linq"> 79 80 <RequiredTargetFramework>3.5</RequiredTargetFramework> -
TabularUnified trunk/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IJobManager.cs ¶
r3220 r3578 34 34 public interface IJobManager { 35 35 [OperationContract] 36 ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count); 37 [OperationContract] 36 38 ResponseList<JobDto> GetAllJobs(); 37 39 [OperationContract] 38 40 ResponseObject<JobDto> GetJobById(Guid jobId); 41 [OperationContract] 42 ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId); 39 43 [OperationContract] 40 44 ResponseObject<JobDto> AddNewJob(SerializedJob job); … … 62 66 ResponseList<JobDto> GetJobsByProject(Guid projectId); 63 67 [OperationContract] 64 ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources); 68 ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources); 65 69 } 66 70 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs ¶
r3220 r3578 135 135 Thread.Sleep(RESULT_POLLING_INTERVAL_MS); 136 136 lock (locker) { 137 HiveLogger.Debug("HiveEngine: Results-polling - GetLastResult");137 Logger.Debug("HiveEngine: Results-polling - GetLastResult"); 138 138 response = executionEngineFacade.GetLastSerializedResult(jobId, false); 139 HiveLogger.Debug("HiveEngine: Results-polling - Server: " + response.StatusMessage + " success: " + response.Success);139 Logger.Debug("HiveEngine: Results-polling - Server: " + response.StatusMessage + " success: " + response.Success); 140 140 // loop while 141 141 // 1. the user doesn't request an abort … … 145 145 if (abortRequested) return; 146 146 if (response.Success && response.Obj != null) { 147 HiveLogger.Debug("HiveEngine: Results-polling - Got result!");147 Logger.Debug("HiveEngine: Results-polling - Got result!"); 148 148 restoredJob = (Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobData); 149 HiveLogger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + (restoredJob.Progress<1.0));149 Logger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + (restoredJob.Progress < 1.0)); 150 150 } 151 151 } … … 157 157 OnFinished(); 158 158 }); 159 HiveLogger.Debug("HiveEngine: Starting results-polling thread");159 Logger.Debug("HiveEngine: Starting results-polling thread"); 160 160 t.Start(); 161 161 } … … 166 166 ResponseObject<SerializedJob> response; 167 167 lock (locker) { 168 HiveLogger.Debug("HiveEngine: Abort - RequestSnapshot");168 Logger.Debug("HiveEngine: Abort - RequestSnapshot"); 169 169 Response snapShotResponse = executionEngineFacade.RequestSnapshot(jobId); 170 170 if (snapShotResponse.StatusMessage == ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED) { 171 171 // job is finished already 172 HiveLogger.Debug("HiveEngine: Abort - GetLastResult(false)");172 Logger.Debug("HiveEngine: Abort - GetLastResult(false)"); 173 173 response = executionEngineFacade.GetLastSerializedResult(jobId, false); 174 HiveLogger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);174 Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success); 175 175 } else { 176 176 // server sent snapshot request to client … … 178 178 do { 179 179 Thread.Sleep(SNAPSHOT_POLLING_INTERVAL_MS); 180 HiveLogger.Debug("HiveEngine: Abort - GetLastResult(true)");180 Logger.Debug("HiveEngine: Abort - GetLastResult(true)"); 181 181 response = executionEngineFacade.GetLastSerializedResult(jobId, true); 182 HiveLogger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);182 Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success); 183 183 retryCount++; 184 184 // loop while … … 194 194 SerializedJob jobResult = response.Obj; 195 195 if (jobResult != null) { 196 HiveLogger.Debug("HiveEngine: Results-polling - Got result!");196 Logger.Debug("HiveEngine: Results-polling - Got result!"); 197 197 job = (Job)PersistenceManager.RestoreFromGZip(jobResult.SerializedJobData); 198 198 ControlManager.Manager.ShowControl(job.Engine.CreateView()); -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs ¶
r3022 r3578 55 55 this.chContent = new System.Windows.Forms.ColumnHeader(); 56 56 this.chDetails = new System.Windows.Forms.ColumnHeader(); 57 this.lvSnapshots = new System.Windows.Forms.ListView();58 this.chClientCalculated = new System.Windows.Forms.ColumnHeader();59 this.chProgress = new System.Windows.Forms.ColumnHeader();60 this.chSnapshotTime = new System.Windows.Forms.ColumnHeader();61 57 this.lblProgress = new System.Windows.Forms.Label(); 62 58 this.lblStatus = new System.Windows.Forms.Label(); … … 85 81 this.menuItemAddGroup = new System.Windows.Forms.ToolStripMenuItem(); 86 82 this.menuItemDeleteGroup = new System.Windows.Forms.ToolStripMenuItem(); 83 this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem(); 87 84 this.lvClientControl = new System.Windows.Forms.ListView(); 88 85 this.tcManagementConsole = new System.Windows.Forms.TabControl(); 89 86 this.checkBox1 = new System.Windows.Forms.CheckBox(); 90 this.menuItemOpenCalendar = new System.Windows.Forms.ToolStripMenuItem();91 87 this.menuStrip1.SuspendLayout(); 92 88 this.plClientDetails.SuspendLayout(); … … 350 346 this.plJobDetails.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 351 347 this.plJobDetails.Controls.Add(this.lvJobDetails); 352 this.plJobDetails.Controls.Add(this.lvSnapshots);353 348 this.plJobDetails.Controls.Add(this.lblProgress); 354 349 this.plJobDetails.Controls.Add(this.lblStatus); … … 372 367 this.lvJobDetails.Location = new System.Drawing.Point(17, 124); 373 368 this.lvJobDetails.Name = "lvJobDetails"; 374 this.lvJobDetails.Size = new System.Drawing.Size(382, 175);369 this.lvJobDetails.Size = new System.Drawing.Size(382, 243); 375 370 this.lvJobDetails.TabIndex = 17; 376 371 this.lvJobDetails.UseCompatibleStateImageBehavior = false; … … 386 381 this.chDetails.Text = "Details"; 387 382 this.chDetails.Width = 255; 388 //389 // lvSnapshots390 //391 this.lvSnapshots.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {392 this.chClientCalculated,393 this.chProgress,394 this.chSnapshotTime});395 this.lvSnapshots.Enabled = false;396 this.lvSnapshots.FullRowSelect = true;397 this.lvSnapshots.GridLines = true;398 this.lvSnapshots.Location = new System.Drawing.Point(17, 310);399 this.lvSnapshots.Name = "lvSnapshots";400 this.lvSnapshots.Size = new System.Drawing.Size(382, 69);401 this.lvSnapshots.TabIndex = 16;402 this.lvSnapshots.UseCompatibleStateImageBehavior = false;403 this.lvSnapshots.View = System.Windows.Forms.View.Details;404 //405 // chClientCalculated406 //407 this.chClientCalculated.Text = "Client Calculated";408 this.chClientCalculated.Width = 112;409 //410 // chProgress411 //412 this.chProgress.Text = "Progress";413 this.chProgress.Width = 100;414 //415 // chSnapshotTime416 //417 this.chSnapshotTime.Text = "Snapshot request";418 this.chSnapshotTime.Width = 166;419 383 // 420 384 // lblProgress … … 657 621 this.menuItemOpenCalendar}); 658 622 this.contextMenuGroup.Name = "contextMenuJob"; 659 this.contextMenuGroup.Size = new System.Drawing.Size(154, 92);623 this.contextMenuGroup.Size = new System.Drawing.Size(154, 70); 660 624 // 661 625 // menuItemAddGroup … … 670 634 this.menuItemDeleteGroup.Size = new System.Drawing.Size(153, 22); 671 635 this.menuItemDeleteGroup.Text = "Delete Group"; 636 // 637 // menuItemOpenCalendar 638 // 639 this.menuItemOpenCalendar.Name = "menuItemOpenCalendar"; 640 this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22); 641 this.menuItemOpenCalendar.Text = "Open Calendar"; 672 642 // 673 643 // lvClientControl … … 705 675 this.checkBox1.Text = "checkBox1"; 706 676 this.checkBox1.UseVisualStyleBackColor = true; 707 //708 // menuItemOpenCalendar709 //710 this.menuItemOpenCalendar.Name = "menuItemOpenCalendar";711 this.menuItemOpenCalendar.Size = new System.Drawing.Size(153, 22);712 this.menuItemOpenCalendar.Text = "Open Calendar";713 677 // 714 678 // HiveServerManagementConsole … … 782 746 private System.Windows.Forms.Label lblStatus; 783 747 private System.Windows.Forms.Label lblProgress; 784 private System.Windows.Forms.ListView lvSnapshots;785 private System.Windows.Forms.ColumnHeader chClientCalculated;786 private System.Windows.Forms.ColumnHeader chProgress;787 748 private System.Windows.Forms.Label lblStateClient; 788 749 private System.Windows.Forms.Label lblState; … … 796 757 private System.Windows.Forms.ListView lvJobControl; 797 758 private System.Windows.Forms.CheckBox checkBox1; 798 private System.Windows.Forms.ColumnHeader chSnapshotTime;799 759 private System.Windows.Forms.ContextMenuStrip contextMenuJob; 800 760 private System.Windows.Forms.ToolStripMenuItem menuItemAbortJob; -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs ¶
r3220 r3578 242 242 CloneList(jobsOld, out jobsOldHelp); 243 243 244 GetDelta(jobsOld.List, jobsOldHelp); 244 if(jobsOld != null && jobsOld.List != null && jobsOldHelp != null) 245 GetDelta(jobsOld.List, jobsOldHelp); 245 246 246 247 } … … 419 420 lvJobDetails.Items.Clear(); 420 421 421 lvSnapshots.Enabled = true; 422 423 if (currentJob.State == State.offline) { 422 ResponseObject<JobDto> response = ServiceLocator.GetJobManager().GetJobByIdWithDetails(currentJob.Id); 423 424 if(response.Success == false || response.Obj == null) 425 return; 426 427 JobDto job = response.Obj; 428 429 //lvSnapshots.Enabled = true; 430 431 if (job.State == State.offline) { 424 432 pbJobControl.Image = ilLargeImgJob.Images[2]; 425 } else if ( currentJob.State == State.calculating) {433 } else if (job.State == State.calculating) { 426 434 pbJobControl.Image = ilLargeImgJob.Images[1]; 427 } else if ( currentJob.State == State.finished) {435 } else if (job.State == State.finished) { 428 436 pbJobControl.Image = ilLargeImgJob.Images[0]; 429 437 } 430 438 431 lblJobName.Text = currentJob.Id.ToString();432 if ( currentJob.Percentage != null) {439 lblJobName.Text = job.Id.ToString(); 440 if (job.Percentage != null) { 433 441 progressJob.Value = (int) (currentJob.Percentage*100); 434 442 lblProgress.Text = (int) (currentJob.Percentage*100) + "% calculated"; … … 437 445 ListViewItem lvi = new ListViewItem(); 438 446 lvi.Text = "User:"; 439 lvi.SubItems.Add( currentJob.UserId.ToString());447 lvi.SubItems.Add(job.UserId.ToString()); 440 448 lvJobDetails.Items.Add(lvi); 441 449 … … 443 451 lvi = new ListViewItem(); 444 452 lvi.Text = "created at:"; 445 lvi.SubItems.Add( currentJob.DateCreated.ToString());453 lvi.SubItems.Add(job.DateCreated.ToString()); 446 454 lvJobDetails.Items.Add(lvi); 447 455 448 if ( currentJob.ParentJob != null) {456 if (job.ParentJob != null) { 449 457 lvi = null; 450 458 lvi = new ListViewItem(); 451 459 lvi.Text = "Parent job:"; 452 lvi.SubItems.Add( currentJob.ParentJob.ToString());460 lvi.SubItems.Add(job.ParentJob.ToString()); 453 461 lvJobDetails.Items.Add(lvi); 454 462 } … … 457 465 lvi = new ListViewItem(); 458 466 lvi.Text = "Priority:"; 459 lvi.SubItems.Add( currentJob.Priority.ToString());467 lvi.SubItems.Add(job.Priority.ToString()); 460 468 lvJobDetails.Items.Add(lvi); 461 469 462 if ( currentJob.Project != null) {470 if (job.Project != null) { 463 471 lvi = null; 464 472 lvi = new ListViewItem(); 465 473 lvi.Text = "Project:"; 466 lvi.SubItems.Add( currentJob.Project.Name.ToString());474 lvi.SubItems.Add(job.Project.Name.ToString()); 467 475 lvJobDetails.Items.Add(lvi); 468 476 } 469 477 470 if ( currentJob.Client != null) {478 if (job.Client != null) { 471 479 lvi = null; 472 480 lvi = new ListViewItem(); 473 481 lvi.Text = "Calculation begin:"; 474 lvi.SubItems.Add( currentJob.DateCalculated.ToString());482 lvi.SubItems.Add(job.DateCalculated.ToString()); 475 483 lvJobDetails.Items.Add(lvi); 476 484 … … 479 487 lvi = new ListViewItem(); 480 488 lvi.Text = "Client calculated:"; 481 lvi.SubItems.Add( currentJob.Client.Name.ToString());489 lvi.SubItems.Add(job.Client.Name.ToString()); 482 490 lvJobDetails.Items.Add(lvi); 483 491 484 if (currentJob.State == State.finished) { 485 IJobManager jobManager = 486 ServiceLocator.GetJobManager(); 487 ResponseObject<JobResult> jobRes = null; 488 //Todo: jobManager.GetLastJobResultOf(currentJob.Id); 489 490 if (jobRes != null && jobRes.Obj != null) { 491 lvi = null; 492 if (job.State == State.finished) { 493 lvi = null; 492 494 lvi = new ListViewItem(); 493 495 lvi.Text = "Calculation ended:"; 494 lvi.SubItems.Add(job Res.Obj.DateFinished.ToString());496 lvi.SubItems.Add(job.DateFinished.ToString()); 495 497 lvJobDetails.Items.Add(lvi); 496 498 } 497 499 } 498 } 499 if (currentJob.State != State.offline) { 500 lvSnapshots.Items.Clear(); 501 GetSnapshotList(); 502 } else { 503 lvSnapshots.Visible = false; 504 } 505 } 500 } 506 501 507 502 /// <summary> … … 776 771 private void CloneList(ResponseList<JobDto> oldList, out IDictionary<int, JobDto> newList) { 777 772 newList = new Dictionary<int, JobDto>(); 778 for (int i = 0; i < oldList.List.Count; i++) { 779 newList.Add(i, oldList.List[i]); 773 if (oldList != null && oldList.List != null) { 774 for (int i = 0; i < oldList.List.Count; i++) { 775 newList.Add(i, oldList.List[i]); 776 } 780 777 } 781 778 } 782 779 783 780 private bool IsEqual(ClientDto ci1, ClientDto ci2) { 781 if (ci1 == null && ci2 == null) { 782 return true; 783 } 784 784 if (ci2 == null) { 785 785 return false; … … 849 849 } 850 850 851 private void GetSnapshotList() {852 853 lvSnapshots.Items.Clear();854 IJobManager jobManager = ServiceLocator.GetJobManager();855 856 ResponseList<JobResult> jobRes = jobManager.GetAllJobResults(currentJob.Id);857 858 if (jobRes != null && jobRes.List != null) {859 foreach (JobResult jobresult in jobRes.List) {860 ListViewItem curSnapshot = new ListViewItem(jobresult.ClientId.ToString());861 double percentage = jobresult.Percentage * 100;862 curSnapshot.SubItems.Add(percentage.ToString() + " %");863 curSnapshot.SubItems.Add(jobresult.Timestamp.ToString());864 lvSnapshots.Items.Add(curSnapshot);865 }866 }867 868 if ((jobRes.List == null) || (jobRes.List.Count == 0)) {869 lvSnapshots.Visible = false;870 } else {871 lvSnapshots.Visible = true;872 }873 874 }875 876 851 #endregion 877 852 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.resx ¶
r3022 r3578 129 129 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 130 130 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo 131 FwAAAk1TRnQBSQFMAgEBBAEAA QwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo131 FwAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 132 132 AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 133 133 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 239 239 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 240 240 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAO 241 DgAAAk1TRnQBSQFMAgEBAwEAA QwBAAEMAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo241 DgAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 242 242 AwABgAMAASADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 243 243 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 312 312 <value> 313 313 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 314 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQ gAA315 XE IB62nEUwAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU314 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAABcQQAA 315 XEEBRtDlPgAAA3hJREFUSEu1ls1PE2EQxj229ouPVNErgZOJicZDjR68mHg1JgYvxov/gIlHxARBoxGU 316 316 KlJUVJDypVIQKkXBpIootoC0tLS0pZEIiILfikAfZ5Zuu9sWaDQ2edLt7vvOrzPzzsxuALBBquIeRR7p 317 317 CKmQVJSmeC3vyUu0FzNOD3NIFhJYpU8VuGBXpiVeK+6L2sgRQQKAbm4hTZ/pVcA8ooN9Ug/H7GY4Z3PS … … 342 342 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 343 343 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABy 344 DAAAAk1TRnQBSQFMAgEBBAEAA QwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo344 DAAAAk1TRnQBSQFMAgEBBAEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 345 345 AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 346 346 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 … … 409 409 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 410 410 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABq 411 CQAAAk1TRnQBSQFMAgEBAwEAA QwBAAEMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo411 CQAAAk1TRnQBSQFMAgEBAwEAARQBAAEUAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 412 412 AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 413 413 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs ¶
r3222 r3578 90 90 /// <param name="e"></param> 91 91 void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) { 92 HiveLogger.Info(this.ToString() + ":Server Heartbeat ticked");93 94 using (TransactionScope scope = new TransactionScope( )) {92 Logger.Debug("Server Heartbeat ticked"); 93 94 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 95 95 96 96 List<ClientDto> allClients = new List<ClientDto>(DaoLocator.ClientDao.FindAll()); … … 101 101 102 102 if (!lastHeartbeats.ContainsKey(client.Id)) { 103 HiveLogger.Info(this.ToString() + ":Client " + client.Id +103 Logger.Info("Client " + client.Id + 104 104 " wasn't offline but hasn't sent heartbeats - setting offline"); 105 105 client.State = State.offline; 106 106 DaoLocator.ClientDao.Update(client); 107 HiveLogger.Info(this.ToString() + ":Client " + client.Id +107 Logger.Info("Client " + client.Id + 108 108 " wasn't offline but hasn't sent heartbeats - Resetting all his jobs"); 109 109 foreach (JobDto job in DaoLocator.JobDao.FindActiveJobsOfClient(client)) { 110 110 //maybe implementa n additional Watchdog? Till then, just set them offline.. 111 DaoLocator.JobDao.SetJobOffline(job); 112 //jobManager.ResetJobsDependingOnResults(job); 111 DaoLocator.JobDao.SetJobOffline(job); 113 112 } 114 113 } else { … … 119 118 if (dif.TotalSeconds > ApplicationConstants.HEARTBEAT_MAX_DIF) { 120 119 // if client calculated jobs, the job must be reset 121 HiveLogger.Info(this.ToString() + ":Client timed out and is on RESET");120 Logger.Info("Client timed out and is on RESET"); 122 121 foreach (JobDto job in DaoLocator.JobDao.FindActiveJobsOfClient(client)) { 123 122 jobManager.ResetJobsDependingOnResults(job); … … 127 126 } 128 127 } 129 128 Logger.Debug("setting client offline"); 130 129 // client must be set offline 131 130 client.State = State.offline; … … 134 133 DaoLocator.ClientDao.Update(client); 135 134 135 Logger.Debug("removing it from the heartbeats list"); 136 136 heartbeatLock.EnterWriteLock(); 137 137 lastHeartbeats.Remove(client.Id); … … 264 264 /// <returns></returns> 265 265 public ResponseHB ProcessHeartBeat(HeartBeatData hbData) { 266 HiveLogger.Debug(this.ToString() + ": BEGIN Processing Heartbeat for Client " + hbData.ClientId); 267 HiveLogger.Debug(this.ToString() + ": BEGIN Fetching Adapters"); 268 HiveLogger.Debug(this.ToString() + ": END Fetched Adapters"); 269 HiveLogger.Debug(this.ToString() + ": BEGIN Starting Transaction"); 270 271 HiveLogger.Debug(this.ToString() + ": END Started Transaction"); 266 Logger.Debug("BEGIN Processing Heartbeat for Client " + hbData.ClientId); 272 267 273 268 ResponseHB response = new ResponseHB(); 274 269 response.ActionRequest = new List<MessageContainer>(); 275 270 276 HiveLogger.Debug(this.ToString() + ":BEGIN Started Client Fetching");271 Logger.Debug("BEGIN Started Client Fetching"); 277 272 ClientDto client = DaoLocator.ClientDao.FindById(hbData.ClientId); 278 HiveLogger.Debug(this.ToString() + ":END Finished Client Fetching");273 Logger.Debug("END Finished Client Fetching"); 279 274 // check if the client is logged in 280 275 if (client.State == State.offline || client.State == State.nullState) { … … 283 278 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.NoMessage)); 284 279 285 HiveLogger.Error(this.ToString() + "ProcessHeartBeat: Client state null or offline: " + client);280 Logger.Error("ProcessHeartBeat: Client state null or offline: " + client); 286 281 287 282 return response; … … 292 287 293 288 // save timestamp of this heartbeat 294 HiveLogger.Debug(this.ToString() + ":BEGIN Locking for Heartbeats");289 Logger.Debug("BEGIN Locking for Heartbeats"); 295 290 heartbeatLock.EnterWriteLock(); 296 HiveLogger.Debug(this.ToString() + ":END Locked for Heartbeats");291 Logger.Debug("END Locked for Heartbeats"); 297 292 if (lastHeartbeats.ContainsKey(hbData.ClientId)) { 298 293 lastHeartbeats[hbData.ClientId] = DateTime.Now; … … 302 297 heartbeatLock.ExitWriteLock(); 303 298 304 HiveLogger.Debug(this.ToString() + ":BEGIN Processing Heartbeat Jobs");299 Logger.Debug("BEGIN Processing Heartbeat Jobs"); 305 300 processJobProcess(hbData, response); 306 HiveLogger.Debug(this.ToString() + ":END Processed Heartbeat Jobs");301 Logger.Debug("END Processed Heartbeat Jobs"); 307 302 308 303 //check if new Cal must be loaded … … 314 309 //client.CalendarSyncStatus = CalendarState.Fetching; 315 310 316 HiveLogger.Info(this.ToString() + "fetch or forcefetch sent");311 Logger.Info("fetch or forcefetch sent"); 317 312 } 318 313 319 314 // check if client has a free core for a new job 320 315 // if true, ask scheduler for a new job for this client 321 HiveLogger.Debug(this.ToString() + ":BEGIN Looking for Client Jobs");316 Logger.Debug(" BEGIN Looking for Client Jobs"); 322 317 if (hbData.FreeCores > 0 && scheduler.ExistsJobForClient(hbData)) { 323 318 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.FetchJob)); … … 325 320 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.NoMessage)); 326 321 } 327 HiveLogger.Debug(this.ToString() + ":END Looked for Client Jobs");322 Logger.Debug(" END Looked for Client Jobs"); 328 323 response.Success = true; 329 324 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED; … … 332 327 333 328 //tx.Commit(); 334 HiveLogger.Debug(this.ToString() + ":END Processed Heartbeat for Client " + hbData.ClientId);329 Logger.Debug(" END Processed Heartbeat for Client " + hbData.ClientId); 335 330 return response; 336 331 } … … 344 339 /// <param name="response"></param> 345 340 private void processJobProcess(HeartBeatData hbData, ResponseHB response) { 346 HiveLogger.Info(this.ToString() + " processJobProcess:Started for Client " + hbData.ClientId);341 Logger.Debug("Started for Client " + hbData.ClientId); 347 342 List<JobDto> jobsOfClient = new List<JobDto>(DaoLocator.JobDao.FindActiveJobsOfClient(DaoLocator.ClientDao.FindById(hbData.ClientId))); 348 343 if (hbData.JobProgress != null && hbData.JobProgress.Count > 0) { … … 350 345 response.Success = false; 351 346 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED; 352 HiveLogger.Error(this.ToString() + " processJobProcess:There is no job calculated by this user " + hbData.ClientId);347 Logger.Error("There is no job calculated by this user " + hbData.ClientId); 353 348 return; 354 349 } … … 360 355 response.Success = false; 361 356 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED; 362 HiveLogger.Error(this.ToString() + " processJobProcess:There is no job calculated by this user " + hbData.ClientId + " Job: " + curJob);357 Logger.Error("There is no job calculated by this user " + hbData.ClientId + " Job: " + curJob); 363 358 } else if (curJob.State == State.abort) { 364 359 // a request to abort the job has been set … … 392 387 if (newAssignedJobs.ContainsKey(currJob.Id)) { 393 388 newAssignedJobs[currJob.Id]--; 394 HiveLogger.Error(this.ToString() + " processJobProcess:Job TTL Reduced by one for job: " + currJob + "and is now: " + newAssignedJobs[currJob.Id] + ". User that sucks: " + currJob.Client);389 Logger.Error("Job TTL Reduced by one for job: " + currJob + "and is now: " + newAssignedJobs[currJob.Id] + ". User that sucks: " + currJob.Client); 395 390 if (newAssignedJobs[currJob.Id] <= 0) { 396 HiveLogger.Error(this.ToString() + " processJobProcess:Job TTL reached Zero, Job gets removed: " + currJob + " and set back to offline. User that sucks: " + currJob.Client);391 Logger.Error("Job TTL reached Zero, Job gets removed: " + currJob + " and set back to offline. User that sucks: " + currJob.Client); 397 392 398 393 currJob.State = State.offline; … … 404 399 } 405 400 } else { 406 HiveLogger.Error(this.ToString() + " processJobProcess:Job ID wasn't with the heartbeats: " + currJob);401 Logger.Error("Job ID wasn't with the heartbeats: " + currJob); 407 402 currJob.State = State.offline; 408 403 DaoLocator.JobDao.Update(currJob); … … 413 408 414 409 if (newAssignedJobs.ContainsKey(currJob.Id)) { 415 HiveLogger.Info(this.ToString() + " processJobProcess:Job is sending a heart beat, removing it from the newAssignedJobList: " + currJob);410 Logger.Info("Job is sending a heart beat, removing it from the newAssignedJobList: " + currJob); 416 411 newAssignedJobs.Remove(currJob.Id); 417 412 } … … 427 422 /// <param name="clientId"></param> 428 423 /// <returns></returns> 429 /*public ResponseSerializedJob SendSerializedJob(Guid clientId) {430 ISession session = factory.GetSessionForCurrentThread();431 ITransaction tx = null;432 433 try {434 IJobAdapter jobAdapter =435 session.GetDataAdapter<JobDto, IJobAdapter>();436 437 tx = session.BeginTransaction();438 439 ResponseSerializedJob response = new ResponseSerializedJob();440 441 JobDto job2Calculate = scheduler.GetNextJobForClient(clientId);442 if (job2Calculate != null) {443 SerializedJob computableJob =444 jobAdapter.GetSerializedJob(job2Calculate.Id);445 446 response.Job = computableJob;447 response.Success = true;448 HiveLogger.Info(this.ToString() + " SendSerializedJob: Job pulled: " + computableJob.JobInfo + " for user " + clientId);449 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;450 lock (newAssignedJobs) {451 if (!newAssignedJobs.ContainsKey(job2Calculate.Id))452 newAssignedJobs.Add(job2Calculate.Id, ApplicationConstants.JOB_TIME_TO_LIVE);453 }454 } else {455 HiveLogger.Info(this.ToString() + " SendSerializedJob: No more Jobs left for " + clientId);456 response.Success = false;457 response.Job = null;458 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;459 }460 461 tx.Commit();462 463 return response;464 }465 catch (Exception ex) {466 if (tx != null)467 tx.Rollback();468 throw ex;469 }470 finally {471 if (session != null)472 session.EndSession();473 }474 } */475 476 /// <summary>477 /// if the client was told to pull a job he calls this method478 /// the server selects a job and sends it to the client479 /// </summary>480 /// <param name="clientId"></param>481 /// <returns></returns>482 424 public ResponseJob SendJob(Guid clientId) { 483 425 … … 487 429 if (job2Calculate != null) { 488 430 response.Job = job2Calculate; 431 response.Job.PluginsNeeded = DaoLocator.PluginInfoDao.GetPluginDependenciesForJob(response.Job); 489 432 response.Success = true; 490 HiveLogger.Info(this.ToString() + " SendSerializedJob:Job pulled: " + job2Calculate + " for user " + clientId);433 Logger.Info("Job pulled: " + job2Calculate + " for user " + clientId); 491 434 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED; 492 435 lock (newAssignedJobs) { … … 494 437 newAssignedJobs.Add(job2Calculate.Id, ApplicationConstants.JOB_TIME_TO_LIVE); 495 438 } 496 } else { 439 } else { 497 440 response.Success = false; 498 441 response.Job = null; 499 442 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT; 500 HiveLogger.Info(this.ToString() + " SendSerializedJob:No more Jobs left for " + clientId);443 Logger.Info("No more Jobs left for " + clientId); 501 444 } 502 445 … … 510 453 bool finished) { 511 454 512 HiveLogger.Info(this.ToString() + " ProcessJobResult:BEGIN Job received for Storage - main method:");455 Logger.Info("BEGIN Job received for Storage - main method:"); 513 456 514 457 … … 547 490 jobStream.Close(); 548 491 } 549 HiveLogger.Info(this.ToString() + " ProcessJobResult:END Job received for Storage:");492 Logger.Info("END Job received for Storage:"); 550 493 return response; 551 494 } … … 559 502 bool finished) { 560 503 561 HiveLogger.Info(this.ToString() + " ProcessJobResult:BEGIN Job received for Storage - SUB method: " + jobId);504 Logger.Info("BEGIN Job received for Storage - SUB method: " + jobId); 562 505 563 506 ResponseResultReceived response = new ResponseResultReceived(); … … 579 522 response.JobId = jobId; 580 523 581 HiveLogger.Error(this.ToString() + " ProcessJobResult:No job with Id " + jobId);524 Logger.Error("No job with Id " + jobId); 582 525 583 526 //tx.Rollback(); … … 588 531 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_WAS_ABORTED; 589 532 590 HiveLogger.Error(this.ToString() + " ProcessJobResult:Job was aborted! " + job.JobInfo);533 Logger.Error("Job was aborted! " + job.JobInfo); 591 534 592 535 //tx.Rollback(); … … 598 541 response.JobId = jobId; 599 542 600 HiveLogger.Error(this.ToString() + " ProcessJobResult:Job is not being calculated (client = null)! " + job.JobInfo);543 Logger.Error("Job is not being calculated (client = null)! " + job.JobInfo); 601 544 602 545 //tx.Rollback(); … … 608 551 response.JobId = jobId; 609 552 610 HiveLogger.Error(this.ToString() + " ProcessJobResult:Wrong Client for this Job! " + job.JobInfo + ", Sending Client is: " + clientId);553 Logger.Error("Wrong Client for this Job! " + job.JobInfo + ", Sending Client is: " + clientId); 611 554 612 555 //tx.Rollback(); … … 618 561 response.JobId = jobId; 619 562 620 HiveLogger.Error(this.ToString() + " ProcessJobResult:Job already finished! " + job.JobInfo + ", Sending Client is: " + clientId);563 Logger.Error("Job already finished! " + job.JobInfo + ", Sending Client is: " + clientId); 621 564 622 565 //tx.Rollback(); 623 566 return response; 624 567 } 568 //Todo: RequestsnapshotSent => calculating? 625 569 if (job.JobInfo.State == State.requestSnapshotSent) { 626 570 job.JobInfo.State = State.calculating; … … 632 576 response.JobId = jobId; 633 577 634 HiveLogger.Error(this.ToString() + " ProcessJobResult:Wrong Job State, job is: " + job.JobInfo);578 Logger.Error("Wrong Job State, job is: " + job.JobInfo); 635 579 636 580 //tx.Rollback(); … … 641 585 if (finished) { 642 586 job.JobInfo.State = State.finished; 587 job.JobInfo.DateFinished = DateTime.Now; 643 588 } 644 589 … … 652 597 response.finished = finished; 653 598 654 HiveLogger.Info(this.ToString() + " ProcessJobResult:END Job received for Storage - SUB method: " + jobId);599 Logger.Info("END Job received for Storage - SUB method: " + jobId); 655 600 return response; 656 601 … … 691 636 public Response Logout(Guid clientId) { 692 637 693 HiveLogger.Info("Client logged out " + clientId);638 Logger.Info("Client logged out " + clientId); 694 639 695 640 Response response = new Response(); … … 736 681 response.Success = false; 737 682 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_DOESNT_EXIST; 738 HiveLogger.Error(this.ToString() + " IsJobStillNeeded:Job doesn't exist (anymore)! " + jobId);683 Logger.Error("Job doesn't exist (anymore)! " + jobId); 739 684 return response; 740 685 } … … 742 687 response.Success = true; 743 688 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_ALLREADY_FINISHED; 744 HiveLogger.Error(this.ToString() + " IsJobStillNeeded:already finished! " + job);689 Logger.Error("already finished! " + job); 745 690 return response; 746 691 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HiveServerCorePlugin.cs ¶
r3012 r3578 35 35 [PluginDependency("HeuristicLab.Hive.Server.LINQDataAccess-3.2")] 36 36 [PluginDependency("HeuristicLab.Security.Contracts-3.2")] 37 [PluginDependency("HeuristicLab.Tracing", "3.2.0")] 37 38 public class HiveServerCorePlugin : PluginBase { 38 39 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs ¶
r3220 r3578 35 35 using System.Transactions; 36 36 using HeuristicLab.Hive.Server.LINQDataAccess; 37 using IsolationLevel=System.Transactions.IsolationLevel; 37 38 38 39 namespace HeuristicLab.Hive.Server.Core { … … 57 58 58 59 public void ResetJobsDependingOnResults(JobDto job) { 59 HiveLogger.Info(this.ToString() + ":Setting job " + job.Id + " offline");60 Logger.Info("Setting job " + job.Id + " offline"); 60 61 if (job != null) { 61 62 DaoLocator.JobDao.SetJobOffline(job); … … 65 66 66 67 void checkForDeadJobs() { 67 HiveLogger.Info(this.ToString() + "Searching for dead Jobs");68 using (TransactionScope scope = new TransactionScope( )) {68 Logger.Info("Searching for dead Jobs"); 69 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 69 70 List<JobDto> allJobs = new List<JobDto>(DaoLocator.JobDao.FindAll()); 70 71 foreach (JobDto curJob in allJobs) { … … 91 92 /// <returns></returns> 92 93 public ResponseList<JobDto> GetAllJobs() { 93 /*ISession session = factory.GetSessionForCurrentThread();94 95 try {96 IJobAdapter jobAdapter =97 session.GetDataAdapter<JobDto, IJobAdapter>();*/98 99 94 ResponseList<JobDto> response = new ResponseList<JobDto>(); 100 95 … … 104 99 105 100 return response; 106 /*} 107 finally { 108 if (session != null) 109 session.EndSession(); 110 } */ 111 } 101 } 102 103 public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) { 104 ResponseList<JobDto> response = new ResponseList<JobDto>(); 105 response.List = new List<JobDto>(DaoLocator.JobDao.FindWithLimitations(jobState, offset, count)); 106 return response; 107 } 112 108 113 109 /// <summary> … … 126 122 /// <returns></returns> 127 123 public ResponseObject<JobDto> GetJobById(Guid jobId) { 128 /*ISession session = factory.GetSessionForCurrentThread();129 130 try {131 IJobAdapter jobAdapter =132 session.GetDataAdapter<JobDto, IJobAdapter>();*/133 134 124 ResponseObject<JobDto> response = new ResponseObject<JobDto>(); 135 125 … … 145 135 return response; 146 136 } 147 /*finally { 148 if (session != null) 149 session.EndSession(); 150 } 151 } */ 137 138 public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) { 139 ResponseObject<JobDto> job = new ResponseObject<JobDto>(); 140 job.Obj = DaoLocator.JobDao.FindById(jobId); 141 if (job.Obj != null) { 142 job.Success = true; 143 job.StatusMessage = ApplicationConstants.RESPONSE_JOB_GET_JOB_BY_ID; 144 145 job.Obj.Client = DaoLocator.ClientDao.GetClientForJob(jobId); 146 } else { 147 job.Success = false; 148 job.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST; 149 } 150 return job; 151 } 152 152 153 153 public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) { … … 167 167 /// <returns></returns> 168 168 public ResponseObject<JobDto> AddNewJob(SerializedJob job) { 169 /*ISession session = factory.GetSessionForCurrentThread();170 171 try {172 IJobAdapter jobAdapter =173 session.GetDataAdapter<JobDto, IJobAdapter>();*/174 175 169 ResponseObject<JobDto> response = new ResponseObject<JobDto>(); 176 170 … … 218 212 /// <returns></returns> 219 213 public Response RemoveJob(Guid jobId) { 220 /*ISession session = factory.GetSessionForCurrentThread();221 222 try {223 IJobAdapter jobAdapter =224 session.GetDataAdapter<JobDto, IJobAdapter>();*/225 226 214 Response response = new Response(); 227 215 … … 238 226 return response; 239 227 } 240 /*finally {241 if (session != null)242 session.EndSession();243 }244 } */245 228 246 229 public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) { … … 258 241 public ResponseObject<SerializedJob> 259 242 GetLastSerializedJobResultOf(Guid jobId, bool requested) { 260 /*ISession session = factory.GetSessionForCurrentThread();261 262 ITransaction tx = null;263 264 try {265 IJobAdapter jobAdapter =266 session.GetDataAdapter<JobDto, IJobAdapter>();267 268 IJobResultsAdapter jobResultsAdapter =269 session.GetDataAdapter<JobResult, IJobResultsAdapter>();270 271 tx = session.BeginTransaction(); */272 243 273 244 ResponseObject<SerializedJob> response = … … 386 357 387 358 public ResponseList<JobResult> GetAllJobResults(Guid jobId) { 388 /* ISession session = factory.GetSessionForCurrentThread();389 ResponseList<JobResult> response = new ResponseList<JobResult>();390 391 try {392 IJobResultsAdapter jobResultAdapter =393 session.GetDataAdapter<JobResult, IJobResultsAdapter>();394 IJobAdapter jobAdapter = session.GetDataAdapter<JobDto, IJobAdapter>();395 396 JobDto job = jobAdapter.GetById(jobId);397 if (job == null) {398 response.Success = false;399 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;400 return response;401 }402 response.List = new List<JobResult>(jobResultAdapter.GetResultsOf(job.Id));403 response.Success = true;404 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT;405 406 return response;407 }408 finally {409 if(session != null)410 session.EndSession();411 } */412 359 return new ResponseList<JobResult>(); 413 360 } 414 361 415 362 public ResponseList<ProjectDto> GetAllProjects() { 416 /*ISession session = factory.GetSessionForCurrentThread();417 ResponseList<ProjectDto> response = new ResponseList<ProjectDto>();418 419 try {420 IProjectAdapter projectAdapter =421 session.GetDataAdapter<ProjectDto, IProjectAdapter>();422 423 List<ProjectDto> allProjects = new List<ProjectDto>(projectAdapter.GetAll());424 response.List = allProjects;425 response.Success = true;426 return response;427 }428 finally {429 if (session != null)430 session.EndSession();431 } */432 363 return null; 433 364 } 434 365 435 366 private Response createUpdateProject(ProjectDto project) { 436 /*ISession session = factory.GetSessionForCurrentThread();437 Response response = new Response();438 ITransaction tx = null;439 440 try {441 IProjectAdapter projectAdapter =442 session.GetDataAdapter<ProjectDto, IProjectAdapter>();443 444 if (project.Name == null || project.Name == "") {445 response.Success = false;446 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_NAME_EMPTY;447 return response;448 }449 tx = session.BeginTransaction();450 projectAdapter.Update(project);451 452 tx.Commit();453 response.Success = true;454 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_ADDED;455 } catch (ConstraintException ce) {456 if (tx != null)457 tx.Rollback();458 response.Success = false;459 response.StatusMessage = ce.Message;460 }461 catch (Exception ex) {462 if (tx != null)463 tx.Rollback();464 throw ex;465 }466 finally {467 if (session != null)468 session.EndSession();469 }470 return response; */471 367 return null; 472 368 } … … 481 377 482 378 public Response DeleteProject(Guid projectId) { 483 /*ISession session = factory.GetSessionForCurrentThread();484 Response response = new Response();485 ITransaction tx = null;486 487 try {488 IProjectAdapter projectAdapter =489 session.GetDataAdapter<ProjectDto, IProjectAdapter>();490 491 ProjectDto project = projectAdapter.GetById(projectId);492 if (project == null) {493 response.Success = false;494 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_DOESNT_EXIST;495 return response;496 }497 projectAdapter.Delete(project);498 tx.Commit();499 response.Success = true;500 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_PROJECT_DELETED;501 }502 catch (Exception e) {503 if (tx != null)504 tx.Rollback();505 response.Success = false;506 response.StatusMessage = e.Message;507 }508 finally {509 if (session != null)510 session.EndSession();511 }512 return response; */513 379 return null; 514 380 } 515 381 516 382 public ResponseList<JobDto> GetJobsByProject(Guid projectId) { 517 /*ISession session = factory.GetSessionForCurrentThread();518 ResponseList<JobDto> response = new ResponseList<JobDto>();519 520 try {521 IJobAdapter jobAdapter =522 session.GetDataAdapter<JobDto, IJobAdapter>();523 List<JobDto> jobsByProject = new List<JobDto>(jobAdapter.GetJobsByProject(projectId));524 response.List = jobsByProject;525 response.Success = true;526 }527 finally {528 if (session != null)529 session.EndSession();530 }531 532 return response;*/533 383 return null; 534 384 } 535 536 385 #endregion 537 386 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs ¶
r3220 r3578 97 97 } 98 98 99 public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) { 100 secMan.Authorize("AccessJobs", sessionID, Guid.Empty); 101 return jobManager.GetAllJobsWithFilter(jobState, offset, count); 102 } 103 99 104 public ResponseObject<JobDto> GetJobById(Guid jobId) { 100 105 secMan.Authorize("AccessJobs", sessionID, jobId); 101 106 return jobManager.GetJobById(jobId); 107 } 108 109 public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) { 110 secMan.Authorize("AccessJobs", sessionID, jobId); 111 return jobManager.GetJobByIdWithDetails(jobId); 102 112 } 103 113 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.DataAccess/3.2/IJobDao.cs ¶
r3018 r3578 21 21 IEnumerable<JobDto> FindFittingJobsForClient(State state, int freeCores, int freeMemory, Guid clientGuid); 22 22 Stream GetSerializedJobStream(Guid jobId); 23 24 IEnumerable<JobDto> FindWithLimitations(State jobState, int offset, int count); 23 25 } 24 26 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.DataAccess/3.2/IPluginInfoDao.cs ¶
r3011 r3578 7 7 public interface IPluginInfoDao: IGenericDao<HivePluginInfoDto> { 8 8 void InsertPluginDependenciesForJob(JobDto jobDto); 9 List<HivePluginInfoDto> GetPluginDependenciesForJob(JobDto jobDto); 9 10 } 10 11 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/BaseDao.cs ¶
r3011 r3578 3 3 using System.Linq; 4 4 using System.Text; 5 using System.Data.Linq; 6 using HeuristicLab.Tracing; 5 7 6 8 namespace HeuristicLab.Hive.Server.LINQDataAccess { … … 12 14 } 13 15 16 protected void CommitChanges() { 17 try { 18 Context.SubmitChanges(ConflictMode.ContinueOnConflict); 19 } catch (ChangeConflictException e) { 20 Logger.Warn("Concurrency Exception! " + e.Message); 21 foreach (ObjectChangeConflict conflict in Context.ChangeConflicts) { 22 conflict.Resolve(RefreshMode.KeepChanges); 23 } 24 } 25 } 26 14 27 public abstract TDatabaseEntity DtoToEntity(TBusiness source, TDatabaseEntity target); 15 28 public abstract TBusiness EntityToDto(TDatabaseEntity source, TBusiness target); -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientConfigDao.cs ¶
r3011 r3578 26 26 ClientConfig c = DtoToEntity(bObj, null); 27 27 Context.ClientConfigs.InsertOnSubmit(c); 28 Co ntext.SubmitChanges();28 CommitChanges(); 29 29 bObj.Id = c.ClientConfigId; 30 30 return bObj; … … 33 33 public void Delete(ClientConfigDto bObj) { 34 34 Context.ClientConfigs.DeleteOnSubmit(Context.ClientConfigs.SingleOrDefault(c => c.ClientConfigId.Equals(bObj.Id))); 35 Co ntext.SubmitChanges();35 CommitChanges(); 36 36 } 37 37 … … 39 39 ClientConfig cc = Context.ClientConfigs.SingleOrDefault(c => c.ClientConfigId.Equals(bObj.Id)); 40 40 DtoToEntity(bObj, cc); 41 Co ntext.SubmitChanges();41 CommitChanges(); 42 42 } 43 43 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientDao.cs ¶
r3203 r3578 43 43 dbclient.UseCalendarFromResourceId = clientGroupId; 44 44 dbclient.CalendarSyncStatus = Enum.GetName(typeof(CalendarState), CalendarState.Fetch); 45 Co ntext.SubmitChanges();45 CommitChanges(); 46 46 } 47 47 … … 49 49 Client c = DtoToEntity(info, null); 50 50 Context.Clients.InsertOnSubmit(c); 51 Co ntext.SubmitChanges();51 CommitChanges(); 52 52 info.Id = c.ResourceId; 53 53 return info; … … 58 58 Resource res = Context.Resources.SingleOrDefault(c => c.ResourceId.Equals(info.Id)); 59 59 Context.Resources.DeleteOnSubmit(res); 60 Co ntext.SubmitChanges();60 CommitChanges(); 61 61 } 62 62 … … 64 64 Client client = Context.Clients.SingleOrDefault(c => c.ResourceId.Equals(info.Id)); 65 65 DtoToEntity(info, client); 66 try { 67 Console.WriteLine("Sending from thread: " + Thread.CurrentThread.ManagedThreadId); 68 Context.SubmitChanges(); 69 } catch (System.Data.Linq.ChangeConflictException cce) { 70 Console.WriteLine(cce); 71 } 66 CommitChanges(); 72 67 } 73 68 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ClientGroupDao.cs ¶
r3220 r3578 31 31 ClientGroup cc = DtoToEntity(bObj, null); 32 32 Context.ClientGroups.InsertOnSubmit(cc); 33 Co ntext.SubmitChanges();33 CommitChanges(); 34 34 bObj.Id = cc.ResourceId; 35 35 return bObj; … … 44 44 45 45 Context.Resources.DeleteOnSubmit(res); 46 Co ntext.SubmitChanges();46 CommitChanges(); 47 47 } 48 48 … … 50 50 ClientGroup client = Context.ClientGroups.SingleOrDefault(c => c.ResourceId.Equals(bObj.Id)); 51 51 DtoToEntity(bObj, client); 52 Co ntext.SubmitChanges();52 CommitChanges(); 53 53 } 54 54 … … 57 57 Resource res = Context.Resources.SingleOrDefault(r => r.ResourceId.Equals(resource)); 58 58 cg.ClientGroup_Resources.Add(new ClientGroup_Resource { ClientGroup = cg, Resource = res }); 59 Co ntext.SubmitChanges();59 CommitChanges(); 60 60 } 61 61 … … 65 65 cg => cg.ResourceId.Equals(resource) && cg.ClientGroupId.Equals(clientGroupId)); 66 66 Context.ClientGroup_Resources.DeleteOnSubmit(cgr); 67 Co ntext.SubmitChanges();67 CommitChanges(); 68 68 } 69 69 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/ContextFactory.cs ¶
r3220 r3578 9 9 public class ContextFactory { 10 10 [ThreadStatic] 11 private static HiveDataContext _hiveDataContext ;11 private static HiveDataContext _hiveDataContext = null; 12 12 13 13 [ThreadStatic] 14 private static SqlTransaction _currentTransaction ;14 private static SqlTransaction _currentTransaction = null; 15 15 16 16 public static HiveDataContext Context { -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HeuristicLab.Hive.Server.LINQDataAccess-3.2.csproj ¶
r3220 r3578 134 134 <Name>HeuristicLab.PluginInfrastructure</Name> 135 135 </ProjectReference> 136 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 137 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 138 <Name>HeuristicLab.Tracing-3.2</Name> 139 </ProjectReference> 136 140 </ItemGroup> 137 141 <ItemGroup> -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Hive.dbml ¶
r3203 r3578 88 88 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 89 89 <Column Name="Percentage" Type="System.Double" DbType="Float" CanBeNull="true" /> 90 <Column Name="SerializedJob" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="true" UpdateCheck="Never" />90 <Column Name="SerializedJob" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="true" UpdateCheck="Never" IsDelayLoaded="true" /> 91 91 <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 92 92 <Column Name="DateCalculated" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Hive.designer.cs ¶
r3203 r3578 1774 1774 private System.Nullable<double> _Percentage; 1775 1775 1776 private System.Data.Linq. Binary_SerializedJob;1776 private System.Data.Linq.Link<System.Data.Linq.Binary> _SerializedJob; 1777 1777 1778 1778 private System.Nullable<System.DateTime> _DateCreated; … … 1957 1957 } 1958 1958 1959 [Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", CanBeNull=true,UpdateCheck=UpdateCheck.Never)]1959 [Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", UpdateCheck=UpdateCheck.Never)] 1960 1960 public System.Data.Linq.Binary SerializedJob 1961 1961 { 1962 1962 get 1963 1963 { 1964 return this._SerializedJob ;1965 } 1966 set 1967 { 1968 if ((this._SerializedJob != value))1964 return this._SerializedJob.Value; 1965 } 1966 set 1967 { 1968 if ((this._SerializedJob.Value != value)) 1969 1969 { 1970 1970 this.OnSerializedJobChanging(value); 1971 1971 this.SendPropertyChanging(); 1972 this._SerializedJob = value;1972 this._SerializedJob.Value = value; 1973 1973 this.SendPropertyChanged("SerializedJob"); 1974 1974 this.OnSerializedJobChanged(); -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/JobDao.cs ¶
r3220 r3578 25 25 } 26 26 27 public IEnumerable<JobDto> FindWithLimitations(State jobState, int offset, int count) { 28 29 IQueryable<JobDto> query = null; 30 if (jobState == State.finished) { 31 query = from job in Context.Jobs 32 where job.JobState == Enum.GetName(typeof (State), jobState) 33 orderby job.DateFinished 34 select EntityToDto(job, null); 35 } else if (jobState == State.calculating || jobState == State.requestSnapshot || jobState == State.requestSnapshotSent) { 36 query = from job in Context.Jobs 37 where job.JobState == Enum.GetName(typeof(State), jobState) 38 orderby job.DateCalculated 39 select EntityToDto(job, null); 40 } else { 41 query = from job in Context.Jobs 42 where job.JobState == Enum.GetName(typeof(State), jobState) 43 orderby job.DateCreated 44 select EntityToDto(job, null); 45 } 46 47 return query.Skip(offset).Take(count).ToList(); 48 } 49 50 27 51 public byte[] GetBinaryJobFile(Guid jobId) { 28 52 return (from job in Context.Jobs … … 34 58 Job j = DtoToEntity(bObj, null); 35 59 Context.Jobs.InsertOnSubmit(j); 36 Co ntext.SubmitChanges();60 CommitChanges(); 37 61 bObj.Id = j.JobId; 38 62 return bObj; … … 45 69 j.AssignedResources.Add(new AssignedResource { ResourceId = assignRessourceId}); 46 70 Context.Jobs.InsertOnSubmit(j); 47 Co ntext.SubmitChanges();71 CommitChanges(); 48 72 job.JobInfo.Id = j.JobId; 49 73 return job; … … 54 78 Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id)); 55 79 Context.Jobs.DeleteOnSubmit(job); 56 Co ntext.SubmitChanges();80 CommitChanges(); 57 81 } 58 82 59 83 public void Update(JobDto bObj) { 60 84 Job job = Context.Jobs.SingleOrDefault(j => j.JobId.Equals(bObj.Id)); 61 DtoToEntity(bObj, job); 62 try { 63 Context.SubmitChanges(); 64 } catch (ChangeConflictException cfe) { 65 66 } 85 DtoToEntity(bObj, job); 86 CommitChanges(); 67 87 } 68 88 … … 105 125 c.Jobs.Add(j); 106 126 j.Client = c; 107 Co ntext.SubmitChanges();127 CommitChanges(); 108 128 } 109 129 … … 112 132 j.Client = null; 113 133 j.JobState = Enum.GetName(typeof(State), State.offline); 114 Co ntext.SubmitChanges();134 CommitChanges(); 115 135 } 116 136 … … 137 157 target.DateCalculated = source.DateCalculated; 138 158 target.DateCreated = source.DateCreated; 159 target.DateFinished = source.DateFinished; 139 160 target.JobId = source.Id; 140 161 … … 162 183 target.MemoryNeeded = source.MemoryNeeded; 163 184 164 165 166 185 target.DateCalculated = source.DateCalculated; 167 186 target.DateCreated = source.DateCreated; 187 target.DateFinished = source.DateFinished; 168 188 target.Id = source.JobId; 169 170 189 171 190 target.Percentage = source.Percentage; 172 191 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/LINQDataAccessPlugin.cs ¶
r3011 r3578 11 11 [PluginDependency("HeuristicLab.Hive.Contracts-3.2")] 12 12 [PluginDependency("HeuristicLab.Hive.Server.DataAccess-3.2")] 13 [PluginDependency("HeuristicLab.Tracing", "3.2.0")] 13 14 public class LINQDataAccessPlugin: PluginBase { 14 15 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/PluginInfoDao.cs ¶
r3011 r3578 26 26 PluginInfo pi = DtoToEntity(bObj, null); 27 27 Context.PluginInfos.InsertOnSubmit(pi); 28 Co ntext.SubmitChanges();28 CommitChanges(); 29 29 bObj.Id = pi.PluginId; 30 30 return bObj; … … 39 39 PluginInfo pi = Context.PluginInfos.SingleOrDefault(p => p.PluginId.Equals(bObj.Id)); 40 40 DtoToEntity(bObj, pi); 41 Co ntext.SubmitChanges();41 CommitChanges(); 42 42 } 43 43 … … 53 53 }; 54 54 Context.PluginInfos.InsertOnSubmit(dbpi); 55 Co ntext.SubmitChanges();55 CommitChanges(); 56 56 } 57 57 … … 60 60 rq.PluginInfo = dbpi; 61 61 Context.RequiredPlugins.InsertOnSubmit(rq); 62 Co ntext.SubmitChanges();62 CommitChanges(); 63 63 } 64 } 65 66 public List<HivePluginInfoDto> GetPluginDependenciesForJob(JobDto jobDto) { 67 return (from rp in Context.RequiredPlugins 68 where rp.JobId.Equals(jobDto.Id) 69 select EntityToDto(rp.PluginInfo, null)).ToList(); 70 64 71 } 65 72 -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Properties/Settings.Designer.cs ¶
r2904 r3578 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 28 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source= SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=" +29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=" + 30 30 "True")] 31 31 public string HeuristicLab_Hive_LinqConnectionString { -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/Properties/Settings.settings ¶
r2904 r3578 6 6 <DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?> 7 7 <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 <ConnectionString>Data Source= SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</ConnectionString>8 <ConnectionString>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</ConnectionString> 9 9 <ProviderName>System.Data.SqlClient</ProviderName> 10 10 </SerializableConnectionString></DesignTimeValue> 11 <Value Profile="(Default)">Data Source= SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</Value>11 <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True</Value> 12 12 </Setting> 13 13 </Settings> -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/UptimeCalendarDao.cs ¶
r3203 r3578 60 60 UptimeCalendar uc = DtoToEntity(bObj, null); 61 61 Context.UptimeCalendars.InsertOnSubmit(uc); 62 Co ntext.SubmitChanges();62 CommitChanges(); 63 63 bObj.Id = uc.UptimeCalendarId; 64 64 return bObj; … … 67 67 public void Delete(AppointmentDto bObj) { 68 68 Context.UptimeCalendars.DeleteOnSubmit(Context.UptimeCalendars.SingleOrDefault(uc => uc.UptimeCalendarId.Equals(bObj.Id))); 69 Co ntext.SubmitChanges();69 CommitChanges(); 70 70 } 71 71 … … 73 73 UptimeCalendar cc = Context.UptimeCalendars.SingleOrDefault(c => c.UptimeCalendarId.Equals(bObj.Id)); 74 74 DtoToEntity(bObj, cc); 75 Co ntext.SubmitChanges();75 CommitChanges(); 76 76 } 77 77 … … 95 95 } 96 96 97 Co ntext.SubmitChanges();97 CommitChanges(); 98 98 } 99 99 … … 143 143 } 144 144 145 Co ntext.SubmitChanges();145 CommitChanges(); 146 146 147 147 //Get all Subgroups -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/VarBinaryStream.cs ¶
r3220 r3578 7 7 using System.Data.SqlClient; 8 8 using System.Data; 9 using HeuristicLab.Tracing; 9 10 10 11 namespace HeuristicLab.Hive.Server.LINQDataAccess { … … 253 254 254 255 public void Close() { 256 Logger.Info("Closing Stream"); 255 257 if (_transaction != null) { 256 258 _transaction.Commit(); 257 259 _transaction = null; 260 Logger.Info("Transaction commited and closed"); 258 261 } 259 262 … … 262 265 ContextFactory.Context.Dispose(); 263 266 ContextFactory.Context = null; 267 Logger.Info("Connection and Context disposed and set null"); 264 268 } 265 269 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/app.config ¶
r2904 r3578 5 5 <connectionStrings> 6 6 <add name="HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" 7 connectionString="Data Source= SEMTEX-PC;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True"7 connectionString="Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True" 8 8 providerName="System.Data.SqlClient" /> 9 9 </connectionStrings> -
TabularUnified trunk/sources/HeuristicLab.Hive.Server/3.2/HeuristicLab.Hive.Server-3.2.csproj ¶
r3011 r3578 168 168 <Name>HeuristicLab.PluginInfrastructure</Name> 169 169 </ProjectReference> 170 <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj"> 171 <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project> 172 <Name>HeuristicLab.Tracing-3.2</Name> 173 </ProjectReference> 170 174 </ItemGroup> 171 175 <ItemGroup> -
TabularUnified trunk/sources/HeuristicLab.Hive.Server/3.2/HiveServerPlugin.cs ¶
r3011 r3578 35 35 [PluginDependency("HeuristicLab.Hive.Server.LINQDataAccess-3.2")] 36 36 [PluginDependency("HeuristicLab.SpringNET", "1.3.0.0")] 37 [PluginDependency("HeuristicLab.Tracing", "3.2.0")] 37 38 public class HiveServerPlugin : PluginBase { 38 39 } -
TabularUnified trunk/sources/HeuristicLab.Hive.Server/3.2/ServiceCallInterception.cs ¶
r3220 r3578 7 7 using HeuristicLab.Hive.Server.LINQDataAccess; 8 8 using System.Transactions; 9 using HeuristicLab.Hive.Contracts; 10 using HeuristicLab.Tracing; 9 11 10 12 namespace HeuristicLab.Hive.Server { 11 13 internal class ServiceCallInterception : IMethodInterceptor { 12 14 13 private bool useTransactions = false;15 private const bool UseTransactions = true; 14 16 15 17 public object Invoke(IMethodInvocation invocation) { 16 Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Entering Method " + 17 invocation.Method.Name); 18 Logger.Info("Entering Method: " + invocation.Method.Name); 18 19 19 20 if(ContextFactory.Context != null) { 20 Console.WriteLine("Error - Not null context found - why wasn't this disposed?"); 21 Logger.Info("Not null context found - why wasn't this disposed?"); 22 try { 23 Logger.Info("Trying to dispose"); 24 ContextFactory.Context.Dispose(); 25 } catch (Exception e) { 26 Logger.Error(e); 27 } 21 28 ContextFactory.Context = null; 22 29 } … … 26 33 if (invocation.Method.Name.Equals("SendStreamedJob") || invocation.Method.Name.Equals("StoreFinishedJobResultStreamed")) { 27 34 ContextFactory.Context.Connection.Open(); 28 if(useTransactions) 29 ContextFactory.Context.Transaction = ContextFactory.Context.Connection.BeginTransaction(); 35 if(UseTransactions) { 36 Logger.Debug("Opening Transaction"); 37 ContextFactory.Context.Transaction = ContextFactory.Context.Connection.BeginTransaction(ApplicationConstants.ISOLATION_LEVEL); 38 } else { 39 Logger.Debug("Not using a Transaction"); 40 } 30 41 try { 31 42 obj = invocation.Proceed(); 32 Console.WriteLine("leaving context open for Streaming");43 Logger.Info("leaving context open for streaming"); 33 44 } 34 catch (Exception e) { 35 Console.WriteLine(e);45 catch (Exception e) { 46 Logger.Error("Exception occured during method invocation", e); 36 47 ContextFactory.Context.Dispose(); 37 48 ContextFactory.Context = null; 38 49 } 39 50 } else { 40 if( useTransactions) {41 using (TransactionScope scope = new TransactionScope( )) {51 if(UseTransactions) { 52 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 42 53 try { 54 Logger.Debug("Current Transaction Isolation level is: " + Transaction.Current.IsolationLevel); 43 55 obj = invocation.Proceed(); 44 56 scope.Complete(); 45 57 } 46 58 catch (Exception e) { 47 Console.WriteLine("Exception Occured"); 48 Console.WriteLine(e); 59 Logger.Error("Exception occured during method invocation", e); 49 60 } 50 61 finally { 51 62 ContextFactory.Context.Dispose(); 52 Console.WriteLine("setting old context null");63 Logger.Debug("Disposed Context"); 53 64 ContextFactory.Context = null; 54 Console.WriteLine("Disposing old Context");65 Logger.Debug("Set Context Null"); 55 66 } 56 67 } … … 60 71 } 61 72 catch (Exception e) { 62 Console.WriteLine("Exception Occured"); 63 Console.WriteLine(e); 73 Logger.Error("Exception occured during method invocation", e); 64 74 } 65 75 finally { 66 76 ContextFactory.Context.Dispose(); 67 Console.WriteLine("setting old context null");77 Logger.Debug("Disposed Context"); 68 78 ContextFactory.Context = null; 69 Console.WriteLine("Disposing old Context");79 Logger.Debug("Set Context Null"); 70 80 } 71 81 } 72 82 } 73 Console.WriteLine(DateTime.Now + " - " + Thread.CurrentThread.ManagedThreadId + " - Leaving Method " + 74 invocation.Method.Name); 83 Logger.Info("Leaving Method: " + invocation.Method.Name); 75 84 76 85 return obj; -
TabularUnified trunk/sources/HeuristicLab.PluginInfrastructure/Sandboxing/SandboxManager.cs ¶
r3247 r3578 94 94 applicationManager.PrepareApplicationDomain(apps, plugins); 95 95 //if (files != null && files.Count() > 0) 96 //applicationManager.LoadAssemblies(files);96 //applicationManager.LoadAssemblies(files); 97 97 return applicationDomain; 98 98 } -
TabularUnified trunk/sources/HeuristicLab.Security.Core/3.2/Properties/Settings.Designer.cs ¶
r2846 r3578 26 26 [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security; Persist Security Info" +29 " =True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true")]28 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=T" + 29 "rue;Pooling=true;MultipleActiveResultSets=true")] 30 30 public string SecurityServerConnectionString { 31 31 get { -
TabularUnified trunk/sources/HeuristicLab.Security.Core/3.2/Properties/Settings.settings ¶
r2846 r3578 4 4 <Settings> 5 5 <Setting Name="SecurityServerConnectionString" Type="System.String" Scope="Application"> 6 <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security; Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</Value>6 <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=True;Pooling=true;MultipleActiveResultSets=true</Value> 7 7 </Setting> 8 8 </Settings> -
TabularUnified trunk/sources/HeuristicLab.Security.Core/3.2/app.config ¶
r2846 r3578 10 10 <HeuristicLab.Security.Core.Properties.Settings> 11 11 <setting name="SecurityServerConnectionString" serializeAs="String"> 12 <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security; Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</value>12 <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=True;Pooling=true;MultipleActiveResultSets=true</value> 13 13 </setting> 14 14 </HeuristicLab.Security.Core.Properties.Settings> -
TabularUnified trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml ¶
r2610 r3578 9 9 <staticLogFileName value="true" /> 10 10 <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> 11 <layout type="log4net.Layout.PatternLayout"> 12 <conversionPattern value="%-4timestamp %-5level% => %message%newline%exception" /> 11 <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2"> 12 <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" /> 13 </layout> 14 </appender> 15 16 <appender name="ServerRollingFileAppender" type="log4net.Appender.RollingFileAppender"> 17 <file value="Hive.Server.log" /> 18 <appendToFile value="true" /> 19 <rollingStyle value="Size" /> 20 <maxSizeRollBackups value="10" /> 21 <maximumFileSize value="1000KB" /> 22 <staticLogFileName value="true" /> 23 <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> 24 <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2"> 25 <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" /> 26 </layout> 27 </appender> 28 29 <appender name="ClientRollingFileAppender" type="log4net.Appender.RollingFileAppender"> 30 <file value="Hive.Client.log" /> 31 <appendToFile value="true" /> 32 <rollingStyle value="Size" /> 33 <maxSizeRollBackups value="10" /> 34 <maximumFileSize value="1000KB" /> 35 <staticLogFileName value="true" /> 36 <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> 37 <layout type="HeuristicLab.Tracing.MethodCallPatternLayout, HeuristicLab.Tracing-3.2"> 38 <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.ffff} %-4timestamp %-5level %logger.%RM - %message%newline%exception" /> 13 39 </layout> 14 40 </appender> … … 18 44 <lossy value="true" /> 19 45 <evaluator type="log4net.Core.LevelEvaluator"> 20 <threshold value=" INFO"/>46 <threshold value="DEBUG"/> 21 47 </evaluator> 22 48 <appender-ref ref="RollingFileAppender" /> … … 27 53 <appender-ref ref="BufferingForwardingAppender" /> 28 54 </root> 55 56 <logger name="HeuristicLab.Hive.Server"> 57 <level value="DEBUG" /> 58 <appender-ref ref="ServerRollingFileAppender" /> 59 </logger> 60 61 <logger name="HeuristicLab.Hive.Client"> 62 <level value="DEBUG" /> 63 <appender-ref ref="ClientRollingFileAppender" /> 64 </logger> 29 65 30 66 </log4net>
Note: See TracChangeset
for help on using the changeset viewer.