- Timestamp:
- 09/08/11 13:41:25 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/TaskState.cs
r6717 r6721 24 24 namespace HeuristicLab.Services.Hive.DataAccess { 25 25 [Serializable] 26 public enum JobState {26 public enum TaskState { 27 27 /// <summary> 28 28 /// A job is offline as long as he is not yet submitted to the hive -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
r6717 r6721 107 107 </Compile> 108 108 <Compile Include="ITransactionManager.cs" /> 109 <Compile Include="Enums\ JobState.cs" />109 <Compile Include="Enums\TaskState.cs" /> 110 110 <Compile Include="Logger.cs" /> 111 111 <Compile Include="Enums\Permission.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r6717 r6721 4 4 <Type Name="AssignedResource"> 5 5 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 6 <Column Name=" JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />6 <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 7 7 <Association Name="Resource_AssignedResource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" /> 8 <Association Name=" Job_AssignedResource" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" DeleteRule="CASCADE" />8 <Association Name="Task_AssignedResource" Member="Task" Storage="_Job" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" DeleteRule="CASCADE" /> 9 9 </Type> 10 10 </Table> … … 24 24 <Type Name="RequiredPlugin"> 25 25 <Column Name="RequiredPluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" UpdateCheck="Never" /> 26 <Column Name=" JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />26 <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 27 27 <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 28 28 <Association Name="Plugin_RequiredPlugin" Member="Plugin" Storage="_PluginInfo" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" DeleteRule="CASCADE" /> 29 <Association Name=" Job_RequiredPlugin" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />29 <Association Name="Task_RequiredPlugin" Member="Task" Storage="_Job" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" /> 30 30 </Type> 31 31 </Table> … … 58 58 </Type> 59 59 </Table> 60 <Table Name="dbo. Job" Member="Jobs">61 <Type Name=" Job">62 <Column Name=" JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />63 <Column Name=" JobState" Member="State" Type="global::HeuristicLab.Services.Hive.DataAccess.JobState" DbType="VarChar(30)" CanBeNull="false" />60 <Table Name="dbo.Task" Member="Tasks"> 61 <Type Name="Task"> 62 <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 63 <Column Name="TaskState" Member="State" Type="global::HeuristicLab.Services.Hive.DataAccess.TaskState" DbType="VarChar(30)" CanBeNull="false" /> 64 64 <Column Name="ExecutionTimeMs" Storage="_ExecutionTime" Type="System.Double" DbType="float" CanBeNull="false" /> 65 65 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 66 <Column Name="Parent JobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />66 <Column Name="ParentTaskId" Storage="_ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 67 67 <Column Name="Priority" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 68 68 <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 69 69 <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" /> 70 <Column Name="IsParent Job" Type="System.Boolean" DbType="Bit" CanBeNull="false" />70 <Column Name="IsParentTask" Storage="_IsParentJob" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 71 71 <Column Name="FinishWhenChildJobsFinished" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 72 72 <Column Name="Command" Type="global::HeuristicLab.Services.Hive.DataAccess.Command?" DbType="VarChar(30)" CanBeNull="true" /> 73 73 <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 74 74 <Column Name="IsPrivileged" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 75 <Association Name=" Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource" />76 <Association Name=" Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" />77 <Association Name=" Job_Job" Member="ChildJobs" Storage="_Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job" />78 <Association Name=" Job_JobData" Member="JobData" ThisKey="JobId" OtherKey="JobId" Type="JobData" Cardinality="One" />79 <Association Name=" Job_StateLog" Member="StateLogs" ThisKey="JobId" OtherKey="JobId" Type="StateLog" />80 <Association Name=" Job_Job" Member="ParentJob" Storage="_Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />81 <Association Name="HiveExperiment_ Job" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" />75 <Association Name="Task_AssignedResource" Member="AssignedResources" ThisKey="TaskId" OtherKey="TaskId" Type="AssignedResource" /> 76 <Association Name="Task_RequiredPlugin" Member="RequiredPlugins" ThisKey="TaskId" OtherKey="TaskId" Type="RequiredPlugin" /> 77 <Association Name="Task_Task" Member="ChildJobs" Storage="_Jobs" ThisKey="TaskId" OtherKey="ParentTaskId" Type="Task" /> 78 <Association Name="Task_TaskData" Member="JobData" ThisKey="TaskId" OtherKey="TaskId" Type="TaskData" Cardinality="One" /> 79 <Association Name="Task_StateLog" Member="StateLogs" ThisKey="TaskId" OtherKey="TaskId" Type="StateLog" /> 80 <Association Name="Task_Task" Member="ParentJob" Storage="_Job1" ThisKey="ParentTaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" /> 81 <Association Name="HiveExperiment_Task" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" /> 82 82 </Type> 83 83 </Table> … … 104 104 <Column Name="LastAccessed" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 105 105 <Column Name="IsHiveEngine" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 106 <Association Name="HiveExperiment_ Job" Member="Jobs" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="Job" />106 <Association Name="HiveExperiment_Task" Member="Tasks" Storage="_Jobs" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="Task" /> 107 107 <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperimentPermissions" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperimentPermission" /> 108 108 </Type> 109 109 </Table> 110 <Table Name="dbo. JobData" Member="JobDatas">111 <Type Name=" JobData">112 <Column Name=" JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />110 <Table Name="dbo.TaskData" Member="TaskDatas"> 111 <Type Name="TaskData"> 112 <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 113 113 <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" /> 114 114 <Column Name="LastUpdate" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> 115 <Association Name=" Job_JobData" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />115 <Association Name="Task_TaskData" Member="Task" Storage="_Job" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" /> 116 116 </Type> 117 117 </Table> … … 128 128 <Type Name="StateLog"> 129 129 <Column Name="StateLogId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 130 <Column Name="State" Type="global::HeuristicLab.Services.Hive.DataAccess. JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" />130 <Column Name="State" Type="global::HeuristicLab.Services.Hive.DataAccess.TaskState" DbType="VarChar(30) NOT NULL" CanBeNull="false" /> 131 131 <Column Name="DateTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 132 <Column Name=" JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />132 <Column Name="TaskId" Storage="_JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 133 133 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 134 134 <Column Name="SlaveId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" /> 135 135 <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" /> 136 <Association Name=" Job_StateLog" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />136 <Association Name="Task_StateLog" Member="Task" Storage="_Job" ThisKey="TaskId" OtherKey="TaskId" Type="Task" IsForeignKey="true" /> 137 137 <Association Name="Resource_StateLog" Member="Resource" ThisKey="SlaveId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 138 138 </Type> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
r6717 r6721 28 28 </classShape> 29 29 <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 3.3093082682291666"> 30 <DataClassMoniker Name="/HiveDataContext/ Job" />30 <DataClassMoniker Name="/HiveDataContext/Task" /> 31 31 <nestedChildShapes> 32 32 <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> … … 76 76 </nodes> 77 77 </associationConnector> 78 <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (8.875 : 4.751650890625)]" fixedFrom="NotFixed" fixedTo="NotFixed">79 <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />80 <nodes>81 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />82 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" />83 </nodes>84 </associationConnector>85 <associationConnector edgePoints="[(7.0893551015625 : 4.30930826822917); (7.0893551015625 : 5.5)]" fixedFrom="NotFixed" fixedTo="NotFixed">86 <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" />87 <nodes>88 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />89 <classShapeMoniker Id="97b00810-fa30-457e-b484-b4e80b22f91b" />90 </nodes>91 </associationConnector>92 <associationConnector edgePoints="[(7.20923076923077 : 1); (7.20923076923077 : 0.75); (7.80461538461539 : 0.75); (7.80461538461539 : 1)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">93 <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" />94 <nodes>95 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />96 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />97 </nodes>98 </associationConnector>99 78 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125"> 100 <DataClassMoniker Name="/HiveDataContext/ JobData" />79 <DataClassMoniker Name="/HiveDataContext/TaskData" /> 101 80 <nestedChildShapes> 102 81 <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="4.14, 1.46, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> … … 116 95 </nodes> 117 96 </associationConnector> 118 <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">119 <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" />120 <nodes>121 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />122 <classShapeMoniker Id="6bc13f26-f9a8-4597-b054-35be34190d12" />123 </nodes>124 </associationConnector>125 97 <associationConnector edgePoints="[(8.875 : 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 126 98 <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" /> … … 149 121 </nestedChildShapes> 150 122 </classShape> 151 <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">152 <AssociationMoniker Name="/HiveDataContext/Job/Job_StateLog" />153 <nodes>154 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />155 <classShapeMoniker Id="00352397-340e-449a-8e23-6ddd216e8617" />156 </nodes>157 </associationConnector>158 123 <associationConnector edgePoints="[(11.25 : 1.78929768880208); (10.9375 : 1.78929768880208); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 159 124 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" /> … … 176 141 </nestedChildShapes> 177 142 </classShape> 178 <associationConnector edgePoints="[(6.125 : 3.46715413411458); (6.5 : 3.46715413411458)]" fixedFrom="NotFixed" fixedTo="NotFixed">179 <AssociationMoniker Name="/HiveDataContext/HiveExperiment/HiveExperiment_Job" />180 <nodes>181 <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" />182 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />183 </nodes>184 </associationConnector>185 143 <classShape Id="cdddf4da-eaef-46a1-9cfd-987bb6b3d03e" absoluteBounds="17, 3.125, 2.5, 1.7708968098958327"> 186 144 <DataClassMoniker Name="/HiveDataContext/DeletedJobStatistics" /> … … 228 186 </nodes> 229 187 </associationConnector> 188 <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (7.97916666666667 : 4.751650890625 : JumpStart); (8.14583333333333 : 4.751650890625 : JumpEnd); (8.875 : 4.751650890625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 189 <AssociationMoniker Name="/HiveDataContext/Task/Task_AssignedResource" /> 190 <nodes> 191 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 192 <classShapeMoniker Id="a929c9dc-69f4-4488-ba1c-a2342bf81d89" /> 193 </nodes> 194 </associationConnector> 195 <associationConnector edgePoints="[(8.0625 : 4.30930826822917); (8.0625 : 5.5)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 196 <AssociationMoniker Name="/HiveDataContext/Task/Task_RequiredPlugin" /> 197 <nodes> 198 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 199 <classShapeMoniker Id="97b00810-fa30-457e-b484-b4e80b22f91b" /> 200 </nodes> 201 </associationConnector> 202 <associationConnector edgePoints="[(7.20923076923077 : 1); (7.20923076923077 : 0.875); (7.80461538461539 : 0.875); (7.80461538461539 : 1)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 203 <AssociationMoniker Name="/HiveDataContext/Task/Task_Task" /> 204 <nodes> 205 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 206 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 207 </nodes> 208 </associationConnector> 209 <associationConnector edgePoints="[(6.125 : 3.46715413411458); (6.5 : 3.46715413411458)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 210 <AssociationMoniker Name="/HiveDataContext/HiveExperiment/HiveExperiment_Task" /> 211 <nodes> 212 <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" /> 213 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 214 </nodes> 215 </associationConnector> 216 <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 217 <AssociationMoniker Name="/HiveDataContext/Task/Task_TaskData" /> 218 <nodes> 219 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 220 <classShapeMoniker Id="6bc13f26-f9a8-4597-b054-35be34190d12" /> 221 </nodes> 222 </associationConnector> 223 <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 224 <AssociationMoniker Name="/HiveDataContext/Task/Task_StateLog" /> 225 <nodes> 226 <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" /> 227 <classShapeMoniker Id="00352397-340e-449a-8e23-6ddd216e8617" /> 228 </nodes> 229 </associationConnector> 230 230 </nestedChildShapes> 231 231 </ordesignerObjectsDiagram> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r6717 r6721 43 43 partial void UpdateResource(Resource instance); 44 44 partial void DeleteResource(Resource instance); 45 partial void Insert Job(Jobinstance);46 partial void Update Job(Jobinstance);47 partial void Delete Job(Jobinstance);45 partial void InsertTask(Task instance); 46 partial void UpdateTask(Task instance); 47 partial void DeleteTask(Task instance); 48 48 partial void InsertDowntime(Downtime instance); 49 49 partial void UpdateDowntime(Downtime instance); … … 52 52 partial void UpdateHiveExperiment(HiveExperiment instance); 53 53 partial void DeleteHiveExperiment(HiveExperiment instance); 54 partial void Insert JobData(JobData instance);55 partial void Update JobData(JobData instance);56 partial void Delete JobData(JobData instance);54 partial void InsertTaskData(TaskData instance); 55 partial void UpdateTaskData(TaskData instance); 56 partial void DeleteTaskData(TaskData instance); 57 57 partial void InsertPluginData(PluginData instance); 58 58 partial void UpdatePluginData(PluginData instance); … … 143 143 } 144 144 145 public System.Data.Linq.Table< Job> Jobs146 { 147 get 148 { 149 return this.GetTable< Job>();145 public System.Data.Linq.Table<Task> Tasks 146 { 147 get 148 { 149 return this.GetTable<Task>(); 150 150 } 151 151 } … … 167 167 } 168 168 169 public System.Data.Linq.Table< JobData> JobDatas170 { 171 get 172 { 173 return this.GetTable< JobData>();169 public System.Data.Linq.Table<TaskData> TaskDatas 170 { 171 get 172 { 173 return this.GetTable<TaskData>(); 174 174 } 175 175 } … … 252 252 private EntityRef<Resource> _Resource; 253 253 254 private EntityRef< Job> _Job;254 private EntityRef<Task> _Job; 255 255 256 256 #region Extensibility Method Definitions … … 260 260 partial void OnResourceIdChanging(System.Guid value); 261 261 partial void OnResourceIdChanged(); 262 partial void On JobIdChanging(System.Guid value);263 partial void On JobIdChanged();262 partial void OnTaskIdChanging(System.Guid value); 263 partial void OnTaskIdChanged(); 264 264 #endregion 265 265 … … 267 267 { 268 268 this._Resource = default(EntityRef<Resource>); 269 this._Job = default(EntityRef< Job>);269 this._Job = default(EntityRef<Task>); 270 270 OnCreated(); 271 271 } … … 296 296 297 297 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] 298 public System.Guid JobId298 public System.Guid TaskId 299 299 { 300 300 get … … 310 310 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 311 311 } 312 this.On JobIdChanging(value);312 this.OnTaskIdChanging(value); 313 313 this.SendPropertyChanging(); 314 314 this._JobId = value; 315 this.SendPropertyChanged(" JobId");316 this.On JobIdChanged();315 this.SendPropertyChanged("TaskId"); 316 this.OnTaskIdChanged(); 317 317 } 318 318 } … … 353 353 } 354 354 355 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]356 public Job Job355 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true, DeleteRule="CASCADE")] 356 public Task Task 357 357 { 358 358 get … … 362 362 set 363 363 { 364 JobpreviousValue = this._Job.Entity;364 Task previousValue = this._Job.Entity; 365 365 if (((previousValue != value) 366 366 || (this._Job.HasLoadedOrAssignedValue == false))) … … 376 376 { 377 377 value.AssignedResources.Add(this); 378 this._JobId = value. JobId;378 this._JobId = value.TaskId; 379 379 } 380 380 else … … 382 382 this._JobId = default(System.Guid); 383 383 } 384 this.SendPropertyChanged(" Job");384 this.SendPropertyChanged("Task"); 385 385 } 386 386 } … … 660 660 private EntityRef<Plugin> _PluginInfo; 661 661 662 private EntityRef< Job> _Job;662 private EntityRef<Task> _Job; 663 663 664 664 #region Extensibility Method Definitions … … 668 668 partial void OnRequiredPluginIdChanging(System.Guid value); 669 669 partial void OnRequiredPluginIdChanged(); 670 partial void On JobIdChanging(System.Guid value);671 partial void On JobIdChanged();670 partial void OnTaskIdChanging(System.Guid value); 671 partial void OnTaskIdChanged(); 672 672 partial void OnPluginIdChanging(System.Guid value); 673 673 partial void OnPluginIdChanged(); … … 677 677 { 678 678 this._PluginInfo = default(EntityRef<Plugin>); 679 this._Job = default(EntityRef< Job>);679 this._Job = default(EntityRef<Task>); 680 680 OnCreated(); 681 681 } … … 702 702 703 703 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")] 704 public System.Guid JobId704 public System.Guid TaskId 705 705 { 706 706 get … … 716 716 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 717 717 } 718 this.On JobIdChanging(value);718 this.OnTaskIdChanging(value); 719 719 this.SendPropertyChanging(); 720 720 this._JobId = value; 721 this.SendPropertyChanged(" JobId");722 this.On JobIdChanged();721 this.SendPropertyChanged("TaskId"); 722 this.OnTaskIdChanged(); 723 723 } 724 724 } … … 783 783 } 784 784 785 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]786 public Job Job785 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)] 786 public Task Task 787 787 { 788 788 get … … 792 792 set 793 793 { 794 JobpreviousValue = this._Job.Entity;794 Task previousValue = this._Job.Entity; 795 795 if (((previousValue != value) 796 796 || (this._Job.HasLoadedOrAssignedValue == false))) … … 806 806 { 807 807 value.RequiredPlugins.Add(this); 808 this._JobId = value. JobId;808 this._JobId = value.TaskId; 809 809 } 810 810 else … … 812 812 this._JobId = default(System.Guid); 813 813 } 814 this.SendPropertyChanged(" Job");814 this.SendPropertyChanged("Task"); 815 815 } 816 816 } … … 1446 1446 } 1447 1447 1448 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo. Job")]1449 public partial class Job: INotifyPropertyChanging, INotifyPropertyChanged1448 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Task")] 1449 public partial class Task : INotifyPropertyChanging, INotifyPropertyChanged 1450 1450 { 1451 1451 … … 1454 1454 private System.Guid _JobId; 1455 1455 1456 private global::HeuristicLab.Services.Hive.DataAccess. JobState _State;1456 private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State; 1457 1457 1458 1458 private double _ExecutionTime; … … 1482 1482 private EntitySet<RequiredPlugin> _RequiredPlugins; 1483 1483 1484 private EntitySet< Job> _Jobs;1485 1486 private EntityRef< JobData> _JobData;1484 private EntitySet<Task> _Jobs; 1485 1486 private EntityRef<TaskData> _JobData; 1487 1487 1488 1488 private EntitySet<StateLog> _StateLogs; 1489 1489 1490 private EntityRef< Job> _Job1;1490 private EntityRef<Task> _Job1; 1491 1491 1492 1492 private EntityRef<HiveExperiment> _HiveExperiment; … … 1496 1496 partial void OnValidate(System.Data.Linq.ChangeAction action); 1497 1497 partial void OnCreated(); 1498 partial void On JobIdChanging(System.Guid value);1499 partial void On JobIdChanged();1500 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess. JobState value);1498 partial void OnTaskIdChanging(System.Guid value); 1499 partial void OnTaskIdChanged(); 1500 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value); 1501 1501 partial void OnStateChanged(); 1502 1502 partial void OnExecutionTimeMsChanging(double value); … … 1504 1504 partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value); 1505 1505 partial void OnLastHeartbeatChanged(); 1506 partial void OnParent JobIdChanging(System.Nullable<System.Guid> value);1507 partial void OnParent JobIdChanged();1506 partial void OnParentTaskIdChanging(System.Nullable<System.Guid> value); 1507 partial void OnParentTaskIdChanged(); 1508 1508 partial void OnPriorityChanging(int value); 1509 1509 partial void OnPriorityChanged(); … … 1512 1512 partial void OnMemoryNeededChanging(int value); 1513 1513 partial void OnMemoryNeededChanged(); 1514 partial void OnIsParent JobChanging(bool value);1515 partial void OnIsParent JobChanged();1514 partial void OnIsParentTaskChanging(bool value); 1515 partial void OnIsParentTaskChanged(); 1516 1516 partial void OnFinishWhenChildJobsFinishedChanging(bool value); 1517 1517 partial void OnFinishWhenChildJobsFinishedChanged(); … … 1524 1524 #endregion 1525 1525 1526 public Job()1526 public Task() 1527 1527 { 1528 1528 this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources)); 1529 1529 this._RequiredPlugins = new EntitySet<RequiredPlugin>(new Action<RequiredPlugin>(this.attach_RequiredPlugins), new Action<RequiredPlugin>(this.detach_RequiredPlugins)); 1530 this._Jobs = new EntitySet< Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));1531 this._JobData = default(EntityRef< JobData>);1530 this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs)); 1531 this._JobData = default(EntityRef<TaskData>); 1532 1532 this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs)); 1533 this._Job1 = default(EntityRef< Job>);1533 this._Job1 = default(EntityRef<Task>); 1534 1534 this._HiveExperiment = default(EntityRef<HiveExperiment>); 1535 1535 OnCreated(); … … 1537 1537 1538 1538 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)] 1539 public System.Guid JobId1539 public System.Guid TaskId 1540 1540 { 1541 1541 get … … 1547 1547 if ((this._JobId != value)) 1548 1548 { 1549 this.On JobIdChanging(value);1549 this.OnTaskIdChanging(value); 1550 1550 this.SendPropertyChanging(); 1551 1551 this._JobId = value; 1552 this.SendPropertyChanged(" JobId");1553 this.On JobIdChanged();1554 } 1555 } 1556 } 1557 1558 [global::System.Data.Linq.Mapping.ColumnAttribute(Name=" JobState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)]1559 public global::HeuristicLab.Services.Hive.DataAccess. JobState State1552 this.SendPropertyChanged("TaskId"); 1553 this.OnTaskIdChanged(); 1554 } 1555 } 1556 } 1557 1558 [global::System.Data.Linq.Mapping.ColumnAttribute(Name="TaskState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)] 1559 public global::HeuristicLab.Services.Hive.DataAccess.TaskState State 1560 1560 { 1561 1561 get … … 1617 1617 1618 1618 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")] 1619 public System.Nullable<System.Guid> Parent JobId1619 public System.Nullable<System.Guid> ParentTaskId 1620 1620 { 1621 1621 get … … 1631 1631 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 1632 1632 } 1633 this.OnParent JobIdChanging(value);1633 this.OnParentTaskIdChanging(value); 1634 1634 this.SendPropertyChanging(); 1635 1635 this._ParentJobId = value; 1636 this.SendPropertyChanged("Parent JobId");1637 this.OnParent JobIdChanged();1636 this.SendPropertyChanged("ParentTaskId"); 1637 this.OnParentTaskIdChanged(); 1638 1638 } 1639 1639 } … … 1701 1701 1702 1702 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsParentJob", DbType="Bit")] 1703 public bool IsParent Job1703 public bool IsParentTask 1704 1704 { 1705 1705 get … … 1711 1711 if ((this._IsParentJob != value)) 1712 1712 { 1713 this.OnIsParent JobChanging(value);1713 this.OnIsParentTaskChanging(value); 1714 1714 this.SendPropertyChanging(); 1715 1715 this._IsParentJob = value; 1716 this.SendPropertyChanged("IsParent Job");1717 this.OnIsParent JobChanged();1716 this.SendPropertyChanged("IsParentTask"); 1717 this.OnIsParentTaskChanged(); 1718 1718 } 1719 1719 } … … 1804 1804 } 1805 1805 1806 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]1806 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_AssignedResources", ThisKey="TaskId", OtherKey="TaskId")] 1807 1807 public EntitySet<AssignedResource> AssignedResources 1808 1808 { … … 1817 1817 } 1818 1818 1819 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]1819 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="TaskId", OtherKey="TaskId")] 1820 1820 public EntitySet<RequiredPlugin> RequiredPlugins 1821 1821 { … … 1830 1830 } 1831 1831 1832 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]1833 public EntitySet< Job> ChildJobs1832 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Jobs", ThisKey="TaskId", OtherKey="ParentTaskId")] 1833 public EntitySet<Task> ChildJobs 1834 1834 { 1835 1835 get … … 1843 1843 } 1844 1844 1845 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_JobData", Storage="_JobData", ThisKey="JobId", OtherKey="JobId", IsUnique=true, IsForeignKey=false)]1846 public JobData JobData1845 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_JobData", ThisKey="TaskId", OtherKey="TaskId", IsUnique=true, IsForeignKey=false)] 1846 public TaskData JobData 1847 1847 { 1848 1848 get … … 1852 1852 set 1853 1853 { 1854 JobData previousValue = this._JobData.Entity;1854 TaskData previousValue = this._JobData.Entity; 1855 1855 if (((previousValue != value) 1856 1856 || (this._JobData.HasLoadedOrAssignedValue == false))) … … 1860 1860 { 1861 1861 this._JobData.Entity = null; 1862 previousValue. Job= null;1862 previousValue.Task = null; 1863 1863 } 1864 1864 this._JobData.Entity = value; 1865 1865 if ((value != null)) 1866 1866 { 1867 value. Job= this;1867 value.Task = this; 1868 1868 } 1869 1869 this.SendPropertyChanged("JobData"); … … 1872 1872 } 1873 1873 1874 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_StateLog", Storage="_StateLogs", ThisKey="JobId", OtherKey="JobId")]1874 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_StateLogs", ThisKey="TaskId", OtherKey="TaskId")] 1875 1875 public EntitySet<StateLog> StateLogs 1876 1876 { … … 1885 1885 } 1886 1886 1887 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]1888 public JobParentJob1887 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)] 1888 public Task ParentJob 1889 1889 { 1890 1890 get … … 1894 1894 set 1895 1895 { 1896 JobpreviousValue = this._Job1.Entity;1896 Task previousValue = this._Job1.Entity; 1897 1897 if (((previousValue != value) 1898 1898 || (this._Job1.HasLoadedOrAssignedValue == false))) … … 1908 1908 { 1909 1909 value.ChildJobs.Add(this); 1910 this._ParentJobId = value. JobId;1910 this._ParentJobId = value.TaskId; 1911 1911 } 1912 1912 else … … 1919 1919 } 1920 1920 1921 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_ Job", Storage="_HiveExperiment", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId", IsForeignKey=true)]1921 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_Task", Storage="_HiveExperiment", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId", IsForeignKey=true)] 1922 1922 public HiveExperiment HiveExperiment 1923 1923 { … … 1936 1936 { 1937 1937 this._HiveExperiment.Entity = null; 1938 previousValue. Jobs.Remove(this);1938 previousValue.Tasks.Remove(this); 1939 1939 } 1940 1940 this._HiveExperiment.Entity = value; 1941 1941 if ((value != null)) 1942 1942 { 1943 value. Jobs.Add(this);1943 value.Tasks.Add(this); 1944 1944 this._HiveExperimentId = value.HiveExperimentId; 1945 1945 } … … 1976 1976 { 1977 1977 this.SendPropertyChanging(); 1978 entity. Job= this;1978 entity.Task = this; 1979 1979 } 1980 1980 … … 1982 1982 { 1983 1983 this.SendPropertyChanging(); 1984 entity. Job= null;1984 entity.Task = null; 1985 1985 } 1986 1986 … … 1988 1988 { 1989 1989 this.SendPropertyChanging(); 1990 entity. Job= this;1990 entity.Task = this; 1991 1991 } 1992 1992 … … 1994 1994 { 1995 1995 this.SendPropertyChanging(); 1996 entity. Job= null;1997 } 1998 1999 private void attach_Jobs( Jobentity)1996 entity.Task = null; 1997 } 1998 1999 private void attach_Jobs(Task entity) 2000 2000 { 2001 2001 this.SendPropertyChanging(); … … 2003 2003 } 2004 2004 2005 private void detach_Jobs( Jobentity)2005 private void detach_Jobs(Task entity) 2006 2006 { 2007 2007 this.SendPropertyChanging(); … … 2012 2012 { 2013 2013 this.SendPropertyChanging(); 2014 entity. Job= this;2014 entity.Task = this; 2015 2015 } 2016 2016 … … 2018 2018 { 2019 2019 this.SendPropertyChanging(); 2020 entity. Job= null;2020 entity.Task = null; 2021 2021 } 2022 2022 } … … 2291 2291 private bool _IsHiveEngine; 2292 2292 2293 private EntitySet< Job> _Jobs;2293 private EntitySet<Task> _Jobs; 2294 2294 2295 2295 private EntitySet<HiveExperimentPermission> _HiveExperimentPermissions; … … 2319 2319 public HiveExperiment() 2320 2320 { 2321 this._Jobs = new EntitySet< Job>(new Action<Job>(this.attach_Jobs), new Action<Job>(this.detach_Jobs));2321 this._Jobs = new EntitySet<Task>(new Action<Task>(this.attach_Jobs), new Action<Task>(this.detach_Jobs)); 2322 2322 this._HiveExperimentPermissions = new EntitySet<HiveExperimentPermission>(new Action<HiveExperimentPermission>(this.attach_HiveExperimentPermissions), new Action<HiveExperimentPermission>(this.detach_HiveExperimentPermissions)); 2323 2323 OnCreated(); … … 2484 2484 } 2485 2485 2486 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_ Job", Storage="_Jobs", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId")]2487 public EntitySet< Job> Jobs2486 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_Task", Storage="_Jobs", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId")] 2487 public EntitySet<Task> Tasks 2488 2488 { 2489 2489 get … … 2530 2530 } 2531 2531 2532 private void attach_Jobs( Jobentity)2532 private void attach_Jobs(Task entity) 2533 2533 { 2534 2534 this.SendPropertyChanging(); … … 2536 2536 } 2537 2537 2538 private void detach_Jobs( Jobentity)2538 private void detach_Jobs(Task entity) 2539 2539 { 2540 2540 this.SendPropertyChanging(); … … 2555 2555 } 2556 2556 2557 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo. JobData")]2558 public partial class JobData : INotifyPropertyChanging, INotifyPropertyChanged2557 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TaskData")] 2558 public partial class TaskData : INotifyPropertyChanging, INotifyPropertyChanged 2559 2559 { 2560 2560 … … 2567 2567 private System.DateTime _LastUpdate; 2568 2568 2569 private EntityRef< Job> _Job;2569 private EntityRef<Task> _Job; 2570 2570 2571 2571 #region Extensibility Method Definitions … … 2573 2573 partial void OnValidate(System.Data.Linq.ChangeAction action); 2574 2574 partial void OnCreated(); 2575 partial void On JobIdChanging(System.Guid value);2576 partial void On JobIdChanged();2575 partial void OnTaskIdChanging(System.Guid value); 2576 partial void OnTaskIdChanged(); 2577 2577 partial void OnDataChanging(System.Data.Linq.Binary value); 2578 2578 partial void OnDataChanged(); … … 2581 2581 #endregion 2582 2582 2583 public JobData()2584 { 2585 this._Job = default(EntityRef< Job>);2583 public TaskData() 2584 { 2585 this._Job = default(EntityRef<Task>); 2586 2586 OnCreated(); 2587 2587 } 2588 2588 2589 2589 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] 2590 public System.Guid JobId2590 public System.Guid TaskId 2591 2591 { 2592 2592 get … … 2602 2602 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 2603 2603 } 2604 this.On JobIdChanging(value);2604 this.OnTaskIdChanging(value); 2605 2605 this.SendPropertyChanging(); 2606 2606 this._JobId = value; 2607 this.SendPropertyChanged(" JobId");2608 this.On JobIdChanged();2607 this.SendPropertyChanged("TaskId"); 2608 this.OnTaskIdChanged(); 2609 2609 } 2610 2610 } … … 2651 2651 } 2652 2652 2653 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_JobData", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]2654 public Job Job2653 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)] 2654 public Task Task 2655 2655 { 2656 2656 get … … 2660 2660 set 2661 2661 { 2662 JobpreviousValue = this._Job.Entity;2662 Task previousValue = this._Job.Entity; 2663 2663 if (((previousValue != value) 2664 2664 || (this._Job.HasLoadedOrAssignedValue == false))) … … 2674 2674 { 2675 2675 value.JobData = this; 2676 this._JobId = value. JobId;2676 this._JobId = value.TaskId; 2677 2677 } 2678 2678 else … … 2680 2680 this._JobId = default(System.Guid); 2681 2681 } 2682 this.SendPropertyChanged(" Job");2682 this.SendPropertyChanged("Task"); 2683 2683 } 2684 2684 } … … 2889 2889 private System.Guid _StateLogId; 2890 2890 2891 private global::HeuristicLab.Services.Hive.DataAccess. JobState _State;2891 private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State; 2892 2892 2893 2893 private System.DateTime _DateTime; … … 2901 2901 private string _Exception; 2902 2902 2903 private EntityRef< Job> _Job;2903 private EntityRef<Task> _Job; 2904 2904 2905 2905 private EntityRef<Resource> _Resource; … … 2911 2911 partial void OnStateLogIdChanging(System.Guid value); 2912 2912 partial void OnStateLogIdChanged(); 2913 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess. JobState value);2913 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.TaskState value); 2914 2914 partial void OnStateChanged(); 2915 2915 partial void OnDateTimeChanging(System.DateTime value); 2916 2916 partial void OnDateTimeChanged(); 2917 partial void On JobIdChanging(System.Guid value);2918 partial void On JobIdChanged();2917 partial void OnTaskIdChanging(System.Guid value); 2918 partial void OnTaskIdChanged(); 2919 2919 partial void OnUserIdChanging(System.Nullable<System.Guid> value); 2920 2920 partial void OnUserIdChanged(); … … 2927 2927 public StateLog() 2928 2928 { 2929 this._Job = default(EntityRef< Job>);2929 this._Job = default(EntityRef<Task>); 2930 2930 this._Resource = default(EntityRef<Resource>); 2931 2931 OnCreated(); … … 2953 2953 2954 2954 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)] 2955 public global::HeuristicLab.Services.Hive.DataAccess. JobState State2955 public global::HeuristicLab.Services.Hive.DataAccess.TaskState State 2956 2956 { 2957 2957 get … … 2993 2993 2994 2994 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")] 2995 public System.Guid JobId2995 public System.Guid TaskId 2996 2996 { 2997 2997 get … … 3007 3007 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 3008 3008 } 3009 this.On JobIdChanging(value);3009 this.OnTaskIdChanging(value); 3010 3010 this.SendPropertyChanging(); 3011 3011 this._JobId = value; 3012 this.SendPropertyChanged(" JobId");3013 this.On JobIdChanged();3012 this.SendPropertyChanged("TaskId"); 3013 this.OnTaskIdChanged(); 3014 3014 } 3015 3015 } … … 3080 3080 } 3081 3081 3082 [global::System.Data.Linq.Mapping.AssociationAttribute(Name=" Job_StateLog", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]3083 public Job Job3082 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)] 3083 public Task Task 3084 3084 { 3085 3085 get … … 3089 3089 set 3090 3090 { 3091 JobpreviousValue = this._Job.Entity;3091 Task previousValue = this._Job.Entity; 3092 3092 if (((previousValue != value) 3093 3093 || (this._Job.HasLoadedOrAssignedValue == false))) … … 3103 3103 { 3104 3104 value.StateLogs.Add(this); 3105 this._JobId = value. JobId;3105 this._JobId = value.TaskId; 3106 3106 } 3107 3107 else … … 3109 3109 this._JobId = default(System.Guid); 3110 3110 } 3111 this.SendPropertyChanged(" Job");3111 this.SendPropertyChanged("Task"); 3112 3112 } 3113 3113 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r6712 r6721 5 5 CREATE TABLE [dbo].[AssignedResources]( 6 6 [ResourceId] UniqueIdentifier NOT NULL, 7 [ JobId] UniqueIdentifier NOT NULL,8 CONSTRAINT [PK_dbo.ResourceId JobId] PRIMARY KEY ([ResourceId], [JobId])7 [TaskId] UniqueIdentifier NOT NULL, 8 CONSTRAINT [PK_dbo.ResourceIdTaskId] PRIMARY KEY ([ResourceId], [TaskId]) 9 9 ) 10 10 CREATE TABLE [dbo].[Plugin]( … … 19 19 CREATE TABLE [dbo].[RequiredPlugins]( 20 20 [RequiredPluginId] UniqueIdentifier NOT NULL, 21 [ JobId] UniqueIdentifier NOT NULL,21 [TaskId] UniqueIdentifier NOT NULL, 22 22 [PluginId] UniqueIdentifier NOT NULL, 23 23 CONSTRAINT [PK_dbo.RequiredPlugins] PRIMARY KEY ([RequiredPluginId]) … … 42 42 CONSTRAINT [PK_dbo.Resource] PRIMARY KEY ([ResourceId]) 43 43 ) 44 CREATE TABLE [dbo].[ Job](45 [ JobId] UniqueIdentifier NOT NULL,46 [ JobState] VarChar(30),44 CREATE TABLE [dbo].[Task]( 45 [TaskId] UniqueIdentifier NOT NULL, 46 [TaskState] VarChar(30), 47 47 [ExecutionTimeMs] float, 48 48 [LastHeartbeat] DateTime, 49 [Parent JobId] UniqueIdentifier,49 [ParentTaskId] UniqueIdentifier, 50 50 [Priority] Int NOT NULL, 51 51 [CoresNeeded] Int NOT NULL, 52 52 [MemoryNeeded] Int NOT NULL, 53 [IsParent Job] Bit,53 [IsParentTask] Bit, 54 54 [FinishWhenChildJobsFinished] Bit, 55 55 [Command] VarChar(30), 56 56 [HiveExperimentId] UniqueIdentifier NOT NULL, 57 57 [IsPrivileged] Bit, 58 CONSTRAINT [PK_dbo. Job] PRIMARY KEY ([JobId])58 CONSTRAINT [PK_dbo.Task] PRIMARY KEY ([TaskId]) 59 59 ) 60 60 CREATE TABLE [dbo].[Downtime]( … … 79 79 CONSTRAINT [PK_dbo.HiveExperiment] PRIMARY KEY ([HiveExperimentId]) 80 80 ) 81 CREATE TABLE [dbo].[ JobData](82 [ JobId] UniqueIdentifier NOT NULL,81 CREATE TABLE [dbo].[TaskData]( 82 [TaskId] UniqueIdentifier NOT NULL, 83 83 [Data] VarBinary(MAX), 84 84 [LastUpdate] DateTime, 85 CONSTRAINT [PK_dbo. JobData] PRIMARY KEY ([JobId])85 CONSTRAINT [PK_dbo.TaskData] PRIMARY KEY ([TaskId]) 86 86 ) 87 87 CREATE TABLE [dbo].[PluginData]( … … 96 96 [State] VarChar(30) NOT NULL, 97 97 [DateTime] DateTime NOT NULL, 98 [ JobId] UniqueIdentifier NOT NULL,98 [TaskId] UniqueIdentifier NOT NULL, 99 99 [UserId] UniqueIdentifier, 100 100 [SlaveId] UniqueIdentifier, … … 149 149 ADD CONSTRAINT [Resource_AssignedResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId]) 150 150 ALTER TABLE [dbo].[AssignedResources] 151 ADD CONSTRAINT [ Job_AssignedResource] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])151 ADD CONSTRAINT [Task_AssignedResource] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId]) 152 152 ALTER TABLE [dbo].[RequiredPlugins] 153 153 ADD CONSTRAINT [Plugin_RequiredPlugin] FOREIGN KEY ([PluginId]) REFERENCES [dbo].[Plugin]([PluginId]) 154 154 ALTER TABLE [dbo].[RequiredPlugins] 155 ADD CONSTRAINT [ Job_RequiredPlugin] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])155 ADD CONSTRAINT [Task_RequiredPlugin] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId]) 156 156 ALTER TABLE [dbo].[Resource] 157 157 ADD CONSTRAINT [Resource_Resource] FOREIGN KEY ([ParentResourceId]) REFERENCES [dbo].[Resource]([ResourceId]) 158 ALTER TABLE [dbo].[ Job]159 ADD CONSTRAINT [ Job_Job] FOREIGN KEY ([ParentJobId]) REFERENCES [dbo].[Job]([JobId])160 ALTER TABLE [dbo].[ Job]158 ALTER TABLE [dbo].[Task] 159 ADD CONSTRAINT [Task_Task] FOREIGN KEY ([ParentTaskId]) REFERENCES [dbo].[Task]([TaskId]) 160 ALTER TABLE [dbo].[Task] 161 161 ADD CONSTRAINT [HiveExperiment_Job] FOREIGN KEY ([HiveExperimentId]) REFERENCES [dbo].[HiveExperiment]([HiveExperimentId]) 162 162 ALTER TABLE [dbo].[Downtime] 163 163 ADD CONSTRAINT [Resource_Downtime] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId]) 164 ALTER TABLE [dbo].[ JobData]165 ADD CONSTRAINT [ Job_JobData] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])164 ALTER TABLE [dbo].[TaskData] 165 ADD CONSTRAINT [Task_TaskData] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId]) 166 166 ALTER TABLE [dbo].[PluginData] 167 167 ADD CONSTRAINT [Plugin_PluginData] FOREIGN KEY ([PluginId]) REFERENCES [dbo].[Plugin]([PluginId]) 168 168 ALTER TABLE [dbo].[StateLog] 169 ADD CONSTRAINT [ Job_StateLog] FOREIGN KEY ([JobId]) REFERENCES [dbo].[Job]([JobId])169 ADD CONSTRAINT [Task_StateLog] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId]) 170 170 ALTER TABLE [dbo].[StateLog] 171 171 ADD CONSTRAINT [Resource_StateLog] FOREIGN KEY ([SlaveId]) REFERENCES [dbo].[Resource]([ResourceId]) -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql
r6712 r6721 8 8 9 9 10 ALTER TABLE [dbo].[AssignedResources] DROP CONSTRAINT [ Job_AssignedResource]11 ALTER TABLE [dbo].[AssignedResources] WITH CHECK ADD CONSTRAINT [ Job_AssignedResource] FOREIGN KEY([JobId])12 REFERENCES [dbo].[ Job] ([JobId])10 ALTER TABLE [dbo].[AssignedResources] DROP CONSTRAINT [Task_AssignedResource] 11 ALTER TABLE [dbo].[AssignedResources] WITH CHECK ADD CONSTRAINT [Task_AssignedResource] FOREIGN KEY([TaskId]) 12 REFERENCES [dbo].[Task] ([TaskId]) 13 13 ON UPDATE CASCADE 14 14 ON DELETE CASCADE … … 21 21 GO 22 22 23 ALTER TABLE dbo. Job ALTER COLUMN JobId ADD ROWGUIDCOL;24 ALTER TABLE dbo. Job WITH NOCHECK ADD CONSTRAINT [DF_Job_JobId] DEFAULT (NEWSEQUENTIALID()) FOR JobId;25 GO 26 27 ALTER TABLE [dbo].[StateLog] DROP CONSTRAINT [ Job_StateLog]28 ALTER TABLE [dbo].[StateLog] WITH CHECK ADD CONSTRAINT [ Job_StateLog] FOREIGN KEY([JobId])29 REFERENCES [dbo].[ Job] ([JobId])23 ALTER TABLE dbo.Task ALTER COLUMN TaskId ADD ROWGUIDCOL; 24 ALTER TABLE dbo.Task WITH NOCHECK ADD CONSTRAINT [DF_Task_TaskId] DEFAULT (NEWSEQUENTIALID()) FOR TaskId; 25 GO 26 27 ALTER TABLE [dbo].[StateLog] DROP CONSTRAINT [Task_StateLog] 28 ALTER TABLE [dbo].[StateLog] WITH CHECK ADD CONSTRAINT [Task_StateLog] FOREIGN KEY([TaskId]) 29 REFERENCES [dbo].[Task] ([TaskId]) 30 30 ON UPDATE CASCADE 31 31 ON DELETE CASCADE … … 54 54 ALTER TABLE dbo.RequiredPlugins WITH NOCHECK ADD CONSTRAINT [DF_RequiredPlugins_RequiredPluginId] DEFAULT (NEWSEQUENTIALID()) FOR RequiredPluginId; 55 55 56 ALTER TABLE [dbo].[RequiredPlugins] DROP CONSTRAINT [ Job_RequiredPlugin]57 ALTER TABLE [dbo].[RequiredPlugins] WITH CHECK ADD CONSTRAINT [ Job_RequiredPlugin] FOREIGN KEY([JobId])58 REFERENCES [dbo].[ Job] ([JobId])56 ALTER TABLE [dbo].[RequiredPlugins] DROP CONSTRAINT [Task_RequiredPlugin] 57 ALTER TABLE [dbo].[RequiredPlugins] WITH CHECK ADD CONSTRAINT [Task_RequiredPlugin] FOREIGN KEY([TaskId]) 58 REFERENCES [dbo].[Task] ([TaskId]) 59 59 ON UPDATE CASCADE 60 60 ON DELETE CASCADE … … 110 110 111 111 /* create indices */ 112 CREATE INDEX Index_RequiredPlugins_ JobId ON RequiredPlugins(JobId);112 CREATE INDEX Index_RequiredPlugins_TaskId ON RequiredPlugins(TaskId); 113 113 GO 114 114 … … 120 120 CREATE VIEW [dbo].[view_FirstState] 121 121 AS 122 SELECT sl. JobId, sl.DateTime, sl.State122 SELECT sl.TaskId, sl.DateTime, sl.State 123 123 FROM dbo.StateLog AS sl INNER JOIN 124 (SELECT JobId, MIN(DateTime) AS DateTime124 (SELECT TaskId, MIN(DateTime) AS DateTime 125 125 FROM dbo.StateLog 126 GROUP BY JobId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.JobId = minDate.JobId126 GROUP BY TaskId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.TaskId = minDate.TaskId 127 127 128 128 GO … … 134 134 CREATE VIEW [dbo].[view_LastState] 135 135 AS 136 SELECT sl. JobId, sl.DateTime, sl.State136 SELECT sl.TaskId, sl.DateTime, sl.State 137 137 FROM dbo.StateLog AS sl INNER JOIN 138 (SELECT JobId, MAX(DateTime) AS DateTime138 (SELECT TaskId, MAX(DateTime) AS DateTime 139 139 FROM dbo.StateLog 140 GROUP BY JobId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.JobId = minDate.JobId140 GROUP BY TaskId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.TaskId = minDate.TaskId 141 141 GO 142 142 … … 176 176 CREATE TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS 177 177 BEGIN 178 DELETE Job FROM deleted, Job WHERE deleted.HiveExperimentId = Job.HiveExperimentId178 DELETE Task FROM deleted, Task WHERE deleted.HiveExperimentId = Task.HiveExperimentId 179 179 DELETE HiveExperiment FROM deleted, HiveExperiment WHERE deleted.HiveExperimentId = HiveExperiment.HiveExperimentId 180 180 END … … 186 186 -- Description: Recursively deletes all child-jobs of a job when it is deleted. (Source: http://devio.wordpress.com/2008/05/23/recursive-delete-in-sql-server/) 187 187 -- ============================================= 188 CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[ Job] INSTEAD OF DELETE AS188 CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[Task] INSTEAD OF DELETE AS 189 189 BEGIN 190 190 -- add statistics … … 202 202 WHERE 203 203 he.HiveExperimentId = j.HiveExperimentId AND 204 fs. JobId = j.JobId AND205 ls. JobId = j.JobId204 fs.TaskId = j.TaskId AND 205 ls.TaskId = j.TaskId 206 206 GROUP BY he.OwnerUserId 207 207 208 208 -- recursively delete jobs 209 209 CREATE TABLE #Table( 210 JobId uniqueidentifier210 TaskId uniqueidentifier 211 211 ) 212 INSERT INTO #Table ( JobId)213 SELECT JobId FROM deleted212 INSERT INTO #Table (TaskId) 213 SELECT TaskId FROM deleted 214 214 215 215 DECLARE @c INT 216 216 SET @c = 0 217 217 218 WHILE @c <> (SELECT COUNT( JobId) FROM #Table) BEGIN219 SELECT @c = COUNT( JobId) FROM #Table218 WHILE @c <> (SELECT COUNT(TaskId) FROM #Table) BEGIN 219 SELECT @c = COUNT(TaskId) FROM #Table 220 220 221 INSERT INTO #Table ( JobId)222 SELECT Job.JobId223 FROM Job224 LEFT OUTER JOIN #Table ON Job.JobId = #Table.JobId225 WHERE Job.ParentJobId IN (SELECT JobId FROM #Table)226 AND #Table. JobId IS NULL221 INSERT INTO #Table (TaskId) 222 SELECT Task.TaskId 223 FROM Task 224 LEFT OUTER JOIN #Table ON Task.TaskId = #Table.TaskId 225 WHERE Task.ParentTaskId IN (SELECT TaskId FROM #Table) 226 AND #Table.TaskId IS NULL 227 227 END 228 228 229 DELETE JobData FROM JobData INNER JOIN #Table ON JobData.JobId = #Table.JobId230 DELETE Job FROM Job INNER JOIN #Table ON Job.JobId = #Table.JobId229 DELETE TaskData FROM TaskData INNER JOIN #Table ON TaskData.TaskId = #Table.TaskId 230 DELETE Task FROM Task INNER JOIN #Table ON Task.TaskId = #Table.TaskId 231 231 END 232 232 GO … … 235 235 -- Author: cneumuel 236 236 -- Create date: 17.05.2011 237 -- Description: Writes the execution times of deleted jobs into DeletedJobStats to ensure correct statistics238 -- ============================================= 239 --CREATE TRIGGER [dbo].[tr_DeletedJobStats] ON [dbo].[ Job] AFTER DELETE AS237 -- Description: Writes the execution times of deleted Tasks into DeletedJobStats to ensure correct statistics 238 -- ============================================= 239 --CREATE TRIGGER [dbo].[tr_DeletedJobStats] ON [dbo].[Task] AFTER DELETE AS 240 240 --BEGIN 241 241 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Query Jobs.sql
r6712 r6721 1 1 /****** Script for SelectTopNRows command from SSMS ******/ 2 SELECT j.[ JobId]3 ,j.[ JobState]2 SELECT j.[TaskId] 3 ,j.[TaskState] 4 4 ,j.[ExecutionTimeMs]/1000/60/60 AS ExecutionTimeHours 5 5 ,DATALENGTH(jd.data)/1024.0/1024.0 AS MB … … 13 13 ,j.[IsPrivileged] 14 14 ,j.[Command] 15 ,j.[IsParent Job]15 ,j.[IsParentTask] 16 16 ,j.[FinishWhenChildJobsFinished] 17 ,j.[Parent JobId]17 ,j.[ParentTaskId] 18 18 , he.HiveExperimentId 19 19 FROM 20 [HeuristicLab.Hive-3.3].[dbo].[ Job] j20 [HeuristicLab.Hive-3.3].[dbo].[Task] j 21 21 ,[HeuristicLab.Hive-3.3].[dbo].[HiveExperiment] he 22 22 ,[HeuristicLab.Authentication].dbo.aspnet_Users u 23 ,[HeuristicLab.Hive-3.3].dbo. JobData jd23 ,[HeuristicLab.Hive-3.3].dbo.TaskData jd 24 24 WHERE 25 25 j.HiveExperimentId = he.HiveExperimentId 26 AND j. JobId = jd.JobId26 AND j.TaskId = jd.TaskId 27 27 AND he.OwnerUserId = u.UserId 28 28 --AND he.DateCreated > '06-03-2011 10:30' 29 29 30 ORDER BY j. JobState, he.DateCreated DESC30 ORDER BY j.TaskState, he.DateCreated DESC
Note: See TracChangeset
for help on using the changeset viewer.