Changeset 5179 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3
- Timestamp:
- 12/29/10 00:52:06 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
r5134 r5179 11 11 <RootNamespace>HeuristicLab.Hive.Server.LINQDataAccess</RootNamespace> 12 12 <AssemblyName>HeuristicLab.Hive.Server.LINQDataAccess-3.3</AssemblyName> 13 <TargetFrameworkVersion>v 3.5</TargetFrameworkVersion>13 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 14 14 <FileAlignment>512</FileAlignment> 15 15 <SignAssembly>true</SignAssembly> -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs
r5037 r5179 1566 1566 private bool _IsAllowedToCalculate; 1567 1567 1568 private System.Nullable<System.DateTime> _LastHeartbeat; 1569 1568 1570 private EntitySet<UptimeStatistic> _UptimeStatistics; 1569 1571 … … 1598 1600 partial void OnIsAllowedToCalculateChanging(bool value); 1599 1601 partial void OnIsAllowedToCalculateChanged(); 1602 partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value); 1603 partial void OnLastHeartbeatChanged(); 1600 1604 #endregion 1601 1605 … … 1828 1832 this.SendPropertyChanged("IsAllowedToCalculate"); 1829 1833 this.OnIsAllowedToCalculateChanged(); 1834 } 1835 } 1836 } 1837 1838 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")] 1839 public System.Nullable<System.DateTime> LastHeartbeat 1840 { 1841 get 1842 { 1843 return this._LastHeartbeat; 1844 } 1845 set 1846 { 1847 if ((this._LastHeartbeat != value)) 1848 { 1849 this.OnLastHeartbeatChanging(value); 1850 this.SendPropertyChanging(); 1851 this._LastHeartbeat = value; 1852 this.SendPropertyChanged("LastHeartbeat"); 1853 this.OnLastHeartbeatChanged(); 1830 1854 } 1831 1855 } … … 1995 2019 1996 2020 private int _MemoryNeeded; 2021 2022 private System.Nullable<System.DateTime> _LastHeartbeat; 1997 2023 1998 2024 private EntitySet<AssignedResource> _AssignedResources; … … 2042 2068 partial void OnMemoryNeededChanging(int value); 2043 2069 partial void OnMemoryNeededChanged(); 2070 partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value); 2071 partial void OnLastHeartbeatChanged(); 2044 2072 #endregion 2045 2073 … … 2363 2391 this.SendPropertyChanged("MemoryNeeded"); 2364 2392 this.OnMemoryNeededChanged(); 2393 } 2394 } 2395 } 2396 2397 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastHeartbeat", DbType="DateTime")] 2398 public System.Nullable<System.DateTime> LastHeartbeat 2399 { 2400 get 2401 { 2402 return this._LastHeartbeat; 2403 } 2404 set 2405 { 2406 if ((this._LastHeartbeat != value)) 2407 { 2408 this.OnLastHeartbeatChanging(value); 2409 this.SendPropertyChanging(); 2410 this._LastHeartbeat = value; 2411 this.SendPropertyChanged("LastHeartbeat"); 2412 this.OnLastHeartbeatChanged(); 2365 2413 } 2366 2414 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.dbml
r5037 r5179 80 80 <Column Name="FreeMemory" Type="System.Int32" DbType="Int" CanBeNull="true" /> 81 81 <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 82 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 82 83 <Association Name="Slave_UptimeStatistic" Member="UptimeStatistics" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeStatistic" /> 83 84 <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="ResourceId" Type="Job" /> … … 106 107 <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 107 108 <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 109 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 108 110 <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" /> 109 111 <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" /> -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.dbml.layout
r5037 r5179 45 45 </nestedChildShapes> 46 46 </classShape> 47 <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="12.375, 2.875, 2, 1.386293945312 5005">47 <classShape Id="706a4581-6daf-4e71-ae2a-87d50b27a051" absoluteBounds="12.375, 2.875, 2, 1.3862939453124996"> 48 48 <DataClassMoniker Name="/HiveDataContext/Resource" /> 49 49 <nestedChildShapes> … … 51 51 </nestedChildShapes> 52 52 </classShape> 53 <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3. 6939111328124987">53 <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="9.25, 4.375, 2, 3.8862125651041666"> 54 54 <DataClassMoniker Name="/HiveDataContext/Job" /> 55 55 <nestedChildShapes> 56 <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 3. 1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />56 <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="9.265, 4.835, 1.9700000000000002, 3.3262125651041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 57 57 </nestedChildShapes> 58 58 </classShape> … … 69 69 </nestedChildShapes> 70 70 </classShape> 71 <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="7.75, 0.75, 2, 2.9247054036458326">71 <classShape Id="26f4edfa-91dd-4941-a058-359f89e567a8" absoluteBounds="7.75, 0.75, 2, 3.1170068359375"> 72 72 <DataClassMoniker Name="/HiveDataContext/Slave" /> 73 73 <nestedChildShapes> 74 <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="7.7650000000000006, 1.21, 1.9700000000000002, 2. 364705403645833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />74 <elementListCompartment Id="1e61f36b-08dc-4df7-8594-c9dcd95c0791" absoluteBounds="7.7650000000000006, 1.21, 1.9700000000000002, 2.5570068359375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 75 75 </nestedChildShapes> 76 76 </classShape> … … 81 81 </nestedChildShapes> 82 82 </classShape> 83 <inheritanceConnector edgePoints="[(12.375 : 3. 27485270182292); (9.75 : 3.27485270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">83 <inheritanceConnector edgePoints="[(12.375 : 3.37100341796875); (9.75 : 3.37100341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 84 84 <nodes> 85 85 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 87 87 </nodes> 88 88 </inheritanceConnector> 89 <inheritanceConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 4.625); (14.1354166666667 : 4.625 : JumpStart); (14.3020833333333 : 4.625 : JumpEnd); (16.375 : 4.625); (16.375 : 5)]" fixedFrom=" NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">89 <inheritanceConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 4.625); (14.1354166666667 : 4.625 : JumpStart); (14.3020833333333 : 4.625 : JumpEnd); (16.375 : 4.625); (16.375 : 5)]" fixedFrom="Algorithm" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 90 90 <nodes> 91 91 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 93 93 </nodes> 94 94 </inheritanceConnector> 95 <associationConnector edgePoints="[(14.21875 : 4.2612939453125); (14.21875 : 8)]" fixedFrom=" NotFixed" fixedTo="NotFixed">95 <associationConnector edgePoints="[(14.21875 : 4.2612939453125); (14.21875 : 8)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 96 96 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 97 97 <nodes> … … 100 100 </nodes> 101 101 </associationConnector> 102 <associationConnector edgePoints="[(11.25 : 7.44314447265625); (1 4.6406275 : 7.44314447265625); (14.6406275 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed">102 <associationConnector edgePoints="[(11.25 : 7.44314447265625); (11.3854166666667 : 7.44314447265625 : JumpStart); (11.5520833333333 : 7.44314447265625 : JumpEnd); (11.6666666666667 : 7.44314447265625 : JumpStart); (11.8333333333333 : 7.44314447265625 : JumpEnd); (12.3854166666667 : 7.44314447265625 : JumpStart); (12.5520833333333 : 7.44314447265625 : JumpEnd); (14.1354166666667 : 7.44314447265625 : JumpStart); (14.3020833333333 : 7.44314447265625 : JumpEnd); (14.6406275 : 7.44314447265625); (14.6406275 : 8)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 103 103 <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" /> 104 104 <nodes> … … 107 107 </nodes> 108 108 </associationConnector> 109 <associationConnector edgePoints="[(8 : 3. 67470540364583); (8 : 8.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">109 <associationConnector edgePoints="[(8 : 3.8670068359375); (8 : 8.375)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 110 110 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_UptimeStatistic" /> 111 111 <nodes> … … 114 114 </nodes> 115 115 </associationConnector> 116 <associationConnector edgePoints="[(16.375 : 5.8093896484375); (16.375 : 13.0681469726563); (1 1.625 : 13.0681469726563)]" fixedFrom="NotFixed" fixedTo="NotFixed">116 <associationConnector edgePoints="[(16.375 : 5.8093896484375); (16.375 : 13.0681469726563); (12.5520833333333 : 13.0681469726563 : JumpStart); (12.3854166666667 : 13.0681469726563 : JumpEnd); (11.625 : 13.0681469726563)]" fixedFrom="NotFixed" fixedTo="Algorithm"> 117 117 <AssociationMoniker Name="/HiveDataContext/SlaveGroup/SlaveGroup_SlaveGroup_Resource" /> 118 118 <nodes> … … 121 121 </nodes> 122 122 </associationConnector> 123 <associationConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 5.25); (11.75 : 5.25); (11.75 : 9); (11.875 : 9); (11.875 : 1 2.6903214863281); (11.625 : 12.6903214863281)]" fixedFrom="NotFixed" fixedTo="NotFixed">123 <associationConnector edgePoints="[(13.265623 : 4.2612939453125); (13.265623 : 5.25); (11.75 : 5.25); (11.75 : 9); (11.875 : 9); (11.875 : 13.0681469726563); (11.625 : 13.0681469726563)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 124 124 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_SlaveGroup_Resource" /> 125 125 <nodes> … … 142 142 </nodes> 143 143 </associationConnector> 144 <associationConnector edgePoints="[(5 : 8.5); (5 : 2. 21235270182292); (7.75 : 2.21235270182292)]" fixedFrom="NotFixed" fixedTo="NotFixed">144 <associationConnector edgePoints="[(5 : 8.5); (5 : 2.30850341796875); (7.75 : 2.30850341796875)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 145 145 <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" /> 146 146 <nodes> … … 149 149 </nodes> 150 150 </associationConnector> 151 <associationConnector edgePoints="[( 10.25 : 8.0689111328125); (10.25 : 8.3189111328125); (10.6930769230769 : 8.3189111328125); (10.6930769230769 : 8.0689111328125)]" fixedFrom="NotFixed" fixedTo="NotFixed">151 <associationConnector edgePoints="[(9.95923076923077 : 8.26121256510417); (9.95923076923077 : 8.51121256510417); (10.5546153846154 : 8.51121256510417); (10.5546153846154 : 8.26121256510417)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 152 152 <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" /> 153 153 <nodes> … … 156 156 </nodes> 157 157 </associationConnector> 158 <associationConnector edgePoints="[(8.40625 : 16.875); (8.40625 : 6. 22195556640625); (9.25 : 6.22195556640625)]" fixedFrom="NotFixed" fixedTo="NotFixed">158 <associationConnector edgePoints="[(8.40625 : 16.875); (8.40625 : 6.31810628255208); (9.25 : 6.31810628255208)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 159 159 <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" /> 160 160 <nodes> … … 163 163 </nodes> 164 164 </associationConnector> 165 <associationConnector edgePoints="[(9.5 : 3. 67470540364583); (9.5 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">165 <associationConnector edgePoints="[(9.5 : 3.8670068359375); (9.5 : 4.375)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 166 166 <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" /> 167 167 <nodes> … … 170 170 </nodes> 171 171 </associationConnector> 172 <associationConnector edgePoints="[(12.375 : 3.99924967447917); (11.46875 : 3.99924967447917); (11.46875 : 9.25)]" fixedFrom=" NotFixed" fixedTo="NotFixed">172 <associationConnector edgePoints="[(12.375 : 3.99924967447917); (11.46875 : 3.99924967447917); (11.46875 : 9.25)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 173 173 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" /> 174 174 <nodes> … … 177 177 </nodes> 178 178 </associationConnector> 179 <associationConnector edgePoints="[(9.40625 : 8. 0689111328125); (9.40625 : 11.8902498372396); (8 : 11.8902498372396)]" fixedFrom="NotFixed" fixedTo="NotFixed">179 <associationConnector edgePoints="[(9.40625 : 8.26121256510417); (9.40625 : 11.8902498372396); (8.48958333333333 : 11.8902498372396 : JumpStart); (8.32291666666667 : 11.8902498372396 : JumpEnd); (8 : 11.8902498372396)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 180 180 <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" /> 181 181 <nodes> -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs
r5093 r5179 27 27 using HeuristicLab.Hive.Contracts.BusinessObjects; 28 28 using HeuristicLab.Hive.Server.DataAccess; 29 using HeuristicLab.Hive.Contracts; 29 30 30 31 namespace HeuristicLab.Hive.Server.LINQDataAccess { … … 233 234 } 234 235 236 public IEnumerable<JobDto> FindTimeoutJobs() { 237 return (from job in Context.Jobs 238 where job.JobState == "Calculating" && 239 (!job.LastHeartbeat.HasValue || 240 job.LastHeartbeat.Value.AddSeconds(ApplicationConstants.JOB_TIME_TO_LIVE_SECONDS) < DateTime.Now) 241 select EntityToDto(job, null)).ToArray(); 242 } 243 235 244 #endregion 236 245 … … 256 265 target.UserId = source.UserId; 257 266 target.ParentJobId = source.ParentJobId; 258 267 target.LastHeartbeat = source.LastHeartbeat; 259 268 260 269 foreach (Guid assignRessourceId in source.AssignedResourceIds) { … … 291 300 target.UserId = source.UserId; 292 301 target.ParentJobId = source.ParentJobId; 293 302 target.LastHeartbeat = source.LastHeartbeat; 303 294 304 target.AssignedResourceIds = source.AssignedResources.Select(x => x.ResourceId).ToList(); 295 305 -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/SlaveDao.cs
r4424 r5179 103 103 target.NumberOfFreeCores = source.NrOfFreeCores; 104 104 target.Status = source.State.ToString(); 105 target.LastHeartbeat = source.LastHeartbeat; 105 106 return target; 106 107 } … … 122 123 target.State = (SlaveState)Enum.Parse(typeof(SlaveState), source.Status, true); 123 124 target.IsAllowedToCalculate = source.IsAllowedToCalculate; 125 target.LastHeartbeat = source.LastHeartbeat; 124 126 return target; 125 127 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config
r4710 r5179 6 6 <add name="HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;" providerName="System.Data.SqlClient"/> 7 7 </connectionStrings> 8 <startup><supportedRuntime version="v 2.0.50727"/></startup></configuration>8 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Note: See TracChangeset
for help on using the changeset viewer.