Changeset 6004
- Timestamp:
- 04/11/11 20:57:29 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs
r5795 r6004 50 50 } 51 51 catch (Exception e) { 52 OnMessageLogged("Couldn't connect to Slave core. Is it possible that the Slave Core isn't running? \nException is: " + e.ToString());52 OnMessageLogged("Couldn't connect to Slave core. Is it possible that the Slave Core isn't running?" + Environment.NewLine + "Exception is: " + e.ToString()); 53 53 return false; 54 54 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveItem.cs
r5826 r6004 67 67 } 68 68 catch (Exception ex) { 69 OnMessageLogged("Error establishing connection to Core. Are you missing a configuration file? \n"+ ex.ToString());69 OnMessageLogged("Error establishing connection to Core. Are you missing a configuration file?" + Environment.NewLine + ex.ToString()); 70 70 } 71 71 } … … 78 78 } 79 79 catch (Exception) { 80 OnMessageLogged("Couldn't connect to Slave core. Is it possible that the Slave Core isn't running? \n");80 OnMessageLogged("Couldn't connect to Slave core. Is it possible that the Slave Core isn't running?" + Environment.NewLine); 81 81 return false; 82 82 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.4/SlaveView.cs
r5826 r6004 110 110 111 111 void Content_SlaveShutdown(object sender, System.EventArgs e) { 112 txtLog.AppendText("Slave did shutdown \n");112 txtLog.AppendText("Slave did shutdown" + Environment.NewLine); 113 113 Task.Factory.StartNew(Connector); 114 114 } 115 115 116 116 void Content_SlaveMessageLogged(object sender, EventArgs<string> e) { 117 txtLog.AppendText(e.Value + "\n");117 txtLog.AppendText(e.Value + Environment.NewLine); 118 118 } 119 119 #endregion … … 208 208 } 209 209 catch (InvalidOperationException ex) { 210 MessageBox.Show("Error starting service: Hive Slave Service not found! \n"+ ex.ToString());210 MessageBox.Show("Error starting service: Hive Slave Service not found!" + Environment.NewLine + ex.ToString()); 211 211 } 212 212 catch (Exception ex) { 213 MessageBox.Show("Error starting service, exception is: \n"+ ex.ToString());213 MessageBox.Show("Error starting service, exception is: " + Environment.NewLine + ex.ToString()); 214 214 } 215 215 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs
r5790 r6004 103 103 foreach (KeyValuePair<Guid, Executor> kvp in engines) { 104 104 Executor e = kvp.Value; 105 prog[e.JobId] = e.ExecutionTime; 105 //don't include jobs in hb's which are currently serializing 106 if (e.SendHeartbeatForExecutor) { 107 prog[e.JobId] = e.ExecutionTime; 108 } 106 109 } 107 110 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
r5826 r6004 38 38 private Semaphore pauseStopSem = new Semaphore(0, 1); 39 39 40 public bool SendHeartbeatForExecutor { get; set; } 41 40 42 public bool Aborted { get; set; } 43 44 public DateTime CreationTime { get; set; } 41 45 42 46 private Exception currentException; … … 63 67 } 64 68 65 public DateTime CreationTime { get; set; } 69 public Executor() { 70 SendHeartbeatForExecutor = true; 71 } 66 72 67 73 /// <param name="serializedJob"></param> … … 90 96 91 97 public void Pause() { 98 SendHeartbeatForExecutor = false; 92 99 if (Job == null) { 93 100 SlaveClientCom.Instance.ClientCom.LogMessage("Pausing job: Job is null"); … … 108 115 109 116 public void Stop() { 117 SendHeartbeatForExecutor = false; 110 118 if (Job == null) { 111 119 SlaveClientCom.Instance.ClientCom.LogMessage("Stopping job: Job is null"); … … 181 189 182 190 private void Job_JobFailed(object sender, EventArgs e) { 183 //TODO: get exception to client184 191 HeuristicLab.Common.EventArgs<Exception> ex = (HeuristicLab.Common.EventArgs<Exception>)e; 185 192 currentException = ex.Value; … … 241 248 } 242 249 243 public Executor() {244 }245 246 250 public void Dispose() { 247 251 if (Job != null) -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r5787 r6004 142 142 SlaveClientCom.Instance.ClientCom.LogMessage("Fetching plugins for job"); 143 143 144 IEnumerable<Plugin> pluginDescriptions = WcfService.Instance.GetPlugins();145 144 List<Plugin> requiredPlugins = new List<Plugin>(); 146 145 foreach (Guid pluginId in myJob.PluginsNeededIds) { 147 Plugin pl = pluginDescriptions.FirstOrDefault(p => p.Id == pluginId); 148 if (pl != null) 149 requiredPlugins.Add(pl); 146 //TODO: rewrite, GetPlugin(..) should be the last thing to do after checking the local plugins 147 Plugin plugin = WcfService.Instance.GetPlugin(pluginId); 148 if (plugin != null) 149 requiredPlugins.Add(plugin); 150 150 } 151 151 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs
r5790 r6004 112 112 113 113 #region Plugin Methods 114 115 public Plugin GetPlugin(Guid id) { 116 return CallHiveService(s => s.GetPlugin(id)); 117 } 118 114 119 public IEnumerable<Plugin> GetPlugins() { 115 120 return CallHiveService(s => s.GetPlugins()); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.cs
r5779 r6004 93 93 DateTime until = to != null ? to.DateTime : upperLimit; 94 94 TimeSpan duration = until - from.DateTime; 95 string tooltip = string.Format("State: {0} \nDuration: {1}\n{2} - {3}", from.State, duration, from.DateTime, until);95 string tooltip = string.Format("State: {0} " + Environment.NewLine + " Duration: {1} " + Environment.NewLine + " {2} - {3}", from.State, duration, from.DateTime, until); 96 96 if (!string.IsNullOrEmpty(from.Exception)) 97 tooltip += "\n"+ from.Exception;97 tooltip += Environment.NewLine + from.Exception; 98 98 ganttChart.AddData(name, from.State.ToString(), from.DateTime, until, tooltip, false); 99 99 } 100 100 101 101 protected override void SetEnabledStateOfControls() { 102 102 base.SetEnabledStateOfControls(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Heartbeat.cs
r5614 r6004 33 33 String val = "SlaveId: " + SlaveId + ", FreeCores: " + FreeCores; 34 34 foreach (KeyValuePair<Guid, TimeSpan> kvp in JobProgress) { 35 val += "\nId" + kvp.Key + " ExecutionTime " + kvp.Value;35 val += Environment.NewLine + "Id" + kvp.Key + " ExecutionTime " + kvp.Value; 36 36 } 37 37 return val; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Heartbeat.cs
r5405 r6004 42 42 String val = "SlaveId: " + SlaveId + ", FreeCores: " + FreeCores; 43 43 foreach (KeyValuePair<Guid, TimeSpan> kvp in JobProgress) { 44 val += "\nId" + kvp.Key + " ExecutionTime " + kvp.Value;44 val += Environment.NewLine + "Id" + kvp.Key + " ExecutionTime " + kvp.Value; 45 45 } 46 46 return val;
Note: See TracChangeset
for help on using the changeset viewer.