Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj (revision 4170)
@@ -119,4 +119,5 @@
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd (revision 4170)
@@ -56,13 +56,14 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -87,4 +88,5 @@
+
@@ -110,6 +112,6 @@
-
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd (revision 4170)
@@ -64,6 +64,6 @@
+
-
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/Reference.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/Reference.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/Reference.cs (revision 4170)
@@ -46,16 +46,16 @@
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")]
- HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception);
+ HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception);
[System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")]
- System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState);
+ System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState);
HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")]
- HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception);
+ HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception);
[System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")]
- System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState);
+ System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState);
HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result);
@@ -208,5 +208,4 @@
}
}
-
}
@@ -705,10 +704,10 @@
}
- public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception) {
+ public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) {
return base.Channel.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) {
+ public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState) {
return base.Channel.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState);
}
@@ -724,5 +723,5 @@
byte[] result = ((byte[])(inValues[2]));
double percentage = ((double)(inValues[3]));
- System.Exception exception = ((System.Exception)(inValues[4]));
+ string exception = ((string)(inValues[4]));
return this.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState);
}
@@ -741,9 +740,9 @@
}
- public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception) {
+ public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) {
this.StoreFinishedJobResultAsync(clientId, jobId, result, percentage, exception, null);
}
- public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, object userState) {
+ public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, object userState) {
if ((this.onBeginStoreFinishedJobResultDelegate == null)) {
this.onBeginStoreFinishedJobResultDelegate = new BeginOperationDelegate(this.OnBeginStoreFinishedJobResult);
@@ -763,10 +762,10 @@
}
- public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception) {
+ public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) {
return base.Channel.ProcessSnapshot(clientId, jobId, result, percentage, exception);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) {
+ public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState) {
return base.Channel.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState);
}
@@ -782,5 +781,5 @@
byte[] result = ((byte[])(inValues[2]));
double percentage = ((double)(inValues[3]));
- System.Exception exception = ((System.Exception)(inValues[4]));
+ string exception = ((string)(inValues[4]));
return this.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState);
}
@@ -799,9 +798,9 @@
}
- public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception) {
+ public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) {
this.ProcessSnapshotAsync(clientId, jobId, result, percentage, exception, null);
}
- public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exception exception, object userState) {
+ public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, object userState) {
if ((this.onBeginProcessSnapshotDelegate == null)) {
this.onBeginProcessSnapshotDelegate = new BeginOperationDelegate(this.OnBeginProcessSnapshot);
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/System1.xsd
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/System1.xsd (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/System1.xsd (revision 4170)
@@ -1,5 +1,4 @@
-
-
+
@@ -11,10 +10,3 @@
-
-
-
-
-
-
-
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/service2.xsd
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/service2.xsd (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/service2.xsd (revision 4170)
@@ -4,5 +4,4 @@
-
@@ -55,5 +54,5 @@
-
+
@@ -62,5 +61,5 @@
-
+
@@ -69,9 +68,9 @@
-
-
+
+
-
+
@@ -80,5 +79,5 @@
-
+
@@ -87,5 +86,5 @@
-
+
@@ -94,5 +93,5 @@
-
+
@@ -101,5 +100,5 @@
-
+
@@ -108,5 +107,5 @@
-
+
@@ -115,5 +114,5 @@
-
+
@@ -122,5 +121,5 @@
-
+
@@ -129,20 +128,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -151,5 +150,5 @@
-
+
@@ -158,5 +157,5 @@
-
+
@@ -165,5 +164,5 @@
-
+
@@ -172,5 +171,5 @@
-
+
@@ -179,5 +178,5 @@
-
+
@@ -186,26 +185,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/WcfService.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/WcfService.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/WcfService.cs (revision 4170)
@@ -292,7 +292,5 @@
public void ProcessSnapshotAsync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception, bool finished) {
if (ConnState == NetworkEnum.WcfConnState.Loggedin) {
- Stream stream = GetStreamedJobResult(
- clientId, jobId, result, percentage, exception);
-
+ Stream stream = GetStreamedJobResult(clientId, jobId, result, percentage, exception);
proxy.ProcessSnapshotStreamedAsync(stream, stream);
}
@@ -353,5 +351,5 @@
jobResult.JobId = jobId;
jobResult.Percentage = percentage;
- jobResult.Exception = exception;
+ jobResult.Exception = exception != null ? exception.Message : "";
MultiStream stream = new MultiStream();
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs (revision 4170)
@@ -61,4 +61,5 @@
Job.JobStopped += new EventHandler(Job_JobStopped);
Job.JobFailed += new EventHandler(Job_JobFailed);
+ Job.Prepare();
Job.Start();
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs (revision 4170)
@@ -60,6 +60,5 @@
[StorableHook(HookType.AfterDeserialization)]
private void AfterDeserialization() {
- int[] parts = this.storableVersion.Split('.').Select(s => int.Parse(s)).ToArray();
- this.Version = new Version(parts[0], parts[1], parts[2], parts[3]);
+ this.Version = new Version(storableVersion);
}
@@ -71,4 +70,5 @@
return clone;
}
+
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs (revision 4170)
@@ -41,27 +41,30 @@
[Storable]
[DataMember]
- public double Percentage { get; set; }
- [Storable]
- [DataMember]
- public DateTime Timestamp { get; set; }
- [Storable]
- [DataMember]
public Guid ClientId { get; set; }
[Storable]
[DataMember]
- public Exception Exception { get; set; }
+ public State State { get; set; }
[Storable]
[DataMember]
- public DateTime DateFinished { get; set; }
+ public double? Percentage { get; set; }
+ [Storable]
+ [DataMember]
+ public String Exception { get; set; }
+ [Storable]
+ [DataMember]
+ public DateTime? DateCalculated { get; set; }
+ [Storable]
+ [DataMember]
+ public DateTime? DateFinished { get; set; }
public override Common.IDeepCloneable Clone(Common.Cloner cloner) {
JobResult clone = (JobResult) base.Clone(cloner);
clone.ClientId = this.ClientId;
+ clone.DateCalculated = this.DateCalculated;
clone.DateFinished = this.DateFinished;
- throw new NotImplementedException("Exception kann nicht serialisiert werden, deshalb irgendwie wrappen... oder nur message (+stacktrace, ...?) speichern");
clone.Exception = this.Exception;
clone.JobId = this.JobId;
clone.Percentage = this.Percentage;
- clone.Timestamp = this.Timestamp;
+ clone.State = this.State;
return clone;
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResultList.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResultList.cs (revision 4170)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResultList.cs (revision 4170)
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Collections;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Hive.Contracts.BusinessObjects {
+ public class JobResultList : ObservableList, IDeepCloneable {
+ public JobResultList() { }
+ public JobResultList(IEnumerable collection) {
+ this.list = new List(collection);
+ }
+
+ [StorableConstructor]
+ protected JobResultList(bool deserializing) : base(deserializing) { }
+
+ public object Clone() {
+ return Clone(new Cloner());
+ }
+
+ public virtual IDeepCloneable Clone(Cloner cloner) {
+ JobResultList clone = (JobResultList)Activator.CreateInstance(this.GetType());
+ cloner.RegisterClonedObject(this, clone);
+ clone.list = (this.Select(x => (JobResult)cloner.Clone(x))).ToList();
+ return clone;
+ }
+ }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj (revision 4170)
@@ -120,4 +120,5 @@
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientCommunicator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientCommunicator.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientCommunicator.cs (revision 4170)
@@ -47,5 +47,5 @@
byte[] result,
double percentage,
- Exception exception);
+ string exception);
[OperationContract]
ResponseResultReceived ProcessSnapshot(Guid clientId,
@@ -53,5 +53,5 @@
byte[] result,
double percentage,
- Exception exception);
+ string exception);
[OperationContract]
Response Logout(Guid clientId);
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IExecutionEngineFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IExecutionEngineFacade.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IExecutionEngineFacade.cs (revision 4170)
@@ -42,4 +42,6 @@
[OperationContract]
ResponseObject GetJobById(Guid jobId);
+ [OperationContract]
+ ResponseObject GetAllJobResults(IEnumerable jobIds);
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IJobManager.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IJobManager.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IJobManager.cs (revision 4170)
@@ -50,5 +50,5 @@
ResponseObject GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot);
[OperationContract]
- ResponseList GetAllJobResults(Guid jobId);
+ ResponseObject GetAllJobResults(IEnumerable jobIds);
[OperationContract]
Response RequestSnapshot(Guid jobId);
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs (revision 4170)
@@ -109,5 +109,7 @@
if (Content.Experiment != null) {
runCollectionView.Content = Content.Experiment.Runs;
- Content.Prepare();
+ if (Content.ExecutionState == ExecutionState.Stopped) {
+ Content.Prepare();
+ }
}
SetEnabledStateOfControls();
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemListView.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemListView.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemListView.cs (revision 4170)
@@ -36,8 +36,4 @@
this.removeButton.Enabled = false;
}
-
- protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs> e) {
- base.Content_ItemsAdded(sender, e);
- }
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs (revision 4170)
@@ -92,5 +92,5 @@
this.stateTextBox.Location = new System.Drawing.Point(95, 19);
this.stateTextBox.Name = "stateTextBox";
- this.stateTextBox.Size = new System.Drawing.Size(432, 20);
+ this.stateTextBox.Size = new System.Drawing.Size(509, 20);
this.stateTextBox.TabIndex = 2;
//
@@ -101,5 +101,5 @@
this.userIdTextBox.Location = new System.Drawing.Point(91, 28);
this.userIdTextBox.Name = "userIdTextBox";
- this.userIdTextBox.Size = new System.Drawing.Size(448, 20);
+ this.userIdTextBox.Size = new System.Drawing.Size(525, 20);
this.userIdTextBox.TabIndex = 3;
//
@@ -117,5 +117,5 @@
this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 63);
this.dateCreatedTextBox.Name = "dateCreatedTextBox";
- this.dateCreatedTextBox.Size = new System.Drawing.Size(432, 20);
+ this.dateCreatedTextBox.Size = new System.Drawing.Size(509, 20);
this.dateCreatedTextBox.TabIndex = 5;
//
@@ -126,5 +126,5 @@
this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 107);
this.dateFinishedTextBox.Name = "dateFinishedTextBox";
- this.dateFinishedTextBox.Size = new System.Drawing.Size(432, 20);
+ this.dateFinishedTextBox.Size = new System.Drawing.Size(509, 20);
this.dateFinishedTextBox.TabIndex = 6;
//
@@ -135,5 +135,5 @@
this.priorityTextBox.Location = new System.Drawing.Point(91, 50);
this.priorityTextBox.Name = "priorityTextBox";
- this.priorityTextBox.Size = new System.Drawing.Size(448, 20);
+ this.priorityTextBox.Size = new System.Drawing.Size(525, 20);
this.priorityTextBox.TabIndex = 7;
//
@@ -144,5 +144,5 @@
this.coresNeededTextBox.Location = new System.Drawing.Point(91, 72);
this.coresNeededTextBox.Name = "coresNeededTextBox";
- this.coresNeededTextBox.Size = new System.Drawing.Size(448, 20);
+ this.coresNeededTextBox.Size = new System.Drawing.Size(525, 20);
this.coresNeededTextBox.TabIndex = 8;
//
@@ -153,5 +153,5 @@
this.memoryNeededTextBox.Location = new System.Drawing.Point(91, 94);
this.memoryNeededTextBox.Name = "memoryNeededTextBox";
- this.memoryNeededTextBox.Size = new System.Drawing.Size(448, 20);
+ this.memoryNeededTextBox.Size = new System.Drawing.Size(525, 20);
this.memoryNeededTextBox.TabIndex = 9;
//
@@ -160,7 +160,7 @@
this.exceptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.exceptionTextBox.Location = new System.Drawing.Point(91, 116);
+ this.exceptionTextBox.Location = new System.Drawing.Point(95, 129);
this.exceptionTextBox.Name = "exceptionTextBox";
- this.exceptionTextBox.Size = new System.Drawing.Size(448, 20);
+ this.exceptionTextBox.Size = new System.Drawing.Size(509, 20);
this.exceptionTextBox.TabIndex = 10;
//
@@ -169,7 +169,7 @@
this.projectTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.projectTextBox.Location = new System.Drawing.Point(91, 138);
+ this.projectTextBox.Location = new System.Drawing.Point(91, 116);
this.projectTextBox.Name = "projectTextBox";
- this.projectTextBox.Size = new System.Drawing.Size(448, 20);
+ this.projectTextBox.Size = new System.Drawing.Size(525, 20);
this.projectTextBox.TabIndex = 11;
//
@@ -231,5 +231,5 @@
//
this.exceptionLabel.AutoSize = true;
- this.exceptionLabel.Location = new System.Drawing.Point(3, 116);
+ this.exceptionLabel.Location = new System.Drawing.Point(7, 129);
this.exceptionLabel.Name = "exceptionLabel";
this.exceptionLabel.Size = new System.Drawing.Size(57, 13);
@@ -240,5 +240,5 @@
//
this.projectLabel.AutoSize = true;
- this.projectLabel.Location = new System.Drawing.Point(3, 138);
+ this.projectLabel.Location = new System.Drawing.Point(3, 116);
this.projectLabel.Name = "projectLabel";
this.projectLabel.Size = new System.Drawing.Size(43, 13);
@@ -256,7 +256,7 @@
this.snapshotGroupBox.Controls.Add(this.snapshotTimeLabel);
this.snapshotGroupBox.Controls.Add(this.snapshotStatusLabel);
- this.snapshotGroupBox.Location = new System.Drawing.Point(6, 304);
+ this.snapshotGroupBox.Location = new System.Drawing.Point(6, 310);
this.snapshotGroupBox.Name = "snapshotGroupBox";
- this.snapshotGroupBox.Size = new System.Drawing.Size(533, 100);
+ this.snapshotGroupBox.Size = new System.Drawing.Size(610, 100);
this.snapshotGroupBox.TabIndex = 21;
this.snapshotGroupBox.TabStop = false;
@@ -266,5 +266,5 @@
//
this.requestSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.requestSnapshotButton.Location = new System.Drawing.Point(307, 67);
+ this.requestSnapshotButton.Location = new System.Drawing.Point(384, 67);
this.requestSnapshotButton.Name = "requestSnapshotButton";
this.requestSnapshotButton.Size = new System.Drawing.Size(107, 26);
@@ -277,5 +277,5 @@
//
this.openSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.openSnapshotButton.Location = new System.Drawing.Point(420, 67);
+ this.openSnapshotButton.Location = new System.Drawing.Point(497, 67);
this.openSnapshotButton.Name = "openSnapshotButton";
this.openSnapshotButton.Size = new System.Drawing.Size(107, 26);
@@ -291,5 +291,5 @@
this.snapshotTimeText.Location = new System.Drawing.Point(45, 41);
this.snapshotTimeText.Name = "snapshotTimeText";
- this.snapshotTimeText.Size = new System.Drawing.Size(482, 20);
+ this.snapshotTimeText.Size = new System.Drawing.Size(559, 20);
this.snapshotTimeText.TabIndex = 24;
//
@@ -300,5 +300,5 @@
this.snapshotStatusText.Location = new System.Drawing.Point(45, 19);
this.snapshotStatusText.Name = "snapshotStatusText";
- this.snapshotStatusText.Size = new System.Drawing.Size(482, 20);
+ this.snapshotStatusText.Size = new System.Drawing.Size(559, 20);
this.snapshotStatusText.TabIndex = 23;
//
@@ -327,5 +327,5 @@
this.dateCalculatedText.Location = new System.Drawing.Point(95, 85);
this.dateCalculatedText.Name = "dateCalculatedText";
- this.dateCalculatedText.Size = new System.Drawing.Size(432, 20);
+ this.dateCalculatedText.Size = new System.Drawing.Size(509, 20);
this.dateCalculatedText.TabIndex = 22;
//
@@ -352,9 +352,11 @@
this.jobStatusGroupBox.Controls.Add(this.dateCreatedTextBox);
this.jobStatusGroupBox.Controls.Add(this.percentageLabel);
+ this.jobStatusGroupBox.Controls.Add(this.exceptionLabel);
this.jobStatusGroupBox.Controls.Add(this.dateCreatedLabel);
this.jobStatusGroupBox.Controls.Add(this.dateFinishedLabel);
- this.jobStatusGroupBox.Location = new System.Drawing.Point(6, 164);
+ this.jobStatusGroupBox.Controls.Add(this.exceptionTextBox);
+ this.jobStatusGroupBox.Location = new System.Drawing.Point(6, 142);
this.jobStatusGroupBox.Name = "jobStatusGroupBox";
- this.jobStatusGroupBox.Size = new System.Drawing.Size(533, 134);
+ this.jobStatusGroupBox.Size = new System.Drawing.Size(610, 162);
this.jobStatusGroupBox.TabIndex = 24;
this.jobStatusGroupBox.TabStop = false;
@@ -367,5 +369,5 @@
this.percentageProgressBar.Location = new System.Drawing.Point(153, 41);
this.percentageProgressBar.Name = "percentageProgressBar";
- this.percentageProgressBar.Size = new System.Drawing.Size(374, 20);
+ this.percentageProgressBar.Size = new System.Drawing.Size(451, 20);
this.percentageProgressBar.TabIndex = 25;
//
@@ -380,5 +382,5 @@
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(550, 479);
+ this.tabControl.Size = new System.Drawing.Size(627, 518);
this.tabControl.TabIndex = 25;
//
@@ -394,8 +396,6 @@
this.detailsTabPage.Controls.Add(this.projectLabel);
this.detailsTabPage.Controls.Add(this.coresNeededTextBox);
- this.detailsTabPage.Controls.Add(this.exceptionLabel);
this.detailsTabPage.Controls.Add(this.memoryNeededTextBox);
this.detailsTabPage.Controls.Add(this.memoryNeededLabel);
- this.detailsTabPage.Controls.Add(this.exceptionTextBox);
this.detailsTabPage.Controls.Add(this.coresNeededLabel);
this.detailsTabPage.Controls.Add(this.projectTextBox);
@@ -404,5 +404,5 @@
this.detailsTabPage.Name = "detailsTabPage";
this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3);
- this.detailsTabPage.Size = new System.Drawing.Size(542, 453);
+ this.detailsTabPage.Size = new System.Drawing.Size(619, 492);
this.detailsTabPage.TabIndex = 0;
this.detailsTabPage.Text = "Details";
@@ -424,5 +424,5 @@
this.jobIdTextBox.Location = new System.Drawing.Point(91, 6);
this.jobIdTextBox.Name = "jobIdTextBox";
- this.jobIdTextBox.Size = new System.Drawing.Size(448, 20);
+ this.jobIdTextBox.Size = new System.Drawing.Size(525, 20);
this.jobIdTextBox.TabIndex = 26;
//
@@ -433,5 +433,5 @@
this.logTabPage.Name = "logTabPage";
this.logTabPage.Padding = new System.Windows.Forms.Padding(3);
- this.logTabPage.Size = new System.Drawing.Size(542, 453);
+ this.logTabPage.Size = new System.Drawing.Size(545, 453);
this.logTabPage.TabIndex = 1;
this.logTabPage.Text = "Log";
@@ -457,5 +457,5 @@
this.Controls.Add(this.tabControl);
this.Name = "JobItemView";
- this.Size = new System.Drawing.Size(556, 485);
+ this.Size = new System.Drawing.Size(633, 524);
this.snapshotGroupBox.ResumeLayout(false);
this.snapshotGroupBox.PerformLayout();
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs (revision 4170)
@@ -36,4 +36,5 @@
logView.Content = Content.Log;
Content_JobDtoChanged(this, EventArgs.Empty);
+ Content_JobStateChanged(this, EventArgs.Empty);
if (Content.LatestSnapshot != null) {
snapshotStatusText.InvokeIfRequired(c => c.Text = Content.LatestSnapshot.StatusMessage);
@@ -47,4 +48,5 @@
Content.LatestSnapshotChanged += new EventHandler(Content_LatestSnapshotChanged);
Content.JobDtoChanged += new EventHandler(Content_JobDtoChanged);
+ Content.JobStateChanged += new EventHandler(Content_JobStateChanged);
Content.SnapshotRequestedStateChanged += new EventHandler(Content_SnapshotRequestedStateChanged);
}
@@ -53,25 +55,32 @@
Content.LatestSnapshotChanged -= new EventHandler(Content_LatestSnapshotChanged);
Content.JobDtoChanged -= new EventHandler(Content_JobDtoChanged);
+ Content.JobStateChanged -= new EventHandler(Content_JobStateChanged);
Content.SnapshotRequestedStateChanged -= new EventHandler(Content_SnapshotRequestedStateChanged);
base.DeregisterContentEvents();
}
- void Content_JobDtoChanged(object sender, EventArgs e) {
+ private void Content_JobDtoChanged(object sender, EventArgs e) {
if (InvokeRequired) {
Invoke(new EventHandler(Content_JobDtoChanged), sender, e);
} else {
this.jobIdTextBox.Text = Content.JobDto.Id.ToString();
- this.stateTextBox.Text = Content.JobDto.State.ToString();
- this.userIdTextBox.Text = Content.JobDto.UserId.ToString();
- this.percentageTextBox.Text = (Content.JobDto.Percentage*100).ToString() + "%";
- this.percentageProgressBar.Value = Convert.ToInt32(Content.JobDto.Percentage * percentageProgressBar.Maximum);
this.dateCreatedTextBox.Text = Content.JobDto.DateCreated.ToString();
- this.dateCalculatedText.Text = Content.JobDto.DateCalculated.ToString();
- this.dateFinishedTextBox.Text = Content.JobDto.DateFinished.ToString();
this.priorityTextBox.Text = Content.JobDto.Priority.ToString();
this.coresNeededTextBox.Text = Content.JobDto.CoresNeeded.ToString();
this.memoryNeededTextBox.Text = Content.JobDto.MemoryNeeded.ToString();
- this.exceptionTextBox.Text = Content.JobDto.Exception;
this.projectTextBox.Text = Content.JobDto.Project != null ? Content.JobDto.Project.Name : "-";
+ }
+ }
+
+ private void Content_JobStateChanged(object sender, EventArgs e) {
+ if (InvokeRequired) {
+ Invoke(new EventHandler(Content_JobStateChanged), sender, e);
+ } else {
+ this.stateTextBox.Text = Content.State.ToString();
+ this.percentageTextBox.Text = (Content.Percentage * 100).ToString() + "%";
+ this.percentageProgressBar.Value = Convert.ToInt32(Content.Percentage * percentageProgressBar.Maximum);
+ this.dateCalculatedText.Text = Content.DateCalculated.ToString();
+ this.dateFinishedTextBox.Text = Content.DateFinished.ToString();
+ this.exceptionTextBox.Text = Content.Exception;
}
}
@@ -95,6 +104,6 @@
base.SetEnabledStateOfControls();
if (Content != null) {
- openSnapshotButton.Enabled = Content.SnapshotRequestedState == SnapshotRequestedState.Idle;
- requestSnapshotButton.Enabled = Content.SnapshotRequestedState == SnapshotRequestedState.Requested;
+ openSnapshotButton.Enabled = Content.LatestSnapshot != null && Content.SnapshotRequestedState == SnapshotRequestedState.Idle;
+ requestSnapshotButton.Enabled = Content.SnapshotRequestedState == SnapshotRequestedState.Idle;
}
this.jobIdTextBox.ReadOnly = this.ReadOnly;
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj (revision 4170)
@@ -111,5 +111,7 @@
-
+
+ Designer
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs (revision 4170)
@@ -41,4 +41,5 @@
using System.Diagnostics;
using System.Collections;
+using System.ServiceModel;
namespace HeuristicLab.Hive.Experiment {
@@ -52,5 +53,5 @@
private const string itemName = "Hive Experiment";
private const string itemDescription = "A runner for a single experiment, which's algorithms are executed in the Hive.";
- private const int resultPollingIntervalMs = 15000;
+ private const int resultPollingIntervalMs = 5000;
private const int snapshotPollingIntervalMs = 1000;
private const int maxSnapshotRetries = 20;
@@ -59,4 +60,8 @@
private System.Timers.Timer timer;
private bool pausePending, stopPending;
+ private bool sendingJobsFinished = false;
+
+ // ensure that only 2 threads can fetch jobresults simultaniously
+ private Semaphore fetchJobSemaphore = new Semaphore(2, 2);
[Storable]
@@ -76,5 +81,5 @@
private bool stopResultsPollingPending = false;
- private IDictionary resultPollingThreads;
+ private Thread resultPollingThread;
///
@@ -145,6 +150,4 @@
public HiveExperiment(bool deserializing)
: base(deserializing) {
- this.resultPollingThreads = new Dictionary();
- jobItems = new JobItemList();
}
@@ -157,6 +160,5 @@
jobItems = new JobItemList();
isPollingResults = false;
- resultPollingThreads = new Dictionary();
- RegisterEvents();
+ RegisterJobItemListEvents();
InitTimer();
}
@@ -181,5 +183,5 @@
clone.stopPending = this.stopPending;
clone.pausePending = this.pausePending;
- clone.jobItems = (JobItemList)cloner.Clone(jobItems);
+ clone.jobItems.AddRange((JobItemList)cloner.Clone(jobItems));
clone.lastUpdateTime = this.lastUpdateTime;
clone.isPollingResults = this.isPollingResults;
@@ -192,8 +194,8 @@
this.IsPollingResults = false;
this.stopResultsPollingPending = false;
- RegisterEvents();
+ RegisterJobItemListEvents();
LogMessage("I was deserialized.");
}
-
+
private void InitTimer() {
timer = new System.Timers.Timer(100);
@@ -264,33 +266,41 @@
lastUpdateTime = DateTime.Now;
this.ExecutionState = Core.ExecutionState.Started;
+ StartResultPolling();
+
Thread t = new Thread(() => {
IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
-
- pendingOptimizersByJobId = new Dictionary();
- parentOptimizersByPendingOptimizer = GetOptimizers(true);
- IEnumerable groups = ResourceGroups;
- foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) {
- SerializedJob serializedJob = CreateSerializedJob(optimizer);
- ResponseObject response = executionEngineFacade.AddJobWithGroupStrings(serializedJob, groups);
- pendingOptimizersByJobId.Add(response.Obj.Id, optimizer);
-
- JobItem jobItem = new JobItem() {
- JobDto = response.Obj,
- LatestSnapshot = new ResponseObject() {
- Obj = serializedJob,
- StatusMessage = "Initial Snapshot",
- Success = true
- },
- Optimizer = optimizer
- };
- jobItems.Add(jobItem);
- jobItem.LogMessage("Job sent to Hive");
-
- LogMessage("Sent job to Hive (jobId: " + response.Obj.Id + ")");
- }
-
- // start results polling after sending sending the jobs to the server (to avoid race conflicts at the optimizers-collection)
- StartResultPolling();
+ try {
+ pendingOptimizersByJobId = new Dictionary();
+
+ LogMessage("Extracting jobs from Experiment");
+ parentOptimizersByPendingOptimizer = GetOptimizers(true);
+ LogMessage("Extraction of jobs from Experiment finished");
+
+ IEnumerable groups = ResourceGroups;
+
+ sendingJobsFinished = false;
+ foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) {
+ SerializedJob serializedJob = CreateSerializedJob(optimizer);
+ ResponseObject response = executionEngineFacade.AddJobWithGroupStrings(serializedJob, groups);
+ pendingOptimizersByJobId.Add(response.Obj.Id, optimizer);
+
+ JobItem jobItem = new JobItem() {
+ JobDto = response.Obj,
+ LatestSnapshot = null,
+ Optimizer = optimizer
+ };
+ lock (jobItems) {
+ jobItems.Add(jobItem);
+ }
+ LogMessage(jobItem.JobDto.Id, "Job sent to Hive");
+ }
+ sendingJobsFinished = true;
+ } catch (Exception e) {
+ LogMessage("Error: Starting HiveExperiment failed: " + e.Message);
+ this.ExecutionState = Core.ExecutionState.Stopped;
+ OnStopped();
+ }
+
});
t.Start();
@@ -305,30 +315,15 @@
}
- private void CreateResultPollingThreads() {
- foreach (JobItem jobItem in JobItems) {
- if (!resultPollingThreads.ContainsKey(jobItem.JobDto.Id) && jobItem.JobDto.State != State.Finished) {
- resultPollingThreads.Add(jobItem.JobDto.Id, CreateResultPollingThread(jobItem.JobDto));
- }
- }
- }
-
public void StartResultPolling() {
this.stopResultsPollingPending = false;
this.IsPollingResults = true;
- lock (resultPollingThreads) {
- CreateResultPollingThreads();
- foreach (Thread pollingThread in resultPollingThreads.Values) {
- if (pollingThread.ThreadState != System.Threading.ThreadState.Running) {
- pollingThread.Start();
- }
- }
- }
+ resultPollingThread = CreateResultPollingThread();
+ if (resultPollingThread.ThreadState != System.Threading.ThreadState.Running)
+ resultPollingThread.Start();
}
public void StopResultPolling() {
this.stopResultsPollingPending = true;
- foreach (Thread pollingThread in resultPollingThreads.Values) {
- pollingThread.Interrupt();
- }
+ resultPollingThread.Interrupt();
this.stopResultsPollingPending = false;
}
@@ -369,5 +364,5 @@
HeuristicLab.Optimization.Experiment experiment = optimizer as HeuristicLab.Optimization.Experiment;
if (this.experiment != experiment) {
- prepend += "Experiment/"; // don't prepend for top-level optimizers
+ prepend += experiment.Name + "/"; // don't prepend for top-level optimizers
}
foreach (IOptimizer opt in experiment.Optimizers) {
@@ -376,5 +371,5 @@
} else if (optimizer is BatchRun) {
BatchRun batchRun = optimizer as BatchRun;
- prepend += "BatchRun/";
+ prepend += batchRun.Name + "/";
for (int i = 0; i < batchRun.Repetitions; i++) {
IOptimizer opt = (IOptimizer)batchRun.Algorithm.Clone();
@@ -409,5 +404,5 @@
BatchRun batchRun = (BatchRun)parentOptimizer;
if (newOptimizer is IAlgorithm) {
- batchRun.Runs.Add(new Run(newOptimizer.Name, (IAlgorithm)newOptimizer) );
+ batchRun.Runs.Add(new Run(newOptimizer.Name, (IAlgorithm)newOptimizer));
} else {
throw new NotSupportedException("Only IAlgorithm types supported");
@@ -422,5 +417,5 @@
IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
Response response = executionEngineFacade.AbortJob(jobId);
- GetJobItemById(jobId).LogMessage("Aborting Job: " + response.StatusMessage);
+ LogMessage(jobId, "Aborting Job: " + response.StatusMessage);
}
@@ -428,5 +423,14 @@
private IExecutionEngineFacade GetExecutionEngineFacade() {
- return ServiceLocator.CreateExecutionEngineFacade(ServerUrl);
+ IExecutionEngineFacade executionEngineFacade = null;
+ do {
+ try {
+ executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(ServerUrl);
+ } catch (EndpointNotFoundException exception) {
+ LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec.");
+ Thread.Sleep(resultPollingIntervalMs);
+ }
+ } while (executionEngineFacade == null && this.ExecutionState != Core.ExecutionState.Stopped);
+ return executionEngineFacade;
}
@@ -444,5 +448,5 @@
// find out which which plugins are needed for the given object
List pluginsNeeded = (
- from p in GetDeclaringPlugins(optimizer.GetType())
+ from p in GetDeclaringPlugins(job.GetType())
select new HivePluginInfoDto() {
Name = p.Name,
@@ -466,81 +470,212 @@
}
- private Thread CreateResultPollingThread(JobDto job) {
+ ///
+ /// Requests a resultList for all jobItems not finished or aborted
+ ///
+ ///
+ private Thread CreateResultPollingThread() {
return new Thread(() => {
try {
- GetJobItemById(job.Id).LogMessage("Starting job results polling");
- IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
- IJob restoredObject = null;
- IOptimizer originalOptimizer = pendingOptimizersByJobId[job.Id];
-
do {
- // loop while
- // 1. the user doesn't request an abort
- // 2. there is a problem with server communication (success==false)
- // 3. no result for the job is available yet (response.Obj==null)
- // 4. the result that we get from the server is a snapshot and not the final result
-
- if (stopPending || !this.IsPollingResults) {
- return;
+ IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
+ IEnumerable jobIdsToQuery = from job in JobItems
+ where job.State != State.Finished &&
+ job.State != State.Failed
+ select job.JobDto.Id;
+ if (jobIdsToQuery.Count() > 0) {
+ LogMessage("Polling results for " + jobIdsToQuery.Count() + " jobs");
+ try {
+ ResponseObject response = executionEngineFacade.GetAllJobResults(jobIdsToQuery);
+ if (response.Success) {
+ JobResultList jobItemList = response.Obj;
+ UpdateJobItems(jobItemList);
+
+ LogMessage("Polling successfully finished");
+ }
+ } catch (Exception e) {
+ LogMessage("Polling results failed: " + e.Message);
+ }
+ Thread.Sleep(resultPollingIntervalMs);
+ } else {
+ if (sendingJobsFinished) {
+ // all the jobs have been sent to hive, but non are to query any more (all finished or failed)
+ this.stopResultsPollingPending = true;
+ }
}
-
- ResponseObject response = executionEngineFacade.GetJobById(job.Id);
- LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")");
- GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage);
-
- UpdateJobItem(response.Obj);
-
- if (response.Obj.State == State.Abort) {
- pendingOptimizersByJobId.Remove(job.Id);
- parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
- GetJobItemById(job.Id).LogMessage("Job successfully aborted");
- return;
- }
-
- if (response.Obj.State == State.Failed) {
- pendingOptimizersByJobId.Remove(job.Id);
- parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
- GetJobItemById(job.Id).LogMessage("Job failed with exception: " + response.Obj.Exception);
- return;
- }
-
- if (response.Success && response.Obj != null && response.Obj.State == State.Finished) {
- ResponseObject jobResponse = executionEngineFacade.GetLastSerializedResult(job.Id, false, false);
- restoredObject = XmlParser.Deserialize(new MemoryStream(jobResponse.Obj.SerializedJobData));
- UpdateSnapshot(jobResponse);
- } else {
- Thread.Sleep(resultPollingIntervalMs);
- }
- } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped);
-
- LogMessage("Job finished (jobId: " + job.Id + ")");
- GetJobItemById(job.Id).LogMessage("Job finished");
- // job retrieved... replace the existing optimizers with the finished one
-
- IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer;
-
- ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer);
- pendingOptimizersByJobId.Remove(job.Id);
- parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
-
+ } while (!this.stopResultsPollingPending);
} catch (ThreadInterruptedException exception) {
-
+ // thread has been interuppted
} finally {
- GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped");
- lock (resultPollingThreads) {
- resultPollingThreads.Remove(job.Id);
- if (resultPollingThreads.Count == 0) {
- IsPollingResults = false;
- }
+ this.IsPollingResults = false;
+ }
+ });
+ }
+
+ ///
+ /// Updates all JobItems with the results
+ ///
+ ///
+ private void UpdateJobItems(JobResultList jobResultList) {
+ // use a Dict to avoid quadratic runtime complexity
+ IDictionary jobResultDict = jobResultList.ToDictionary(job => job.JobId);
+ lock (jobItems) {
+ foreach (JobItem jobItem in JobItems) {
+ if (jobResultDict.ContainsKey(jobItem.JobDto.Id)) {
+ jobItem.JobResult = jobResultDict[jobItem.JobDto.Id];
}
-
- // check if finished
- if (pendingOptimizersByJobId.Count == 0) {
- this.ExecutionState = Core.ExecutionState.Stopped;
- OnStopped();
- }
+ }
+ }
+ }
+
+ void JobItem_JobStateChanged(object sender, EventArgs e) {
+ JobItem jobItem = (JobItem)sender;
+ Thread t = new Thread(() => {
+ if (jobItem.State == State.Finished) {
+ FetchAndUpdateJob(jobItem.JobDto.Id);
+ DisposeOptimizerMappings(jobItem.JobDto.Id);
+ } else if (jobItem.State == State.Failed) {
+ DisposeOptimizerMappings(jobItem.JobDto.Id);
+ }
+
+ if (NoMorePendingOptimizers()) {
+ StopResultPolling();
+ this.ExecutionState = Core.ExecutionState.Stopped;
+ OnStopped();
}
});
- }
+ t.Start();
+ }
+
+ private bool NoMorePendingOptimizers() {
+ return pendingOptimizersByJobId.Count == 0;
+ }
+
+ ///
+ /// Removes optimizers from
+ /// - parentOptimizersByPendingOptimizer
+ /// - pendingOptimizersByJobId
+ ///
+ ///
+ private void DisposeOptimizerMappings(Guid jobId) {
+ parentOptimizersByPendingOptimizer.Remove(pendingOptimizersByJobId[jobId]);
+ pendingOptimizersByJobId.Remove(jobId);
+ }
+
+ ///
+ /// Fetches the finished job from the server and updates the jobItem
+ ///
+ private void FetchAndUpdateJob(Guid jobId) {
+ LogMessage(jobId, "FetchAndUpdateJob started");
+ IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
+ IOptimizer originalOptimizer = pendingOptimizersByJobId[jobId];
+
+ fetchJobSemaphore.WaitOne();
+ ResponseObject jobResponse = executionEngineFacade.GetLastSerializedResult(jobId, false, false);
+ UpdateSnapshot(jobResponse);
+
+ IJob restoredObject = XmlParser.Deserialize(new MemoryStream(jobResponse.Obj.SerializedJobData));
+ IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer;
+
+ ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer);
+ fetchJobSemaphore.Release();
+ LogMessage(jobId, "FetchAndUpdateJob ended");
+ }
+
+ //// ensure that not all resultPollingThreads can access the server simultaniously
+ //private Semaphore resultPollingSemaphore = new Semaphore(5, 5);
+
+ //private Thread CreateResultPollingThread(JobDto job) {
+ // return new Thread(() => {
+ // try {
+ // GetJobItemById(job.Id).LogMessage("Starting job results polling");
+ // IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
+ // IJob restoredObject = null;
+ // IOptimizer originalOptimizer = pendingOptimizersByJobId[job.Id];
+
+ // do {
+ // // loop while
+ // // 1. the user doesn't request an abort
+ // // 2. there is a problem with server communication (success==false)
+ // // 3. no result for the job is available yet (response.Obj==null)
+ // // 4. the result that we get from the server is a snapshot and not the final result
+ // try {
+ // resultPollingSemaphore.WaitOne();
+ // if (stopPending || !this.IsPollingResults) {
+ // return;
+ // }
+
+ // ResponseObject response = null;
+ // try {
+ // response = executionEngineFacade.GetJobById(job.Id);
+ // LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")");
+ // GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage);
+
+ // UpdateJobItem(response.Obj);
+
+ // if (response.Obj.State == State.Abort) {
+ // pendingOptimizersByJobId.Remove(job.Id);
+ // parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
+ // GetJobItemById(job.Id).LogMessage("Job successfully aborted");
+ // return;
+ // }
+
+ // if (response.Obj.State == State.Failed) {
+ // pendingOptimizersByJobId.Remove(job.Id);
+ // parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
+ // GetJobItemById(job.Id).LogMessage("Job failed with exception: " + response.Obj.Exception);
+ // return;
+ // }
+ // } catch (Exception e) {
+ // LogMessage("Error: Result polling failed for job (" + job.Id + "): " + e.Message);
+ // GetJobItemById(job.Id).LogMessage("Error: Result polling failed: " + e.Message);
+ // }
+
+ // if (response != null && response.Success && response.Obj != null && response.Obj.State == State.Finished) {
+ // try {
+ // ResponseObject jobResponse = executionEngineFacade.GetLastSerializedResult(job.Id, false, false);
+ // restoredObject = XmlParser.Deserialize(new MemoryStream(jobResponse.Obj.SerializedJobData));
+ // UpdateSnapshot(jobResponse);
+ // } catch (Exception e) {
+ // LogMessage("Error: Retrieving final result failed for job (" + job.Id + "): " + e.Message);
+ // GetJobItemById(job.Id).LogMessage("Error: Retrieving final result failed: " + e.Message);
+ // }
+ // } else {
+ // Thread.Sleep(resultPollingIntervalMs);
+ // }
+ // } finally {
+ // // use finally to always release the semaphore lock
+ // resultPollingSemaphore.Release();
+ // }
+ // } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped);
+
+ // LogMessage("Job finished (jobId: " + job.Id + ")");
+ // GetJobItemById(job.Id).LogMessage("Job finished");
+ // // job retrieved... replace the existing optimizers with the finished one
+
+ // IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer;
+
+ // ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer);
+ // pendingOptimizersByJobId.Remove(job.Id);
+ // parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
+
+ // } catch (ThreadInterruptedException exception) {
+
+ // } finally {
+ // GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped");
+ // //lock (resultPollingThreads) {
+ // // resultPollingThreads.Remove(job.Id);
+ // // if (resultPollingThreads.Count == 0) {
+ // // IsPollingResults = false;
+ // // }
+ // //}
+
+ // // check if finished
+ // if (pendingOptimizersByJobId.Count == 0) {
+ // this.ExecutionState = Core.ExecutionState.Stopped;
+ // OnStopped();
+ // }
+ // }
+ // });
+ //}
private void UpdateJobItem(JobDto jobDto) {
@@ -559,4 +694,9 @@
log.LogMessage(message);
}
+ }
+
+ private void LogMessage(Guid jobId, string message) {
+ GetJobItemById(jobId).LogMessage(message);
+ LogMessage(message + " (jobId: " + jobId + ")");
}
@@ -598,8 +738,8 @@
}
if (response.Success) {
- GetJobItemById(jobId).LogMessage("Snapshot polling successfull for job " + jobId);
+ LogMessage(jobId, "Snapshot polling successfull for job " + jobId);
GetJobItemById(jobId).LatestSnapshot = response;
} else {
- GetJobItemById(jobId).LogMessage("Error: Polling of Snapshot failed for job " + jobId + ": " + response.StatusMessage);
+ LogMessage(jobId, "Error: Polling of Snapshot failed for job " + jobId + ": " + response.StatusMessage);
}
}
@@ -770,5 +910,5 @@
}
- private void RegisterEvents() {
+ private void RegisterJobItemListEvents() {
jobItems.CollectionReset += new CollectionItemsChangedEventHandler>(jobItems_CollectionReset);
jobItems.ItemsAdded += new CollectionItemsChangedEventHandler>(jobItems_ItemsAdded);
@@ -777,35 +917,41 @@
}
- private void DeregisterEvents() {
- jobItems.CollectionReset += new CollectionItemsChangedEventHandler>(jobItems_CollectionReset);
- jobItems.ItemsAdded += new CollectionItemsChangedEventHandler>(jobItems_ItemsAdded);
- jobItems.ItemsRemoved += new CollectionItemsChangedEventHandler>(jobItems_ItemsRemoved);
- jobItems.ItemsReplaced += new CollectionItemsChangedEventHandler>(jobItems_ItemsReplaced);
- }
-
+ private void DeregisterJobItemListEvents() {
+ jobItems.CollectionReset -= new CollectionItemsChangedEventHandler>(jobItems_CollectionReset);
+ jobItems.ItemsAdded -= new CollectionItemsChangedEventHandler>(jobItems_ItemsAdded);
+ jobItems.ItemsRemoved -= new CollectionItemsChangedEventHandler>(jobItems_ItemsRemoved);
+ jobItems.ItemsReplaced -= new CollectionItemsChangedEventHandler>(jobItems_ItemsReplaced);
+ }
void jobItems_ItemsReplaced(object sender, CollectionItemsChangedEventArgs> e) {
- UpdateSnapshotRequestedEvents(e);
- }
-
- private void UpdateSnapshotRequestedEvents(CollectionItemsChangedEventArgs> e) {
- foreach (var item in e.OldItems) {
- item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged);
- }
- foreach (var item in e.Items) {
- item.Value.SnapshotRequestedStateChanged += new EventHandler(JobItem_SnapshotRequestedStateChanged);
+ UpdateJobItemEvents(e);
+ }
+
+ private void UpdateJobItemEvents(CollectionItemsChangedEventArgs> e) {
+ if (e.OldItems != null) {
+ foreach (var item in e.OldItems) {
+ item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged);
+ item.Value.JobStateChanged -= new EventHandler(JobItem_JobStateChanged);
+ }
+ }
+ if (e.Items != null) {
+ foreach (var item in e.Items) {
+ item.Value.JobStateChanged += new EventHandler(JobItem_JobStateChanged);
+ item.Value.SnapshotRequestedStateChanged += new EventHandler(JobItem_SnapshotRequestedStateChanged);
+ }
}
}
void jobItems_ItemsRemoved(object sender, CollectionItemsChangedEventArgs> e) {
- UpdateSnapshotRequestedEvents(e);
+ UpdateJobItemEvents(e);
}
void jobItems_ItemsAdded(object sender, CollectionItemsChangedEventArgs> e) {
- UpdateSnapshotRequestedEvents(e);
+ UpdateJobItemEvents(e);
}
void jobItems_CollectionReset(object sender, CollectionItemsChangedEventArgs> e) {
foreach (var item in e.OldItems) {
+ item.Value.JobStateChanged -= new EventHandler(JobItem_JobStateChanged);
item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged);
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs (revision 4170)
@@ -21,10 +21,10 @@
public override Image ItemImage {
get {
- if (jobDto.State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
- else if (jobDto.State == State.Idle) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
- else if (jobDto.State == State.Calculating) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
- else if (jobDto.State == State.Abort) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
- else if (jobDto.State == State.Failed) return HeuristicLab.Common.Resources.VS2008ImageLibrary.Error;
- else if (jobDto.State == State.Finished) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+ if (State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+ else if (State == State.Idle) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+ else if (State == State.Calculating) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
+ else if (State == State.Abort) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+ else if (State == State.Failed) return HeuristicLab.Common.Resources.VS2008ImageLibrary.Error;
+ else if (State == State.Finished) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event;
}
@@ -33,4 +33,7 @@
[Storable]
private JobDto jobDto;
+ ///
+ /// Some static information about the job. Don't use State-Information out of there
+ ///
public JobDto JobDto {
get { return jobDto; }
@@ -46,4 +49,38 @@
[Storable]
+ private JobResult jobResult;
+ public JobResult JobResult {
+ private get { return jobResult; }
+ set {
+ if (jobResult != value) {
+ jobResult = value;
+ OnJobStateChanged();
+ OnToStringChanged();
+ OnItemImageChanged();
+ }
+ }
+ }
+
+ public State State {
+ get { return jobResult != null ? JobResult.State : JobDto.State; }
+ }
+
+ public double? Percentage {
+ get { return jobResult != null ? JobResult.Percentage : JobDto.Percentage; }
+ }
+
+ public string Exception {
+ get { return jobResult != null ? JobResult.Exception : JobDto.Exception; }
+ }
+
+ public DateTime? DateCalculated {
+ get { return jobResult != null ? JobResult.DateCalculated : JobDto.DateCalculated; }
+ }
+
+ public DateTime? DateFinished {
+ get { return jobResult != null ? JobResult.DateFinished : JobDto.DateFinished; }
+ }
+
+ [Storable]
private ResponseObject latestSnapshot;
public ResponseObject LatestSnapshot {
@@ -52,5 +89,7 @@
if (latestSnapshot != value) {
latestSnapshot = value;
- latestSnapshotTime = DateTime.Now;
+ if (value != null) {
+ latestSnapshotTime = DateTime.Now;
+ }
SnapshotRequestedState = Experiment.SnapshotRequestedState.Idle;
OnLatestSnapshotChanged();
@@ -114,4 +153,11 @@
}
+ public event EventHandler JobStateChanged;
+ private void OnJobStateChanged() {
+ LogMessage("JobStateChanged");
+ EventHandler handler = JobStateChanged;
+ if (handler != null) handler(this, EventArgs.Empty);
+ }
+
public void LogMessage(string message) {
lock (locker) {
@@ -128,4 +174,5 @@
clone.log = (ILog)cloner.Clone(this.log);
clone.optimizer = (IOptimizer)cloner.Clone(this.optimizer);
+ clone.jobResult = (JobResult)cloner.Clone(this.jobResult);
return clone;
}
@@ -142,4 +189,5 @@
}
+
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/OptimizerJob.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/OptimizerJob.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/OptimizerJob.cs (revision 4170)
@@ -57,7 +57,6 @@
}
- // [chn] needed?
- public void Prepare(Core.IOperation initialOperation) {
- throw new NotImplementedException();
+ public void Prepare() {
+ optimizer.Prepare();
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config (revision 4170)
@@ -9,5 +9,5 @@
- net.tcp://10.42.1.153:9000/ExecutionEngine/ExecutionEngineFacade
+ net.tcp://10.20.71.22:9000/ExecutionEngine/ExecutionEngineFacade
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.JobBase/3.3/Interfaces/IJob.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.JobBase/3.3/Interfaces/IJob.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.JobBase/3.3/Interfaces/IJob.cs (revision 4170)
@@ -10,5 +10,5 @@
void Run();
- void Prepare(IOperation initialOperation);
+ void Prepare();
void Start();
void Stop();
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs (revision 4170)
@@ -469,12 +469,5 @@
//tx = session.BeginTransaction();
- ResponseResultReceived response =
- ProcessJobResult(
- result.ClientId,
- result.JobId,
- new byte[] { },
- result.Percentage,
- result.Exception,
- finished);
+ ResponseResultReceived response = ProcessJobResult(result.ClientId, result.JobId, new byte[] { }, result.Percentage, result.Exception, finished);
if (response.Success) {
@@ -509,6 +502,6 @@
Guid jobId,
byte[] result,
- double percentage,
- Exception exception,
+ double? percentage,
+ string exception,
bool finished) {
@@ -522,8 +515,10 @@
if (job != null) {
job.JobInfo = DaoLocator.JobDao.FindById(jobId);
- job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId);
- }
-
- if (job == null && job.JobInfo != null) {
+ if (job.JobInfo != null) {
+ job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId);
+ }
+ }
+
+ if (job != null && job.JobInfo == null) {
response.Success = false;
response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOB_WITH_THIS_ID;
@@ -591,7 +586,7 @@
job.JobInfo.Percentage = percentage;
- if (exception != null) {
+ if (!string.IsNullOrEmpty(exception)) {
job.JobInfo.State = State.Failed;
- job.JobInfo.Exception = exception.ToString();
+ job.JobInfo.Exception = exception;
job.JobInfo.DateFinished = DateTime.Now;
} else if (finished) {
@@ -629,10 +624,10 @@
byte[] result,
double percentage,
- Exception exception) {
+ string exception) {
return ProcessJobResult(clientId, jobId, result, percentage, exception, true);
}
- public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
+ public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) {
return ProcessJobResult(clientId, jobId, result, percentage, exception, false);
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs (revision 4170)
@@ -67,5 +67,5 @@
}
- public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
+ public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) {
using (contextFactory.GetContext()) {
return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
@@ -89,5 +89,5 @@
}
- public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
+ public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) {
using (contextFactory.GetContext()) {
return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception);
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs (revision 4170)
@@ -75,5 +75,14 @@
}
}
+
+
+ public ResponseObject GetAllJobResults(IEnumerable jobIds) {
+ using (contextFactory.GetContext(false)) {
+ return jobManager.GetAllJobResults(jobIds);
+ }
+ }
#endregion
+
+
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs (revision 4170)
@@ -154,8 +154,8 @@
}
- public ResponseList GetAllJobResults(Guid jobId) {
- using (contextFactory.GetContext(false)) {
- secMan.Authorize("AccessJobResults", sessionID, jobId);
- return jobManager.GetAllJobResults(jobId);
+ public ResponseObject GetAllJobResults(IEnumerable jobIds) {
+ using (contextFactory.GetContext(false)) {
+ //secMan.Authorize("AccessJobResults", sessionID, jobId); skip authorization
+ return jobManager.GetAllJobResults(jobIds);
}
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj (revision 4170)
@@ -165,7 +165,4 @@
-
-
-
{9076697B-C151-46CD-95BC-1D059492B478}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs (revision 4170)
@@ -320,6 +320,22 @@
}
- public ResponseList GetAllJobResults(Guid jobId) {
- return new ResponseList();
+ public ResponseObject GetAllJobResults(IEnumerable jobIds) {
+ ResponseObject response = new ResponseObject();
+ JobResultList jobResultList = new JobResultList();
+ IEnumerable jobs = DaoLocator.JobDao.FindJobsById(jobIds);
+ foreach (JobDto job in jobs) {
+ jobResultList.Add(new JobResult() {
+ JobId = job.Id,
+ State = job.State,
+ DateCalculated = job.DateCalculated,
+ DateFinished = job.DateFinished,
+ Exception = job.Exception,
+ Percentage = job.Percentage
+ });
+ }
+ response.Obj = jobResultList;
+ response.Success = true;
+ response.StatusMessage = ApplicationConstants.RESPONSE_JOB_ALL_JOBS;
+ return response;
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj (revision 4170)
@@ -87,5 +87,4 @@
-
@@ -94,15 +93,8 @@
-
-
-
-
-
-
-
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientAdapter.cs (revision 4169)
+++ (revision )
@@ -1,46 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- ///
- /// The client database adapter
- ///
- public interface IClientAdapter : IDataAdapter {
- ///
- /// Get the client with the specified name
- ///
- ///
- ///
- ClientDto GetByName(string name);
-
- ///
- /// Gets all clients that are not in a group
- ///
- ///
- ICollection GetGrouplessClients();
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigAdapter.cs (revision 4169)
+++ (revision )
@@ -1,30 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- public interface IClientConfigAdapter: IDataAdapter {
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupAdapter.cs (revision 4169)
+++ (revision )
@@ -1,47 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- ///
- /// The client group database adapter
- ///
- public interface IClientGroupAdapter: IDataAdapter {
- ///
- /// Get the client group with the specified name
- ///
- ///
- ///
- ClientGroupDto GetByName(string name);
-
- ///
- /// Gets all client groups where the resource is member of
- ///
- ///
- ///
- ICollection MemberOf(ResourceDto resource);
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobAdapter.cs (revision 4169)
+++ (revision )
@@ -1,104 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-using System.IO;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- public interface IJobAdapter: IDataAdapter {
- ///
- /// Gets all subjobs of the specified job
- ///
- ///
- ICollection GetAllSubjobs(JobDto job);
-
- ///
- /// Gets all Jobs with the specified state
- ///
- ///
- ICollection GetJobsByState(State state);
-
- ///
- /// Finds a job with the specified criterias
- ///
- /// all jobs with the specified state
- /// all jobs which require less or equal cores
- /// all jobs which require less or equal memory
- /// all jobs that can be calculated by that resource
- ///
- ICollection FindJobs(State state,
- int cores,
- int memory,
- Guid resourceId);
-
- ///
- /// Gets all jobs of the client
- ///
- ///
- ///
- ICollection GetJobsOf(ClientDto client);
-
- ///
- /// Gets all active jobs of the client
- ///
- ///
- ///
- ICollection GetActiveJobsOf(ClientDto client);
-
- ///
- /// Gets all jobs of the user
- ///
- ///
- ///
- ICollection GetJobsOf(Guid userId);
-
- ///
- /// Gets all jobs of the project
- ///
- ///
- ///
- ICollection GetJobsByProject(Guid projectId);
-
- ///
- /// Gets the computable job with the secified jobId
- ///
- ///
- ///
- SerializedJob GetSerializedJob(Guid jobId);
-
- ///
- /// Gets a stream object for the large serialized job data
- ///
- ///
- ///
- Stream GetSerializedJobStream(Guid jobId, bool useExistingConnection);
-
- ///
- /// Saves or update the computable job
- ///
- ///
- void UpdateSerializedJob(SerializedJob job);
- }
-}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs (revision 4170)
@@ -25,4 +25,6 @@
void SetBinaryJobFile(Guid jobId, byte[] data);
+
+ IEnumerable FindJobsById(IEnumerable jobIds);
}
}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobResultsAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobResultsAdapter.cs (revision 4169)
+++ (revision )
@@ -1,65 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-using System.IO;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- public interface IJobResultsAdapter: IDataAdapter {
- ///
- /// Gets all results for the specified job
- ///
- ///
- ///
- ICollection GetResultsOf(Guid jobId);
-
- ///
- /// Gets the last result for the specified job
- ///
- ///
- ///
- JobResult GetLastResultOf(Guid jobId);
-
- ///
- /// Gets the computable job result with the secified jobResultId
- ///
- ///
- ///
- SerializedJobResult GetSerializedJobResult(Guid jobResultId);
-
- ///
- /// Gets a stream object for the large serialized job result data
- ///
- ///
- ///
- Stream GetSerializedJobResultStream(Guid jobResultId, bool useExistingConnection);
-
- ///
- /// Saves or update the computable job result
- ///
- ///
- void UpdateSerializedJobResult(SerializedJobResult jobResult);
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoAdapter.cs (revision 4169)
+++ (revision )
@@ -1,37 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- ///
- /// The plugin info database adapter
- ///
- public interface IPluginInfoAdapter : IDataAdapter {
- HivePluginInfoDto GetByNameVersionBuilddate(String name, String version, DateTime buildDate);
-
- ICollection GetOrphanedPluginInfos();
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IProjectAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IProjectAdapter.cs (revision 4169)
+++ (revision )
@@ -1,10 +1,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- public interface IProjectAdapter : IDataAdapter {
- }
-}
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IResourceAdapter.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IResourceAdapter.cs (revision 4169)
+++ (revision )
@@ -1,47 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see .
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.Hive.Server.DataAccess {
- ///
- /// The resource database adapter
- ///
- public interface IResourceAdapter: IPolymorphicDataAdapter {
- ///
- /// Gets the resource and updates the values of the object
- ///
- ///
- ///
- bool GetById(ResourceDto resource);
-
- ///
- /// Get the resource with the specified name
- ///
- ///
- ///
- ResourceDto GetByName(string name);
- }
-}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs (revision 4170)
@@ -11,4 +11,5 @@
using HeuristicLab.Tracing;
using System.Threading;
+using HeuristicLab.Hive.Server.LINQDataAccess.Properties;
@@ -67,5 +68,5 @@
private static DisposableHiveDataContext CreateContext() {
- return new DisposableHiveDataContext("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=SSPI");
+ return new DisposableHiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj (revision 4170)
@@ -125,4 +125,5 @@
+
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs (revision 4170)
@@ -150,4 +150,11 @@
}
+ public IEnumerable FindJobsById(IEnumerable jobIds) {
+ IQueryable jobs = from job in Context.Jobs
+ where jobIds.Contains(job.JobId)
+ select EntityToDto(job, null);
+
+ return jobs.ToList();
+ }
#endregion
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.Designer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.Designer.cs (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.Designer.cs (revision 4170)
@@ -27,6 +27,6 @@
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
- [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=" +
- "True;MultipleActiveResultSets=True")]
+ [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;" +
+ "")]
public string HeuristicLab_Hive_LinqConnectionString {
get {
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.settings
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.settings (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.settings (revision 4170)
@@ -6,8 +6,8 @@
<?xml version="1.0" encoding="utf-16"?>
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <ConnectionString>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True;MultipleActiveResultSets=True</ConnectionString>
+ <ConnectionString>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;</ConnectionString>
<ProviderName>System.Data.SqlClient</ProviderName>
</SerializableConnectionString>
- Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True;MultipleActiveResultSets=True
+ Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config (revision 4170)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config (revision 4170)
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/App.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/App.config (revision 4169)
+++ (revision )
@@ -1,56 +1,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLab.Hive.Server-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLab.Hive.Server-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLab.Hive.Server-3.3.csproj (revision 4170)
@@ -170,7 +170,4 @@
-
- Designer
-
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/HeuristicLab.Hive-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/HeuristicLab.Hive-3.3.csproj (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/HeuristicLab.Hive-3.3.csproj (revision 4170)
@@ -73,4 +73,5 @@
Always
+ Designer
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd (revision 4169)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd (revision 4170)
@@ -1,3 +1,3 @@
-ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
+ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server.LINQDataAccess\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
ConfigMerger "%SolutionDir%HeuristicLab.Hive.Client.Core\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
ConfigMerger "%SolutionDir%HeuristicLab.Hive.Experiment\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
Index: /branches/3.3-HiveMigration/tools/prepareHiveDatabase.sql
===================================================================
--- /branches/3.3-HiveMigration/tools/prepareHiveDatabase.sql (revision 4169)
+++ /branches/3.3-HiveMigration/tools/prepareHiveDatabase.sql (revision 4170)
@@ -2,5 +2,6 @@
/*
-/* use these DROP commands if you want to run this query a second time on the same db */
+use these DROP commands if you want to run this query a second time on the same db */
+/*
ALTER TABLE dbo.AssignedResources ALTER COLUMN AssignedRessourcesId DROP ROWGUIDCOL;
ALTER TABLE dbo.Job ALTER COLUMN JobId DROP ROWGUIDCOL;
@@ -25,4 +26,5 @@
ALTER TABLE dbo.UptimeStatistics DROP CONSTRAINT [DF_UptimeStatistics_UptimeStatisticsId];
*/
+
ALTER TABLE dbo.AssignedResources ALTER COLUMN AssignedRessourcesId ADD ROWGUIDCOL;