- Timestamp:
- 08/06/10 09:20:18 (14 years ago)
- Location:
- branches/3.3-HiveMigration
- Files:
-
- 2 added
- 9 deleted
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj
r4133 r4170 119 119 </ItemGroup> 120 120 <ItemGroup> 121 <None Include="app.config" /> 121 122 <None Include="HeuristicLab.snk" /> 122 123 <None Include="Properties\AssemblyInfo.frame" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts.BusinessObjects1.xsd
r4107 r4170 56 56 <xs:simpleType name="State"> 57 57 <xs:restriction base="xs:string"> 58 <xs:enumeration value="nullState" /> 59 <xs:enumeration value="idle" /> 60 <xs:enumeration value="calculating" /> 61 <xs:enumeration value="offline" /> 62 <xs:enumeration value="finished" /> 63 <xs:enumeration value="abort" /> 64 <xs:enumeration value="requestSnapshot" /> 65 <xs:enumeration value="requestSnapshotSent" /> 66 <xs:enumeration value="pending" /> 58 <xs:enumeration value="NullState" /> 59 <xs:enumeration value="Idle" /> 60 <xs:enumeration value="Calculating" /> 61 <xs:enumeration value="Offline" /> 62 <xs:enumeration value="Finished" /> 63 <xs:enumeration value="Abort" /> 64 <xs:enumeration value="RequestSnapshot" /> 65 <xs:enumeration value="RequestSnapshotSent" /> 66 <xs:enumeration value="Pending" /> 67 <xs:enumeration value="Failed" /> 67 68 </xs:restriction> 68 69 </xs:simpleType> … … 87 88 <xs:element minOccurs="0" name="DateCreated" nillable="true" type="xs:dateTime" /> 88 89 <xs:element minOccurs="0" name="DateFinished" nillable="true" type="xs:dateTime" /> 90 <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:string" /> 89 91 <xs:element minOccurs="0" name="MemoryNeeded" type="xs:int" /> 90 92 <xs:element minOccurs="0" name="ParentJob" nillable="true" type="tns:JobDto" /> … … 110 112 <xs:extension xmlns:q6="http://schemas.datacontract.org/2004/07/HeuristicLab.DataAccess" base="q6:PersistableObject"> 111 113 <xs:sequence> 112 <xs:element minOccurs="0" name="BuildDate" type="xs:dateTime" />113 114 <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" /> 115 <xs:element minOccurs="0" name="Update" type="xs:boolean" /> 114 116 <xs:element xmlns:q7="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="Version" nillable="true" type="q7:Version" /> 115 117 </xs:sequence> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/HeuristicLab.Hive.Contracts1.xsd
r4107 r4170 64 64 <xs:extension base="tns:Response"> 65 65 <xs:sequence> 66 <xs:element minOccurs="0" name="Finished" type="xs:boolean" /> 66 67 <xs:element minOccurs="0" name="JobId" type="ser:guid" /> 67 <xs:element minOccurs="0" name="finished" type="xs:boolean" />68 68 </xs:sequence> 69 69 </xs:extension> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/Reference.cs
r4107 r4170 46 46 47 47 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")] 48 HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception);48 HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception); 49 49 50 50 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")] 51 System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, System.AsyncCallback callback, object asyncState);51 System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState); 52 52 53 53 HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result); 54 54 55 55 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")] 56 HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception);56 HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception); 57 57 58 58 [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")] 59 System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, System.AsyncCallback callback, object asyncState);59 System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState); 60 60 61 61 HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result); … … 208 208 } 209 209 } 210 211 210 } 212 211 … … 705 704 } 706 705 707 public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception) {706 public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) { 708 707 return base.Channel.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); 709 708 } 710 709 711 710 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 712 public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, System.AsyncCallback callback, object asyncState) {711 public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState) { 713 712 return base.Channel.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState); 714 713 } … … 724 723 byte[] result = ((byte[])(inValues[2])); 725 724 double percentage = ((double)(inValues[3])); 726 System.Exception exception = ((System.Exception)(inValues[4]));725 string exception = ((string)(inValues[4])); 727 726 return this.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState); 728 727 } … … 741 740 } 742 741 743 public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception) {742 public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) { 744 743 this.StoreFinishedJobResultAsync(clientId, jobId, result, percentage, exception, null); 745 744 } 746 745 747 public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, object userState) {746 public void StoreFinishedJobResultAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, object userState) { 748 747 if ((this.onBeginStoreFinishedJobResultDelegate == null)) { 749 748 this.onBeginStoreFinishedJobResultDelegate = new BeginOperationDelegate(this.OnBeginStoreFinishedJobResult); … … 763 762 } 764 763 765 public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception) {764 public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) { 766 765 return base.Channel.ProcessSnapshot(clientId, jobId, result, percentage, exception); 767 766 } 768 767 769 768 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] 770 public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, System.AsyncCallback callback, object asyncState) {769 public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, System.AsyncCallback callback, object asyncState) { 771 770 return base.Channel.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState); 772 771 } … … 782 781 byte[] result = ((byte[])(inValues[2])); 783 782 double percentage = ((double)(inValues[3])); 784 System.Exception exception = ((System.Exception)(inValues[4]));783 string exception = ((string)(inValues[4])); 785 784 return this.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState); 786 785 } … … 799 798 } 800 799 801 public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception) {800 public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception) { 802 801 this.ProcessSnapshotAsync(clientId, jobId, result, percentage, exception, null); 803 802 } 804 803 805 public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, System.Exceptionexception, object userState) {804 public void ProcessSnapshotAsync(System.Guid clientId, System.Guid jobId, byte[] result, double percentage, string exception, object userState) { 806 805 if ((this.onBeginProcessSnapshotDelegate == null)) { 807 806 this.onBeginProcessSnapshotDelegate = new BeginOperationDelegate(this.OnBeginProcessSnapshot); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/System1.xsd
r4107 r4170 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/System" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/System" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 2 <xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/System" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/System" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 4 3 <xs:complexType name="Version"> 5 4 <xs:sequence> … … 11 10 </xs:complexType> 12 11 <xs:element name="Version" nillable="true" type="tns:Version" /> 13 <xs:complexType name="Exception">14 <xs:sequence>15 <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##local" processContents="skip" />16 </xs:sequence>17 <xs:attribute ref="ser:FactoryType" />18 </xs:complexType>19 <xs:element name="Exception" nillable="true" type="tns:Exception" />20 12 </xs:schema> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/Service References/ServerService/service2.xsd
r3203 r4170 4 4 <xs:import namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" /> 5 5 <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 6 <xs:import namespace="http://schemas.datacontract.org/2004/07/System" />7 6 <xs:import namespace="http://schemas.microsoft.com/Message" /> 8 7 <xs:element name="Login"> … … 55 54 <xs:element minOccurs="0" name="result" nillable="true" type="xs:base64Binary" /> 56 55 <xs:element minOccurs="0" name="percentage" type="xs:double" /> 57 <xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="exception" nillable="true" type="q9:Exception" />56 <xs:element minOccurs="0" name="exception" nillable="true" type="xs:string" /> 58 57 </xs:sequence> 59 58 </xs:complexType> … … 62 61 <xs:complexType> 63 62 <xs:sequence> 64 <xs:element xmlns:q 10="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="StoreFinishedJobResultResult" nillable="true" type="q10:ResponseResultReceived" />63 <xs:element xmlns:q9="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="StoreFinishedJobResultResult" nillable="true" type="q9:ResponseResultReceived" /> 65 64 </xs:sequence> 66 65 </xs:complexType> … … 69 68 <xs:complexType> 70 69 <xs:sequence> 71 <xs:element xmlns:q1 1="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q11:guid" />72 <xs:element xmlns:q1 2="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="jobId" type="q12:guid" />70 <xs:element xmlns:q10="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q10:guid" /> 71 <xs:element xmlns:q11="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="jobId" type="q11:guid" /> 73 72 <xs:element minOccurs="0" name="result" nillable="true" type="xs:base64Binary" /> 74 73 <xs:element minOccurs="0" name="percentage" type="xs:double" /> 75 <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/System" minOccurs="0" name="exception" nillable="true" type="q13:Exception" />74 <xs:element minOccurs="0" name="exception" nillable="true" type="xs:string" /> 76 75 </xs:sequence> 77 76 </xs:complexType> … … 80 79 <xs:complexType> 81 80 <xs:sequence> 82 <xs:element xmlns:q1 4="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessSnapshotResult" nillable="true" type="q14:ResponseResultReceived" />81 <xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessSnapshotResult" nillable="true" type="q12:ResponseResultReceived" /> 83 82 </xs:sequence> 84 83 </xs:complexType> … … 87 86 <xs:complexType> 88 87 <xs:sequence> 89 <xs:element xmlns:q1 5="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q15:guid" />88 <xs:element xmlns:q13="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q13:guid" /> 90 89 </xs:sequence> 91 90 </xs:complexType> … … 94 93 <xs:complexType> 95 94 <xs:sequence> 96 <xs:element xmlns:q1 6="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="LogoutResult" nillable="true" type="q16:Response" />95 <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="LogoutResult" nillable="true" type="q14:Response" /> 97 96 </xs:sequence> 98 97 </xs:complexType> … … 101 100 <xs:complexType> 102 101 <xs:sequence> 103 <xs:element xmlns:q1 7="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="jobId" type="q17:guid" />102 <xs:element xmlns:q15="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="jobId" type="q15:guid" /> 104 103 </xs:sequence> 105 104 </xs:complexType> … … 108 107 <xs:complexType> 109 108 <xs:sequence> 110 <xs:element xmlns:q1 8="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="IsJobStillNeededResult" nillable="true" type="q18:Response" />109 <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="IsJobStillNeededResult" nillable="true" type="q16:Response" /> 111 110 </xs:sequence> 112 111 </xs:complexType> … … 115 114 <xs:complexType> 116 115 <xs:sequence> 117 <xs:element xmlns:q1 9="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="pluginList" nillable="true" type="q19:ArrayOfHivePluginInfoDto" />116 <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="pluginList" nillable="true" type="q17:ArrayOfHivePluginInfoDto" /> 118 117 </xs:sequence> 119 118 </xs:complexType> … … 122 121 <xs:complexType> 123 122 <xs:sequence> 124 <xs:element xmlns:q 20="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="SendPluginsResult" nillable="true" type="q20:ResponsePlugin" />123 <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="SendPluginsResult" nillable="true" type="q18:ResponsePlugin" /> 125 124 </xs:sequence> 126 125 </xs:complexType> … … 129 128 <xs:complexType> 130 129 <xs:sequence> 130 <xs:element xmlns:q19="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q19:guid" /> 131 </xs:sequence> 132 </xs:complexType> 133 </xs:element> 134 <xs:element name="GetCalendarResponse"> 135 <xs:complexType> 136 <xs:sequence> 137 <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="GetCalendarResult" nillable="true" type="q20:ResponseCalendar" /> 138 </xs:sequence> 139 </xs:complexType> 140 </xs:element> 141 <xs:element name="SetCalendarStatus"> 142 <xs:complexType> 143 <xs:sequence> 131 144 <xs:element xmlns:q21="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q21:guid" /> 132 </xs:sequence> 133 </xs:complexType> 134 </xs:element> 135 <xs:element name="GetCalendarResponse"> 136 <xs:complexType> 137 <xs:sequence> 138 <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="GetCalendarResult" nillable="true" type="q22:ResponseCalendar" /> 139 </xs:sequence> 140 </xs:complexType> 141 </xs:element> 142 <xs:element name="SetCalendarStatus"> 143 <xs:complexType> 144 <xs:sequence> 145 <xs:element xmlns:q23="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q23:guid" /> 146 <xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="state" type="q24:CalendarState" /> 145 <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="state" type="q22:CalendarState" /> 147 146 </xs:sequence> 148 147 </xs:complexType> … … 151 150 <xs:complexType> 152 151 <xs:sequence> 153 <xs:element xmlns:q2 5="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="SetCalendarStatusResult" nillable="true" type="q25:Response" />152 <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="SetCalendarStatusResult" nillable="true" type="q23:Response" /> 154 153 </xs:sequence> 155 154 </xs:complexType> … … 158 157 <xs:complexType> 159 158 <xs:sequence> 160 <xs:element xmlns:q2 6="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q26:guid" />159 <xs:element xmlns:q24="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="clientId" type="q24:guid" /> 161 160 </xs:sequence> 162 161 </xs:complexType> … … 165 164 <xs:complexType> 166 165 <xs:sequence> 167 <xs:element xmlns:q2 7="http://schemas.microsoft.com/Message" name="SendStreamedJobResult" type="q27:StreamBody" />166 <xs:element xmlns:q25="http://schemas.microsoft.com/Message" name="SendStreamedJobResult" type="q25:StreamBody" /> 168 167 </xs:sequence> 169 168 </xs:complexType> … … 172 171 <xs:complexType> 173 172 <xs:sequence> 174 <xs:element xmlns:q2 8="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="pluginList" nillable="true" type="q28:ArrayOfHivePluginInfoDto" />173 <xs:element xmlns:q26="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts.BusinessObjects" minOccurs="0" name="pluginList" nillable="true" type="q26:ArrayOfHivePluginInfoDto" /> 175 174 </xs:sequence> 176 175 </xs:complexType> … … 179 178 <xs:complexType> 180 179 <xs:sequence> 181 <xs:element xmlns:q2 9="http://schemas.microsoft.com/Message" name="SendStreamedPluginsResult" type="q29:StreamBody" />180 <xs:element xmlns:q27="http://schemas.microsoft.com/Message" name="SendStreamedPluginsResult" type="q27:StreamBody" /> 182 181 </xs:sequence> 183 182 </xs:complexType> … … 186 185 <xs:complexType> 187 186 <xs:sequence> 187 <xs:element xmlns:q28="http://schemas.microsoft.com/Message" name="stream" type="q28:StreamBody" /> 188 </xs:sequence> 189 </xs:complexType> 190 </xs:element> 191 <xs:element name="StoreFinishedJobResultStreamedResponse"> 192 <xs:complexType> 193 <xs:sequence> 194 <xs:element xmlns:q29="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="StoreFinishedJobResultStreamedResult" nillable="true" type="q29:ResponseResultReceived" /> 195 </xs:sequence> 196 </xs:complexType> 197 </xs:element> 198 <xs:element name="ProcessSnapshotStreamed"> 199 <xs:complexType> 200 <xs:sequence> 188 201 <xs:element xmlns:q30="http://schemas.microsoft.com/Message" name="stream" type="q30:StreamBody" /> 189 202 </xs:sequence> 190 203 </xs:complexType> 191 204 </xs:element> 192 <xs:element name="StoreFinishedJobResultStreamedResponse">193 <xs:complexType>194 <xs:sequence>195 <xs:element xmlns:q31="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="StoreFinishedJobResultStreamedResult" nillable="true" type="q31:ResponseResultReceived" />196 </xs:sequence>197 </xs:complexType>198 </xs:element>199 <xs:element name="ProcessSnapshotStreamed">200 <xs:complexType>201 <xs:sequence>202 <xs:element xmlns:q32="http://schemas.microsoft.com/Message" name="stream" type="q32:StreamBody" />203 </xs:sequence>204 </xs:complexType>205 </xs:element>206 205 <xs:element name="ProcessSnapshotStreamedResponse"> 207 206 <xs:complexType> 208 207 <xs:sequence> 209 <xs:element xmlns:q3 3="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessSnapshotStreamedResult" nillable="true" type="q33:ResponseResultReceived" />208 <xs:element xmlns:q31="http://schemas.datacontract.org/2004/07/HeuristicLab.Hive.Contracts" minOccurs="0" name="ProcessSnapshotStreamedResult" nillable="true" type="q31:ResponseResultReceived" /> 210 209 </xs:sequence> 211 210 </xs:complexType> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/WcfService.cs
r4119 r4170 292 292 public void ProcessSnapshotAsync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception, bool finished) { 293 293 if (ConnState == NetworkEnum.WcfConnState.Loggedin) { 294 Stream stream = GetStreamedJobResult( 295 clientId, jobId, result, percentage, exception); 296 294 Stream stream = GetStreamedJobResult(clientId, jobId, result, percentage, exception); 297 295 proxy.ProcessSnapshotStreamedAsync(stream, stream); 298 296 } … … 353 351 jobResult.JobId = jobId; 354 352 jobResult.Percentage = percentage; 355 jobResult.Exception = exception ;353 jobResult.Exception = exception != null ? exception.Message : ""; 356 354 357 355 MultiStream stream = new MultiStream(); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs
r4141 r4170 61 61 Job.JobStopped += new EventHandler(Job_JobStopped); 62 62 Job.JobFailed += new EventHandler(Job_JobFailed); 63 Job.Prepare(); 63 64 Job.Start(); 64 65 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs
r4141 r4170 60 60 [StorableHook(HookType.AfterDeserialization)] 61 61 private void AfterDeserialization() { 62 int[] parts = this.storableVersion.Split('.').Select(s => int.Parse(s)).ToArray(); 63 this.Version = new Version(parts[0], parts[1], parts[2], parts[3]); 62 this.Version = new Version(storableVersion); 64 63 } 65 64 … … 71 70 return clone; 72 71 } 72 73 73 } 74 74 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs
r4133 r4170 41 41 [Storable] 42 42 [DataMember] 43 public double Percentage { get; set; }44 [Storable]45 [DataMember]46 public DateTime Timestamp { get; set; }47 [Storable]48 [DataMember]49 43 public Guid ClientId { get; set; } 50 44 [Storable] 51 45 [DataMember] 52 public Exception Exception{ get; set; }46 public State State { get; set; } 53 47 [Storable] 54 48 [DataMember] 55 public DateTime DateFinished { get; set; } 49 public double? Percentage { get; set; } 50 [Storable] 51 [DataMember] 52 public String Exception { get; set; } 53 [Storable] 54 [DataMember] 55 public DateTime? DateCalculated { get; set; } 56 [Storable] 57 [DataMember] 58 public DateTime? DateFinished { get; set; } 56 59 57 60 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 58 61 JobResult clone = (JobResult) base.Clone(cloner); 59 62 clone.ClientId = this.ClientId; 63 clone.DateCalculated = this.DateCalculated; 60 64 clone.DateFinished = this.DateFinished; 61 throw new NotImplementedException("Exception kann nicht serialisiert werden, deshalb irgendwie wrappen... oder nur message (+stacktrace, ...?) speichern");62 65 clone.Exception = this.Exception; 63 66 clone.JobId = this.JobId; 64 67 clone.Percentage = this.Percentage; 65 clone. Timestamp = this.Timestamp;68 clone.State = this.State; 66 69 return clone; 67 70 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
r4133 r4170 120 120 <Compile Include="BusinessObjects\ClientGroupDto.cs" /> 121 121 <Compile Include="BusinessObjects\HivePluginFile.cs" /> 122 <Compile Include="BusinessObjects\JobResultList.cs" /> 122 123 <Compile Include="BusinessObjects\ResourceDto.cs" /> 123 124 <Compile Include="BusinessObjects\SerializedJob.cs" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientCommunicator.cs
r3203 r4170 47 47 byte[] result, 48 48 double percentage, 49 Exceptionexception);49 string exception); 50 50 [OperationContract] 51 51 ResponseResultReceived ProcessSnapshot(Guid clientId, … … 53 53 byte[] result, 54 54 double percentage, 55 Exceptionexception);55 string exception); 56 56 [OperationContract] 57 57 Response Logout(Guid clientId); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IExecutionEngineFacade.cs
r4121 r4170 42 42 [OperationContract] 43 43 ResponseObject<JobDto> GetJobById(Guid jobId); 44 [OperationContract] 45 ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds); 44 46 } 45 47 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IJobManager.cs
r4121 r4170 50 50 ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot); 51 51 [OperationContract] 52 Response List<JobResult> GetAllJobResults(Guid jobId);52 ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds); 53 53 [OperationContract] 54 54 Response RequestSnapshot(Guid jobId); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs
r4144 r4170 109 109 if (Content.Experiment != null) { 110 110 runCollectionView.Content = Content.Experiment.Runs; 111 Content.Prepare(); 111 if (Content.ExecutionState == ExecutionState.Stopped) { 112 Content.Prepare(); 113 } 112 114 } 113 115 SetEnabledStateOfControls(); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemListView.cs
r4121 r4170 36 36 this.removeButton.Enabled = false; 37 37 } 38 39 protected override void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<JobItem>> e) {40 base.Content_ItemsAdded(sender, e);41 }42 38 } 43 39 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs
r4144 r4170 92 92 this.stateTextBox.Location = new System.Drawing.Point(95, 19); 93 93 this.stateTextBox.Name = "stateTextBox"; 94 this.stateTextBox.Size = new System.Drawing.Size( 432, 20);94 this.stateTextBox.Size = new System.Drawing.Size(509, 20); 95 95 this.stateTextBox.TabIndex = 2; 96 96 // … … 101 101 this.userIdTextBox.Location = new System.Drawing.Point(91, 28); 102 102 this.userIdTextBox.Name = "userIdTextBox"; 103 this.userIdTextBox.Size = new System.Drawing.Size( 448, 20);103 this.userIdTextBox.Size = new System.Drawing.Size(525, 20); 104 104 this.userIdTextBox.TabIndex = 3; 105 105 // … … 117 117 this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 63); 118 118 this.dateCreatedTextBox.Name = "dateCreatedTextBox"; 119 this.dateCreatedTextBox.Size = new System.Drawing.Size( 432, 20);119 this.dateCreatedTextBox.Size = new System.Drawing.Size(509, 20); 120 120 this.dateCreatedTextBox.TabIndex = 5; 121 121 // … … 126 126 this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 107); 127 127 this.dateFinishedTextBox.Name = "dateFinishedTextBox"; 128 this.dateFinishedTextBox.Size = new System.Drawing.Size( 432, 20);128 this.dateFinishedTextBox.Size = new System.Drawing.Size(509, 20); 129 129 this.dateFinishedTextBox.TabIndex = 6; 130 130 // … … 135 135 this.priorityTextBox.Location = new System.Drawing.Point(91, 50); 136 136 this.priorityTextBox.Name = "priorityTextBox"; 137 this.priorityTextBox.Size = new System.Drawing.Size( 448, 20);137 this.priorityTextBox.Size = new System.Drawing.Size(525, 20); 138 138 this.priorityTextBox.TabIndex = 7; 139 139 // … … 144 144 this.coresNeededTextBox.Location = new System.Drawing.Point(91, 72); 145 145 this.coresNeededTextBox.Name = "coresNeededTextBox"; 146 this.coresNeededTextBox.Size = new System.Drawing.Size( 448, 20);146 this.coresNeededTextBox.Size = new System.Drawing.Size(525, 20); 147 147 this.coresNeededTextBox.TabIndex = 8; 148 148 // … … 153 153 this.memoryNeededTextBox.Location = new System.Drawing.Point(91, 94); 154 154 this.memoryNeededTextBox.Name = "memoryNeededTextBox"; 155 this.memoryNeededTextBox.Size = new System.Drawing.Size( 448, 20);155 this.memoryNeededTextBox.Size = new System.Drawing.Size(525, 20); 156 156 this.memoryNeededTextBox.TabIndex = 9; 157 157 // … … 160 160 this.exceptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 161 161 | System.Windows.Forms.AnchorStyles.Right))); 162 this.exceptionTextBox.Location = new System.Drawing.Point(9 1, 116);162 this.exceptionTextBox.Location = new System.Drawing.Point(95, 129); 163 163 this.exceptionTextBox.Name = "exceptionTextBox"; 164 this.exceptionTextBox.Size = new System.Drawing.Size( 448, 20);164 this.exceptionTextBox.Size = new System.Drawing.Size(509, 20); 165 165 this.exceptionTextBox.TabIndex = 10; 166 166 // … … 169 169 this.projectTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 170 170 | System.Windows.Forms.AnchorStyles.Right))); 171 this.projectTextBox.Location = new System.Drawing.Point(91, 1 38);171 this.projectTextBox.Location = new System.Drawing.Point(91, 116); 172 172 this.projectTextBox.Name = "projectTextBox"; 173 this.projectTextBox.Size = new System.Drawing.Size( 448, 20);173 this.projectTextBox.Size = new System.Drawing.Size(525, 20); 174 174 this.projectTextBox.TabIndex = 11; 175 175 // … … 231 231 // 232 232 this.exceptionLabel.AutoSize = true; 233 this.exceptionLabel.Location = new System.Drawing.Point( 3, 116);233 this.exceptionLabel.Location = new System.Drawing.Point(7, 129); 234 234 this.exceptionLabel.Name = "exceptionLabel"; 235 235 this.exceptionLabel.Size = new System.Drawing.Size(57, 13); … … 240 240 // 241 241 this.projectLabel.AutoSize = true; 242 this.projectLabel.Location = new System.Drawing.Point(3, 1 38);242 this.projectLabel.Location = new System.Drawing.Point(3, 116); 243 243 this.projectLabel.Name = "projectLabel"; 244 244 this.projectLabel.Size = new System.Drawing.Size(43, 13); … … 256 256 this.snapshotGroupBox.Controls.Add(this.snapshotTimeLabel); 257 257 this.snapshotGroupBox.Controls.Add(this.snapshotStatusLabel); 258 this.snapshotGroupBox.Location = new System.Drawing.Point(6, 3 04);258 this.snapshotGroupBox.Location = new System.Drawing.Point(6, 310); 259 259 this.snapshotGroupBox.Name = "snapshotGroupBox"; 260 this.snapshotGroupBox.Size = new System.Drawing.Size( 533, 100);260 this.snapshotGroupBox.Size = new System.Drawing.Size(610, 100); 261 261 this.snapshotGroupBox.TabIndex = 21; 262 262 this.snapshotGroupBox.TabStop = false; … … 266 266 // 267 267 this.requestSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 268 this.requestSnapshotButton.Location = new System.Drawing.Point(3 07, 67);268 this.requestSnapshotButton.Location = new System.Drawing.Point(384, 67); 269 269 this.requestSnapshotButton.Name = "requestSnapshotButton"; 270 270 this.requestSnapshotButton.Size = new System.Drawing.Size(107, 26); … … 277 277 // 278 278 this.openSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 279 this.openSnapshotButton.Location = new System.Drawing.Point(4 20, 67);279 this.openSnapshotButton.Location = new System.Drawing.Point(497, 67); 280 280 this.openSnapshotButton.Name = "openSnapshotButton"; 281 281 this.openSnapshotButton.Size = new System.Drawing.Size(107, 26); … … 291 291 this.snapshotTimeText.Location = new System.Drawing.Point(45, 41); 292 292 this.snapshotTimeText.Name = "snapshotTimeText"; 293 this.snapshotTimeText.Size = new System.Drawing.Size( 482, 20);293 this.snapshotTimeText.Size = new System.Drawing.Size(559, 20); 294 294 this.snapshotTimeText.TabIndex = 24; 295 295 // … … 300 300 this.snapshotStatusText.Location = new System.Drawing.Point(45, 19); 301 301 this.snapshotStatusText.Name = "snapshotStatusText"; 302 this.snapshotStatusText.Size = new System.Drawing.Size( 482, 20);302 this.snapshotStatusText.Size = new System.Drawing.Size(559, 20); 303 303 this.snapshotStatusText.TabIndex = 23; 304 304 // … … 327 327 this.dateCalculatedText.Location = new System.Drawing.Point(95, 85); 328 328 this.dateCalculatedText.Name = "dateCalculatedText"; 329 this.dateCalculatedText.Size = new System.Drawing.Size( 432, 20);329 this.dateCalculatedText.Size = new System.Drawing.Size(509, 20); 330 330 this.dateCalculatedText.TabIndex = 22; 331 331 // … … 352 352 this.jobStatusGroupBox.Controls.Add(this.dateCreatedTextBox); 353 353 this.jobStatusGroupBox.Controls.Add(this.percentageLabel); 354 this.jobStatusGroupBox.Controls.Add(this.exceptionLabel); 354 355 this.jobStatusGroupBox.Controls.Add(this.dateCreatedLabel); 355 356 this.jobStatusGroupBox.Controls.Add(this.dateFinishedLabel); 356 this.jobStatusGroupBox.Location = new System.Drawing.Point(6, 164); 357 this.jobStatusGroupBox.Controls.Add(this.exceptionTextBox); 358 this.jobStatusGroupBox.Location = new System.Drawing.Point(6, 142); 357 359 this.jobStatusGroupBox.Name = "jobStatusGroupBox"; 358 this.jobStatusGroupBox.Size = new System.Drawing.Size( 533, 134);360 this.jobStatusGroupBox.Size = new System.Drawing.Size(610, 162); 359 361 this.jobStatusGroupBox.TabIndex = 24; 360 362 this.jobStatusGroupBox.TabStop = false; … … 367 369 this.percentageProgressBar.Location = new System.Drawing.Point(153, 41); 368 370 this.percentageProgressBar.Name = "percentageProgressBar"; 369 this.percentageProgressBar.Size = new System.Drawing.Size( 374, 20);371 this.percentageProgressBar.Size = new System.Drawing.Size(451, 20); 370 372 this.percentageProgressBar.TabIndex = 25; 371 373 // … … 380 382 this.tabControl.Name = "tabControl"; 381 383 this.tabControl.SelectedIndex = 0; 382 this.tabControl.Size = new System.Drawing.Size( 550, 479);384 this.tabControl.Size = new System.Drawing.Size(627, 518); 383 385 this.tabControl.TabIndex = 25; 384 386 // … … 394 396 this.detailsTabPage.Controls.Add(this.projectLabel); 395 397 this.detailsTabPage.Controls.Add(this.coresNeededTextBox); 396 this.detailsTabPage.Controls.Add(this.exceptionLabel);397 398 this.detailsTabPage.Controls.Add(this.memoryNeededTextBox); 398 399 this.detailsTabPage.Controls.Add(this.memoryNeededLabel); 399 this.detailsTabPage.Controls.Add(this.exceptionTextBox);400 400 this.detailsTabPage.Controls.Add(this.coresNeededLabel); 401 401 this.detailsTabPage.Controls.Add(this.projectTextBox); … … 404 404 this.detailsTabPage.Name = "detailsTabPage"; 405 405 this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); 406 this.detailsTabPage.Size = new System.Drawing.Size( 542, 453);406 this.detailsTabPage.Size = new System.Drawing.Size(619, 492); 407 407 this.detailsTabPage.TabIndex = 0; 408 408 this.detailsTabPage.Text = "Details"; … … 424 424 this.jobIdTextBox.Location = new System.Drawing.Point(91, 6); 425 425 this.jobIdTextBox.Name = "jobIdTextBox"; 426 this.jobIdTextBox.Size = new System.Drawing.Size( 448, 20);426 this.jobIdTextBox.Size = new System.Drawing.Size(525, 20); 427 427 this.jobIdTextBox.TabIndex = 26; 428 428 // … … 433 433 this.logTabPage.Name = "logTabPage"; 434 434 this.logTabPage.Padding = new System.Windows.Forms.Padding(3); 435 this.logTabPage.Size = new System.Drawing.Size(54 2, 453);435 this.logTabPage.Size = new System.Drawing.Size(545, 453); 436 436 this.logTabPage.TabIndex = 1; 437 437 this.logTabPage.Text = "Log"; … … 457 457 this.Controls.Add(this.tabControl); 458 458 this.Name = "JobItemView"; 459 this.Size = new System.Drawing.Size( 556, 485);459 this.Size = new System.Drawing.Size(633, 524); 460 460 this.snapshotGroupBox.ResumeLayout(false); 461 461 this.snapshotGroupBox.PerformLayout(); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs
r4145 r4170 36 36 logView.Content = Content.Log; 37 37 Content_JobDtoChanged(this, EventArgs.Empty); 38 Content_JobStateChanged(this, EventArgs.Empty); 38 39 if (Content.LatestSnapshot != null) { 39 40 snapshotStatusText.InvokeIfRequired(c => c.Text = Content.LatestSnapshot.StatusMessage); … … 47 48 Content.LatestSnapshotChanged += new EventHandler(Content_LatestSnapshotChanged); 48 49 Content.JobDtoChanged += new EventHandler(Content_JobDtoChanged); 50 Content.JobStateChanged += new EventHandler(Content_JobStateChanged); 49 51 Content.SnapshotRequestedStateChanged += new EventHandler(Content_SnapshotRequestedStateChanged); 50 52 } … … 53 55 Content.LatestSnapshotChanged -= new EventHandler(Content_LatestSnapshotChanged); 54 56 Content.JobDtoChanged -= new EventHandler(Content_JobDtoChanged); 57 Content.JobStateChanged -= new EventHandler(Content_JobStateChanged); 55 58 Content.SnapshotRequestedStateChanged -= new EventHandler(Content_SnapshotRequestedStateChanged); 56 59 base.DeregisterContentEvents(); 57 60 } 58 61 59 void Content_JobDtoChanged(object sender, EventArgs e) {62 private void Content_JobDtoChanged(object sender, EventArgs e) { 60 63 if (InvokeRequired) { 61 64 Invoke(new EventHandler(Content_JobDtoChanged), sender, e); 62 65 } else { 63 66 this.jobIdTextBox.Text = Content.JobDto.Id.ToString(); 64 this.stateTextBox.Text = Content.JobDto.State.ToString();65 this.userIdTextBox.Text = Content.JobDto.UserId.ToString();66 this.percentageTextBox.Text = (Content.JobDto.Percentage*100).ToString() + "%";67 this.percentageProgressBar.Value = Convert.ToInt32(Content.JobDto.Percentage * percentageProgressBar.Maximum);68 67 this.dateCreatedTextBox.Text = Content.JobDto.DateCreated.ToString(); 69 this.dateCalculatedText.Text = Content.JobDto.DateCalculated.ToString();70 this.dateFinishedTextBox.Text = Content.JobDto.DateFinished.ToString();71 68 this.priorityTextBox.Text = Content.JobDto.Priority.ToString(); 72 69 this.coresNeededTextBox.Text = Content.JobDto.CoresNeeded.ToString(); 73 70 this.memoryNeededTextBox.Text = Content.JobDto.MemoryNeeded.ToString(); 74 this.exceptionTextBox.Text = Content.JobDto.Exception;75 71 this.projectTextBox.Text = Content.JobDto.Project != null ? Content.JobDto.Project.Name : "-"; 72 } 73 } 74 75 private void Content_JobStateChanged(object sender, EventArgs e) { 76 if (InvokeRequired) { 77 Invoke(new EventHandler(Content_JobStateChanged), sender, e); 78 } else { 79 this.stateTextBox.Text = Content.State.ToString(); 80 this.percentageTextBox.Text = (Content.Percentage * 100).ToString() + "%"; 81 this.percentageProgressBar.Value = Convert.ToInt32(Content.Percentage * percentageProgressBar.Maximum); 82 this.dateCalculatedText.Text = Content.DateCalculated.ToString(); 83 this.dateFinishedTextBox.Text = Content.DateFinished.ToString(); 84 this.exceptionTextBox.Text = Content.Exception; 76 85 } 77 86 } … … 95 104 base.SetEnabledStateOfControls(); 96 105 if (Content != null) { 97 openSnapshotButton.Enabled = Content. SnapshotRequestedState == SnapshotRequestedState.Idle;98 requestSnapshotButton.Enabled = Content.SnapshotRequestedState == SnapshotRequestedState. Requested;106 openSnapshotButton.Enabled = Content.LatestSnapshot != null && Content.SnapshotRequestedState == SnapshotRequestedState.Idle; 107 requestSnapshotButton.Enabled = Content.SnapshotRequestedState == SnapshotRequestedState.Idle; 99 108 } 100 109 this.jobIdTextBox.ReadOnly = this.ReadOnly; -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj
r4141 r4170 111 111 </ItemGroup> 112 112 <ItemGroup> 113 <None Include="app.config" /> 113 <None Include="app.config"> 114 <SubType>Designer</SubType> 115 </None> 114 116 <None Include="HeuristicLab.snk" /> 115 117 <None Include="Properties\AssemblyInfo.frame" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
r4145 r4170 41 41 using System.Diagnostics; 42 42 using System.Collections; 43 using System.ServiceModel; 43 44 44 45 namespace HeuristicLab.Hive.Experiment { … … 52 53 private const string itemName = "Hive Experiment"; 53 54 private const string itemDescription = "A runner for a single experiment, which's algorithms are executed in the Hive."; 54 private const int resultPollingIntervalMs = 15000;55 private const int resultPollingIntervalMs = 5000; 55 56 private const int snapshotPollingIntervalMs = 1000; 56 57 private const int maxSnapshotRetries = 20; … … 59 60 private System.Timers.Timer timer; 60 61 private bool pausePending, stopPending; 62 private bool sendingJobsFinished = false; 63 64 // ensure that only 2 threads can fetch jobresults simultaniously 65 private Semaphore fetchJobSemaphore = new Semaphore(2, 2); 61 66 62 67 [Storable] … … 76 81 private bool stopResultsPollingPending = false; 77 82 78 private IDictionary<Guid, Thread> resultPollingThreads;83 private Thread resultPollingThread; 79 84 80 85 /// <summary> … … 145 150 public HiveExperiment(bool deserializing) 146 151 : base(deserializing) { 147 this.resultPollingThreads = new Dictionary<Guid, Thread>();148 jobItems = new JobItemList();149 152 } 150 153 … … 157 160 jobItems = new JobItemList(); 158 161 isPollingResults = false; 159 resultPollingThreads = new Dictionary<Guid, Thread>(); 160 RegisterEvents(); 162 RegisterJobItemListEvents(); 161 163 InitTimer(); 162 164 } … … 181 183 clone.stopPending = this.stopPending; 182 184 clone.pausePending = this.pausePending; 183 clone.jobItems = (JobItemList)cloner.Clone(jobItems);185 clone.jobItems.AddRange((JobItemList)cloner.Clone(jobItems)); 184 186 clone.lastUpdateTime = this.lastUpdateTime; 185 187 clone.isPollingResults = this.isPollingResults; … … 192 194 this.IsPollingResults = false; 193 195 this.stopResultsPollingPending = false; 194 Register Events();196 RegisterJobItemListEvents(); 195 197 LogMessage("I was deserialized."); 196 198 } 197 199 198 200 private void InitTimer() { 199 201 timer = new System.Timers.Timer(100); … … 264 266 lastUpdateTime = DateTime.Now; 265 267 this.ExecutionState = Core.ExecutionState.Started; 268 StartResultPolling(); 269 266 270 Thread t = new Thread(() => { 267 271 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 268 269 pendingOptimizersByJobId = new Dictionary<Guid, IOptimizer>();270 parentOptimizersByPendingOptimizer = GetOptimizers(true);271 IEnumerable<string> groups = ResourceGroups;272 272 273 foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) { 274 SerializedJob serializedJob = CreateSerializedJob(optimizer); 275 ResponseObject<JobDto> response = executionEngineFacade.AddJobWithGroupStrings(serializedJob, groups); 276 pendingOptimizersByJobId.Add(response.Obj.Id, optimizer); 277 278 JobItem jobItem = new JobItem() { 279 JobDto = response.Obj, 280 LatestSnapshot = new ResponseObject<SerializedJob>() { 281 Obj = serializedJob, 282 StatusMessage = "Initial Snapshot", 283 Success = true 284 }, 285 Optimizer = optimizer 286 }; 287 jobItems.Add(jobItem); 288 jobItem.LogMessage("Job sent to Hive"); 289 290 LogMessage("Sent job to Hive (jobId: " + response.Obj.Id + ")"); 291 } 292 293 // start results polling after sending sending the jobs to the server (to avoid race conflicts at the optimizers-collection) 294 StartResultPolling(); 273 try { 274 pendingOptimizersByJobId = new Dictionary<Guid, IOptimizer>(); 275 276 LogMessage("Extracting jobs from Experiment"); 277 parentOptimizersByPendingOptimizer = GetOptimizers(true); 278 LogMessage("Extraction of jobs from Experiment finished"); 279 280 IEnumerable<string> groups = ResourceGroups; 281 282 sendingJobsFinished = false; 283 foreach (IOptimizer optimizer in parentOptimizersByPendingOptimizer.Keys) { 284 SerializedJob serializedJob = CreateSerializedJob(optimizer); 285 ResponseObject<JobDto> response = executionEngineFacade.AddJobWithGroupStrings(serializedJob, groups); 286 pendingOptimizersByJobId.Add(response.Obj.Id, optimizer); 287 288 JobItem jobItem = new JobItem() { 289 JobDto = response.Obj, 290 LatestSnapshot = null, 291 Optimizer = optimizer 292 }; 293 lock (jobItems) { 294 jobItems.Add(jobItem); 295 } 296 LogMessage(jobItem.JobDto.Id, "Job sent to Hive"); 297 } 298 sendingJobsFinished = true; 299 } catch (Exception e) { 300 LogMessage("Error: Starting HiveExperiment failed: " + e.Message); 301 this.ExecutionState = Core.ExecutionState.Stopped; 302 OnStopped(); 303 } 304 295 305 }); 296 306 t.Start(); … … 305 315 } 306 316 307 private void CreateResultPollingThreads() {308 foreach (JobItem jobItem in JobItems) {309 if (!resultPollingThreads.ContainsKey(jobItem.JobDto.Id) && jobItem.JobDto.State != State.Finished) {310 resultPollingThreads.Add(jobItem.JobDto.Id, CreateResultPollingThread(jobItem.JobDto));311 }312 }313 }314 315 317 public void StartResultPolling() { 316 318 this.stopResultsPollingPending = false; 317 319 this.IsPollingResults = true; 318 lock (resultPollingThreads) { 319 CreateResultPollingThreads(); 320 foreach (Thread pollingThread in resultPollingThreads.Values) { 321 if (pollingThread.ThreadState != System.Threading.ThreadState.Running) { 322 pollingThread.Start(); 323 } 324 } 325 } 320 resultPollingThread = CreateResultPollingThread(); 321 if (resultPollingThread.ThreadState != System.Threading.ThreadState.Running) 322 resultPollingThread.Start(); 326 323 } 327 324 328 325 public void StopResultPolling() { 329 326 this.stopResultsPollingPending = true; 330 foreach (Thread pollingThread in resultPollingThreads.Values) { 331 pollingThread.Interrupt(); 332 } 327 resultPollingThread.Interrupt(); 333 328 this.stopResultsPollingPending = false; 334 329 } … … 369 364 HeuristicLab.Optimization.Experiment experiment = optimizer as HeuristicLab.Optimization.Experiment; 370 365 if (this.experiment != experiment) { 371 prepend += "Experiment/"; // don't prepend for top-level optimizers366 prepend += experiment.Name + "/"; // don't prepend for top-level optimizers 372 367 } 373 368 foreach (IOptimizer opt in experiment.Optimizers) { … … 376 371 } else if (optimizer is BatchRun) { 377 372 BatchRun batchRun = optimizer as BatchRun; 378 prepend += "BatchRun/";373 prepend += batchRun.Name + "/"; 379 374 for (int i = 0; i < batchRun.Repetitions; i++) { 380 375 IOptimizer opt = (IOptimizer)batchRun.Algorithm.Clone(); … … 409 404 BatchRun batchRun = (BatchRun)parentOptimizer; 410 405 if (newOptimizer is IAlgorithm) { 411 batchRun.Runs.Add(new Run(newOptimizer.Name, (IAlgorithm)newOptimizer) 406 batchRun.Runs.Add(new Run(newOptimizer.Name, (IAlgorithm)newOptimizer)); 412 407 } else { 413 408 throw new NotSupportedException("Only IAlgorithm types supported"); … … 422 417 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 423 418 Response response = executionEngineFacade.AbortJob(jobId); 424 GetJobItemById(jobId).LogMessage("Aborting Job: " + response.StatusMessage);419 LogMessage(jobId, "Aborting Job: " + response.StatusMessage); 425 420 } 426 421 … … 428 423 429 424 private IExecutionEngineFacade GetExecutionEngineFacade() { 430 return ServiceLocator.CreateExecutionEngineFacade(ServerUrl); 425 IExecutionEngineFacade executionEngineFacade = null; 426 do { 427 try { 428 executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(ServerUrl); 429 } catch (EndpointNotFoundException exception) { 430 LogMessage("Could not connect to Server: " + exception.Message + ". Will try again in " + (resultPollingIntervalMs / 1000) + " sec."); 431 Thread.Sleep(resultPollingIntervalMs); 432 } 433 } while (executionEngineFacade == null && this.ExecutionState != Core.ExecutionState.Stopped); 434 return executionEngineFacade; 431 435 } 432 436 … … 444 448 // find out which which plugins are needed for the given object 445 449 List<HivePluginInfoDto> pluginsNeeded = ( 446 from p in GetDeclaringPlugins( optimizer.GetType())450 from p in GetDeclaringPlugins(job.GetType()) 447 451 select new HivePluginInfoDto() { 448 452 Name = p.Name, … … 466 470 } 467 471 468 private Thread CreateResultPollingThread(JobDto job) { 472 /// <summary> 473 /// Requests a resultList for all jobItems not finished or aborted 474 /// </summary> 475 /// <returns></returns> 476 private Thread CreateResultPollingThread() { 469 477 return new Thread(() => { 470 478 try { 471 GetJobItemById(job.Id).LogMessage("Starting job results polling");472 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();473 IJob restoredObject = null;474 IOptimizer originalOptimizer = pendingOptimizersByJobId[job.Id];475 476 479 do { 477 // loop while 478 // 1. the user doesn't request an abort 479 // 2. there is a problem with server communication (success==false) 480 // 3. no result for the job is available yet (response.Obj==null) 481 // 4. the result that we get from the server is a snapshot and not the final result 482 483 if (stopPending || !this.IsPollingResults) { 484 return; 480 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 481 IEnumerable<Guid> jobIdsToQuery = from job in JobItems 482 where job.State != State.Finished && 483 job.State != State.Failed 484 select job.JobDto.Id; 485 if (jobIdsToQuery.Count() > 0) { 486 LogMessage("Polling results for " + jobIdsToQuery.Count() + " jobs"); 487 try { 488 ResponseObject<JobResultList> response = executionEngineFacade.GetAllJobResults(jobIdsToQuery); 489 if (response.Success) { 490 JobResultList jobItemList = response.Obj; 491 UpdateJobItems(jobItemList); 492 493 LogMessage("Polling successfully finished"); 494 } 495 } catch (Exception e) { 496 LogMessage("Polling results failed: " + e.Message); 497 } 498 Thread.Sleep(resultPollingIntervalMs); 499 } else { 500 if (sendingJobsFinished) { 501 // all the jobs have been sent to hive, but non are to query any more (all finished or failed) 502 this.stopResultsPollingPending = true; 503 } 485 504 } 486 487 ResponseObject<JobDto> response = executionEngineFacade.GetJobById(job.Id); 488 LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")"); 489 GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage); 490 491 UpdateJobItem(response.Obj); 492 493 if (response.Obj.State == State.Abort) { 494 pendingOptimizersByJobId.Remove(job.Id); 495 parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 496 GetJobItemById(job.Id).LogMessage("Job successfully aborted"); 497 return; 498 } 499 500 if (response.Obj.State == State.Failed) { 501 pendingOptimizersByJobId.Remove(job.Id); 502 parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 503 GetJobItemById(job.Id).LogMessage("Job failed with exception: " + response.Obj.Exception); 504 return; 505 } 506 507 if (response.Success && response.Obj != null && response.Obj.State == State.Finished) { 508 ResponseObject<SerializedJob> jobResponse = executionEngineFacade.GetLastSerializedResult(job.Id, false, false); 509 restoredObject = XmlParser.Deserialize<IJob>(new MemoryStream(jobResponse.Obj.SerializedJobData)); 510 UpdateSnapshot(jobResponse); 511 } else { 512 Thread.Sleep(resultPollingIntervalMs); 513 } 514 } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped); 515 516 LogMessage("Job finished (jobId: " + job.Id + ")"); 517 GetJobItemById(job.Id).LogMessage("Job finished"); 518 // job retrieved... replace the existing optimizers with the finished one 519 520 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 521 522 ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer); 523 pendingOptimizersByJobId.Remove(job.Id); 524 parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 525 505 } while (!this.stopResultsPollingPending); 526 506 } catch (ThreadInterruptedException exception) { 527 507 // thread has been interuppted 528 508 } finally { 529 GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped"); 530 lock (resultPollingThreads) { 531 resultPollingThreads.Remove(job.Id); 532 if (resultPollingThreads.Count == 0) { 533 IsPollingResults = false; 534 } 509 this.IsPollingResults = false; 510 } 511 }); 512 } 513 514 /// <summary> 515 /// Updates all JobItems with the results 516 /// </summary> 517 /// <param name="jobResultList"></param> 518 private void UpdateJobItems(JobResultList jobResultList) { 519 // use a Dict to avoid quadratic runtime complexity 520 IDictionary<Guid, JobResult> jobResultDict = jobResultList.ToDictionary(job => job.JobId); 521 lock (jobItems) { 522 foreach (JobItem jobItem in JobItems) { 523 if (jobResultDict.ContainsKey(jobItem.JobDto.Id)) { 524 jobItem.JobResult = jobResultDict[jobItem.JobDto.Id]; 535 525 } 536 537 // check if finished 538 if (pendingOptimizersByJobId.Count == 0) { 539 this.ExecutionState = Core.ExecutionState.Stopped; 540 OnStopped(); 541 } 526 } 527 } 528 } 529 530 void JobItem_JobStateChanged(object sender, EventArgs e) { 531 JobItem jobItem = (JobItem)sender; 532 Thread t = new Thread(() => { 533 if (jobItem.State == State.Finished) { 534 FetchAndUpdateJob(jobItem.JobDto.Id); 535 DisposeOptimizerMappings(jobItem.JobDto.Id); 536 } else if (jobItem.State == State.Failed) { 537 DisposeOptimizerMappings(jobItem.JobDto.Id); 538 } 539 540 if (NoMorePendingOptimizers()) { 541 StopResultPolling(); 542 this.ExecutionState = Core.ExecutionState.Stopped; 543 OnStopped(); 542 544 } 543 545 }); 544 } 546 t.Start(); 547 } 548 549 private bool NoMorePendingOptimizers() { 550 return pendingOptimizersByJobId.Count == 0; 551 } 552 553 /// <summary> 554 /// Removes optimizers from 555 /// - parentOptimizersByPendingOptimizer 556 /// - pendingOptimizersByJobId 557 /// </summary> 558 /// <param name="jobId"></param> 559 private void DisposeOptimizerMappings(Guid jobId) { 560 parentOptimizersByPendingOptimizer.Remove(pendingOptimizersByJobId[jobId]); 561 pendingOptimizersByJobId.Remove(jobId); 562 } 563 564 /// <summary> 565 /// Fetches the finished job from the server and updates the jobItem 566 /// </summary> 567 private void FetchAndUpdateJob(Guid jobId) { 568 LogMessage(jobId, "FetchAndUpdateJob started"); 569 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 570 IOptimizer originalOptimizer = pendingOptimizersByJobId[jobId]; 571 572 fetchJobSemaphore.WaitOne(); 573 ResponseObject<SerializedJob> jobResponse = executionEngineFacade.GetLastSerializedResult(jobId, false, false); 574 UpdateSnapshot(jobResponse); 575 576 IJob restoredObject = XmlParser.Deserialize<IJob>(new MemoryStream(jobResponse.Obj.SerializedJobData)); 577 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 578 579 ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer); 580 fetchJobSemaphore.Release(); 581 LogMessage(jobId, "FetchAndUpdateJob ended"); 582 } 583 584 //// ensure that not all resultPollingThreads can access the server simultaniously 585 //private Semaphore resultPollingSemaphore = new Semaphore(5, 5); 586 587 //private Thread CreateResultPollingThread(JobDto job) { 588 // return new Thread(() => { 589 // try { 590 // GetJobItemById(job.Id).LogMessage("Starting job results polling"); 591 // IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 592 // IJob restoredObject = null; 593 // IOptimizer originalOptimizer = pendingOptimizersByJobId[job.Id]; 594 595 // do { 596 // // loop while 597 // // 1. the user doesn't request an abort 598 // // 2. there is a problem with server communication (success==false) 599 // // 3. no result for the job is available yet (response.Obj==null) 600 // // 4. the result that we get from the server is a snapshot and not the final result 601 // try { 602 // resultPollingSemaphore.WaitOne(); 603 // if (stopPending || !this.IsPollingResults) { 604 // return; 605 // } 606 607 // ResponseObject<JobDto> response = null; 608 // try { 609 // response = executionEngineFacade.GetJobById(job.Id); 610 // LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")"); 611 // GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage); 612 613 // UpdateJobItem(response.Obj); 614 615 // if (response.Obj.State == State.Abort) { 616 // pendingOptimizersByJobId.Remove(job.Id); 617 // parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 618 // GetJobItemById(job.Id).LogMessage("Job successfully aborted"); 619 // return; 620 // } 621 622 // if (response.Obj.State == State.Failed) { 623 // pendingOptimizersByJobId.Remove(job.Id); 624 // parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 625 // GetJobItemById(job.Id).LogMessage("Job failed with exception: " + response.Obj.Exception); 626 // return; 627 // } 628 // } catch (Exception e) { 629 // LogMessage("Error: Result polling failed for job (" + job.Id + "): " + e.Message); 630 // GetJobItemById(job.Id).LogMessage("Error: Result polling failed: " + e.Message); 631 // } 632 633 // if (response != null && response.Success && response.Obj != null && response.Obj.State == State.Finished) { 634 // try { 635 // ResponseObject<SerializedJob> jobResponse = executionEngineFacade.GetLastSerializedResult(job.Id, false, false); 636 // restoredObject = XmlParser.Deserialize<IJob>(new MemoryStream(jobResponse.Obj.SerializedJobData)); 637 // UpdateSnapshot(jobResponse); 638 // } catch (Exception e) { 639 // LogMessage("Error: Retrieving final result failed for job (" + job.Id + "): " + e.Message); 640 // GetJobItemById(job.Id).LogMessage("Error: Retrieving final result failed: " + e.Message); 641 // } 642 // } else { 643 // Thread.Sleep(resultPollingIntervalMs); 644 // } 645 // } finally { 646 // // use finally to always release the semaphore lock 647 // resultPollingSemaphore.Release(); 648 // } 649 // } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped); 650 651 // LogMessage("Job finished (jobId: " + job.Id + ")"); 652 // GetJobItemById(job.Id).LogMessage("Job finished"); 653 // // job retrieved... replace the existing optimizers with the finished one 654 655 // IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 656 657 // ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer); 658 // pendingOptimizersByJobId.Remove(job.Id); 659 // parentOptimizersByPendingOptimizer.Remove(originalOptimizer); 660 661 // } catch (ThreadInterruptedException exception) { 662 663 // } finally { 664 // GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped"); 665 // //lock (resultPollingThreads) { 666 // // resultPollingThreads.Remove(job.Id); 667 // // if (resultPollingThreads.Count == 0) { 668 // // IsPollingResults = false; 669 // // } 670 // //} 671 672 // // check if finished 673 // if (pendingOptimizersByJobId.Count == 0) { 674 // this.ExecutionState = Core.ExecutionState.Stopped; 675 // OnStopped(); 676 // } 677 // } 678 // }); 679 //} 545 680 546 681 private void UpdateJobItem(JobDto jobDto) { … … 559 694 log.LogMessage(message); 560 695 } 696 } 697 698 private void LogMessage(Guid jobId, string message) { 699 GetJobItemById(jobId).LogMessage(message); 700 LogMessage(message + " (jobId: " + jobId + ")"); 561 701 } 562 702 … … 598 738 } 599 739 if (response.Success) { 600 GetJobItemById(jobId).LogMessage("Snapshot polling successfull for job " + jobId);740 LogMessage(jobId, "Snapshot polling successfull for job " + jobId); 601 741 GetJobItemById(jobId).LatestSnapshot = response; 602 742 } else { 603 GetJobItemById(jobId).LogMessage("Error: Polling of Snapshot failed for job " + jobId + ": " + response.StatusMessage);743 LogMessage(jobId, "Error: Polling of Snapshot failed for job " + jobId + ": " + response.StatusMessage); 604 744 } 605 745 } … … 770 910 } 771 911 772 private void Register Events() {912 private void RegisterJobItemListEvents() { 773 913 jobItems.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_CollectionReset); 774 914 jobItems.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsAdded); … … 777 917 } 778 918 779 private void DeregisterEvents() { 780 jobItems.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_CollectionReset); 781 jobItems.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsAdded); 782 jobItems.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsRemoved); 783 jobItems.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsReplaced); 784 } 785 919 private void DeregisterJobItemListEvents() { 920 jobItems.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_CollectionReset); 921 jobItems.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsAdded); 922 jobItems.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsRemoved); 923 jobItems.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<JobItem>>(jobItems_ItemsReplaced); 924 } 786 925 787 926 void jobItems_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 788 UpdateSnapshotRequestedEvents(e); 789 } 790 791 private void UpdateSnapshotRequestedEvents(CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 792 foreach (var item in e.OldItems) { 793 item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged); 794 } 795 foreach (var item in e.Items) { 796 item.Value.SnapshotRequestedStateChanged += new EventHandler(JobItem_SnapshotRequestedStateChanged); 927 UpdateJobItemEvents(e); 928 } 929 930 private void UpdateJobItemEvents(CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 931 if (e.OldItems != null) { 932 foreach (var item in e.OldItems) { 933 item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged); 934 item.Value.JobStateChanged -= new EventHandler(JobItem_JobStateChanged); 935 } 936 } 937 if (e.Items != null) { 938 foreach (var item in e.Items) { 939 item.Value.JobStateChanged += new EventHandler(JobItem_JobStateChanged); 940 item.Value.SnapshotRequestedStateChanged += new EventHandler(JobItem_SnapshotRequestedStateChanged); 941 } 797 942 } 798 943 } 799 944 800 945 void jobItems_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 801 Update SnapshotRequestedEvents(e);946 UpdateJobItemEvents(e); 802 947 } 803 948 804 949 void jobItems_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 805 Update SnapshotRequestedEvents(e);950 UpdateJobItemEvents(e); 806 951 } 807 952 808 953 void jobItems_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<JobItem>> e) { 809 954 foreach (var item in e.OldItems) { 955 item.Value.JobStateChanged -= new EventHandler(JobItem_JobStateChanged); 810 956 item.Value.SnapshotRequestedStateChanged -= new EventHandler(JobItem_SnapshotRequestedStateChanged); 811 957 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs
r4145 r4170 21 21 public override Image ItemImage { 22 22 get { 23 if ( jobDto.State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;24 else if ( jobDto.State == State.Idle) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;25 else if ( jobDto.State == State.Calculating) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;26 else if ( jobDto.State == State.Abort) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;27 else if ( jobDto.State == State.Failed) return HeuristicLab.Common.Resources.VS2008ImageLibrary.Error;28 else if ( jobDto.State == State.Finished) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;23 if (State == State.Offline) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared; 24 else if (State == State.Idle) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared; 25 else if (State == State.Calculating) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted; 26 else if (State == State.Abort) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped; 27 else if (State == State.Failed) return HeuristicLab.Common.Resources.VS2008ImageLibrary.Error; 28 else if (State == State.Finished) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped; 29 29 else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event; 30 30 } … … 33 33 [Storable] 34 34 private JobDto jobDto; 35 /// <summary> 36 /// Some static information about the job. Don't use State-Information out of there 37 /// </summary> 35 38 public JobDto JobDto { 36 39 get { return jobDto; } … … 46 49 47 50 [Storable] 51 private JobResult jobResult; 52 public JobResult JobResult { 53 private get { return jobResult; } 54 set { 55 if (jobResult != value) { 56 jobResult = value; 57 OnJobStateChanged(); 58 OnToStringChanged(); 59 OnItemImageChanged(); 60 } 61 } 62 } 63 64 public State State { 65 get { return jobResult != null ? JobResult.State : JobDto.State; } 66 } 67 68 public double? Percentage { 69 get { return jobResult != null ? JobResult.Percentage : JobDto.Percentage; } 70 } 71 72 public string Exception { 73 get { return jobResult != null ? JobResult.Exception : JobDto.Exception; } 74 } 75 76 public DateTime? DateCalculated { 77 get { return jobResult != null ? JobResult.DateCalculated : JobDto.DateCalculated; } 78 } 79 80 public DateTime? DateFinished { 81 get { return jobResult != null ? JobResult.DateFinished : JobDto.DateFinished; } 82 } 83 84 [Storable] 48 85 private ResponseObject<SerializedJob> latestSnapshot; 49 86 public ResponseObject<SerializedJob> LatestSnapshot { … … 52 89 if (latestSnapshot != value) { 53 90 latestSnapshot = value; 54 latestSnapshotTime = DateTime.Now; 91 if (value != null) { 92 latestSnapshotTime = DateTime.Now; 93 } 55 94 SnapshotRequestedState = Experiment.SnapshotRequestedState.Idle; 56 95 OnLatestSnapshotChanged(); … … 114 153 } 115 154 155 public event EventHandler JobStateChanged; 156 private void OnJobStateChanged() { 157 LogMessage("JobStateChanged"); 158 EventHandler handler = JobStateChanged; 159 if (handler != null) handler(this, EventArgs.Empty); 160 } 161 116 162 public void LogMessage(string message) { 117 163 lock (locker) { … … 128 174 clone.log = (ILog)cloner.Clone(this.log); 129 175 clone.optimizer = (IOptimizer)cloner.Clone(this.optimizer); 176 clone.jobResult = (JobResult)cloner.Clone(this.jobResult); 130 177 return clone; 131 178 } … … 142 189 } 143 190 191 144 192 } 145 193 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/OptimizerJob.cs
r4120 r4170 57 57 } 58 58 59 // [chn] needed? 60 public void Prepare(Core.IOperation initialOperation) { 61 throw new NotImplementedException(); 59 public void Prepare() { 60 optimizer.Prepare(); 62 61 } 63 62 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/app.config
r4116 r4170 9 9 <HeuristicLab.Hive.Experiment.Properties.Settings> 10 10 <setting name="HiveServerUrl" serializeAs="String"> 11 <value>net.tcp://10. 42.1.153:9000/ExecutionEngine/ExecutionEngineFacade</value>11 <value>net.tcp://10.20.71.22:9000/ExecutionEngine/ExecutionEngineFacade</value> 12 12 </setting> 13 13 <setting name="ResourceIds" serializeAs="String"> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.JobBase/3.3/Interfaces/IJob.cs
r4119 r4170 10 10 11 11 void Run(); 12 void Prepare( IOperation initialOperation);12 void Prepare(); 13 13 void Start(); 14 14 void Stop(); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 HeuristicLab.Hive.Server.Core-3.3.csproj.user
-
- Property svn:ignore
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
r4141 r4170 469 469 //tx = session.BeginTransaction(); 470 470 471 ResponseResultReceived response = 472 ProcessJobResult( 473 result.ClientId, 474 result.JobId, 475 new byte[] { }, 476 result.Percentage, 477 result.Exception, 478 finished); 471 ResponseResultReceived response = ProcessJobResult(result.ClientId, result.JobId, new byte[] { }, result.Percentage, result.Exception, finished); 479 472 480 473 if (response.Success) { … … 509 502 Guid jobId, 510 503 byte[] result, 511 double percentage,512 Exceptionexception,504 double? percentage, 505 string exception, 513 506 bool finished) { 514 507 … … 522 515 if (job != null) { 523 516 job.JobInfo = DaoLocator.JobDao.FindById(jobId); 524 job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId); 525 } 526 527 if (job == null && job.JobInfo != null) { 517 if (job.JobInfo != null) { 518 job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId); 519 } 520 } 521 522 if (job != null && job.JobInfo == null) { 528 523 response.Success = false; 529 524 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOB_WITH_THIS_ID; … … 591 586 job.JobInfo.Percentage = percentage; 592 587 593 if ( exception != null) {588 if (!string.IsNullOrEmpty(exception)) { 594 589 job.JobInfo.State = State.Failed; 595 job.JobInfo.Exception = exception .ToString();590 job.JobInfo.Exception = exception; 596 591 job.JobInfo.DateFinished = DateTime.Now; 597 592 } else if (finished) { … … 629 624 byte[] result, 630 625 double percentage, 631 Exceptionexception) {626 string exception) { 632 627 633 628 return ProcessJobResult(clientId, jobId, result, percentage, exception, true); 634 629 } 635 630 636 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {631 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 637 632 return ProcessJobResult(clientId, jobId, result, percentage, exception, false); 638 633 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs
r4107 r4170 67 67 } 68 68 69 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {69 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 70 70 using (contextFactory.GetContext()) { 71 71 return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); … … 89 89 } 90 90 91 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {91 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 92 92 using (contextFactory.GetContext()) { 93 93 return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
r4137 r4170 75 75 } 76 76 } 77 78 79 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 80 using (contextFactory.GetContext(false)) { 81 return jobManager.GetAllJobResults(jobIds); 82 } 83 } 77 84 #endregion 85 86 78 87 } 79 88 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4137 r4170 154 154 } 155 155 156 public Response List<JobResult> GetAllJobResults(Guid jobId) {157 using (contextFactory.GetContext(false)) { 158 secMan.Authorize("AccessJobResults", sessionID, jobId);159 return jobManager.GetAllJobResults(jobId );156 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 157 using (contextFactory.GetContext(false)) { 158 //secMan.Authorize("AccessJobResults", sessionID, jobId); skip authorization 159 return jobManager.GetAllJobResults(jobIds); 160 160 } 161 161 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
r4133 r4170 165 165 </ItemGroup> 166 166 <ItemGroup> 167 <WCFMetadata Include="Service References\" />168 </ItemGroup>169 <ItemGroup>170 167 <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj"> 171 168 <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
r4121 r4170 320 320 } 321 321 322 public ResponseList<JobResult> GetAllJobResults(Guid jobId) { 323 return new ResponseList<JobResult>(); 322 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 323 ResponseObject<JobResultList> response = new ResponseObject<JobResultList>(); 324 JobResultList jobResultList = new JobResultList(); 325 IEnumerable<JobDto> jobs = DaoLocator.JobDao.FindJobsById(jobIds); 326 foreach (JobDto job in jobs) { 327 jobResultList.Add(new JobResult() { 328 JobId = job.Id, 329 State = job.State, 330 DateCalculated = job.DateCalculated, 331 DateFinished = job.DateFinished, 332 Exception = job.Exception, 333 Percentage = job.Percentage 334 }); 335 } 336 response.Obj = jobResultList; 337 response.Success = true; 338 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_ALL_JOBS; 339 return response; 324 340 } 325 341 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj
r4133 r4170 87 87 <ItemGroup> 88 88 <Compile Include="DataAccessException.cs" /> 89 <Compile Include="IClientConfigAdapter.cs" />90 89 <Compile Include="IClientConfigDao.cs" /> 91 90 <Compile Include="IClientDao.cs" /> … … 94 93 <Compile Include="IGenericDao.cs" /> 95 94 <Compile Include="IJobDao.cs" /> 96 <Compile Include="IPluginInfoAdapter.cs" />97 95 <Compile Include="IPluginInfoDao.cs" /> 98 <Compile Include="IProjectAdapter.cs" />99 96 <Compile Include="IUptimeCalendarDao.cs" /> 100 97 <Compile Include="Properties\AssemblyInfo.cs" /> 101 98 <Compile Include="HiveServerDataAccessPlugin.cs" /> 102 <Compile Include="IClientAdapter.cs" />103 <Compile Include="IClientGroupAdapter.cs" />104 <Compile Include="IJobAdapter.cs" />105 <Compile Include="IJobResultsAdapter.cs" />106 <Compile Include="IResourceAdapter.cs" />107 99 </ItemGroup> 108 100 <ItemGroup> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs
r3931 r4170 25 25 26 26 void SetBinaryJobFile(Guid jobId, byte[] data); 27 28 IEnumerable<JobDto> FindJobsById(IEnumerable<Guid> jobIds); 27 29 } 28 30 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs
r4120 r4170 11 11 using HeuristicLab.Tracing; 12 12 using System.Threading; 13 using HeuristicLab.Hive.Server.LINQDataAccess.Properties; 13 14 14 15 … … 67 68 68 69 private static DisposableHiveDataContext CreateContext() { 69 return new DisposableHiveDataContext( "Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=SSPI");70 return new DisposableHiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 70 71 } 71 72 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
r4135 r4170 125 125 </ItemGroup> 126 126 <ItemGroup> 127 <None Include="app.config" /> 127 128 <None Include="HeuristicLab.snk" /> 128 129 <None Include="Properties\AssemblyInfo.frame" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs
r4141 r4170 150 150 } 151 151 152 public IEnumerable<JobDto> FindJobsById(IEnumerable<Guid> jobIds) { 153 IQueryable<JobDto> jobs = from job in Context.Jobs 154 where jobIds.Contains(job.JobId) 155 select EntityToDto(job, null); 156 157 return jobs.ToList(); 158 } 152 159 #endregion 153 160 -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.Designer.cs
r4074 r4170 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 28 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive .Linq;Integrated Security=" +30 " True;MultipleActiveResultSets=True")]29 [global::System.Configuration.DefaultSettingValueAttribute("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;" + 30 "")] 31 31 public string HeuristicLab_Hive_LinqConnectionString { 32 32 get { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/Properties/Settings.settings
r3931 r4170 6 6 <DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?> 7 7 <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 <ConnectionString>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive .Linq;Integrated Security=True;MultipleActiveResultSets=True</ConnectionString>8 <ConnectionString>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;</ConnectionString> 9 9 <ProviderName>System.Data.SqlClient</ProviderName> 10 10 </SerializableConnectionString></DesignTimeValue> 11 <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive .Linq;Integrated Security=True;MultipleActiveResultSets=True</Value>11 <Value Profile="(Default)">Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;</Value> 12 12 </Setting> 13 13 </Settings> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/HeuristicLab.Hive.Server-3.3.csproj
r4121 r4170 170 170 </ItemGroup> 171 171 <ItemGroup> 172 <None Include="app.config">173 <SubType>Designer</SubType>174 </None>175 172 <None Include="Resources\HeuristicLab.ico" /> 176 173 </ItemGroup> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/HeuristicLab.Hive-3.3.csproj
r4136 r4170 73 73 <None Include="HeuristicLab 3.3.exe.config"> 74 74 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 75 <SubType>Designer</SubType> 75 76 </None> 76 77 <None Include="HeuristicLab.snk" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd
r4136 r4170 1 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server \3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"1 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server.LINQDataAccess\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 2 2 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Client.Core\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" 3 3 ConfigMerger "%SolutionDir%HeuristicLab.Hive.Experiment\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config" -
branches/3.3-HiveMigration/tools/prepareHiveDatabase.sql
r4159 r4170 2 2 3 3 /* 4 /* use these DROP commands if you want to run this query a second time on the same db */ 4 use these DROP commands if you want to run this query a second time on the same db */ 5 /* 5 6 ALTER TABLE dbo.AssignedResources ALTER COLUMN AssignedRessourcesId DROP ROWGUIDCOL; 6 7 ALTER TABLE dbo.Job ALTER COLUMN JobId DROP ROWGUIDCOL; … … 25 26 ALTER TABLE dbo.UptimeStatistics DROP CONSTRAINT [DF_UptimeStatistics_UptimeStatisticsId]; 26 27 */ 28 27 29 28 30 ALTER TABLE dbo.AssignedResources ALTER COLUMN AssignedRessourcesId ADD ROWGUIDCOL;
Note: See TracChangeset
for help on using the changeset viewer.