Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 13:41:25 (13 years ago)
Author:
ascheibe
Message:

#1233 Review comments: renamed Job to Task

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  
    2424namespace HeuristicLab.Services.Hive.DataAccess {
    2525  [Serializable]
    26   public enum JobState {
     26  public enum TaskState {
    2727    /// <summary>
    2828    /// 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  
    107107    </Compile>
    108108    <Compile Include="ITransactionManager.cs" />
    109     <Compile Include="Enums\JobState.cs" />
     109    <Compile Include="Enums\TaskState.cs" />
    110110    <Compile Include="Logger.cs" />
    111111    <Compile Include="Enums\Permission.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r6717 r6721  
    44    <Type Name="AssignedResource">
    55      <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" />
    77      <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" />
    99    </Type>
    1010  </Table>
     
    2424    <Type Name="RequiredPlugin">
    2525      <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" />
    2727      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    2828      <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" />
    3030    </Type>
    3131  </Table>
     
    5858    </Type>
    5959  </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" />
    6464      <Column Name="ExecutionTimeMs" Storage="_ExecutionTime" Type="System.Double" DbType="float" CanBeNull="false" />
    6565      <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    66       <Column Name="ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
     66      <Column Name="ParentTaskId" Storage="_ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    6767      <Column Name="Priority" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    6868      <Column Name="CoresNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    6969      <Column Name="MemoryNeeded" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    70       <Column Name="IsParentJob" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
     70      <Column Name="IsParentTask" Storage="_IsParentJob" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
    7171      <Column Name="FinishWhenChildJobsFinished" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
    7272      <Column Name="Command" Type="global::HeuristicLab.Services.Hive.DataAccess.Command?" DbType="VarChar(30)" CanBeNull="true" />
    7373      <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    7474      <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" />
    8282    </Type>
    8383  </Table>
     
    104104      <Column Name="LastAccessed" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    105105      <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" />
    107107      <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperimentPermissions" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperimentPermission" />
    108108    </Type>
    109109  </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" />
    113113      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" />
    114114      <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" />
    116116    </Type>
    117117  </Table>
     
    128128    <Type Name="StateLog">
    129129      <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" />
    131131      <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" />
    133133      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    134134      <Column Name="SlaveId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    135135      <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" />
    137137      <Association Name="Resource_StateLog" Member="Resource" ThisKey="SlaveId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" />
    138138    </Type>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r6717 r6721  
    2828    </classShape>
    2929    <classShape Id="695bfc39-59f3-4e60-8644-f847964bf62c" absoluteBounds="6.5, 1, 2, 3.3093082682291666">
    30       <DataClassMoniker Name="/HiveDataContext/Job" />
     30      <DataClassMoniker Name="/HiveDataContext/Task" />
    3131      <nestedChildShapes>
    3232        <elementListCompartment Id="a6a30e11-03d1-4869-82e6-b733f4ef9974" absoluteBounds="6.5150000000000006, 1.46, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     
    7676      </nodes>
    7777    </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>
    9978    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125">
    100       <DataClassMoniker Name="/HiveDataContext/JobData" />
     79      <DataClassMoniker Name="/HiveDataContext/TaskData" />
    10180      <nestedChildShapes>
    10281        <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="4.14, 1.46, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     
    11695      </nodes>
    11796    </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>
    12597    <associationConnector edgePoints="[(8.875 : 6.19314697265625); (8.5 : 6.19314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    12698      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" />
     
    149121      </nestedChildShapes>
    150122    </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>
    158123    <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">
    159124      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" />
     
    176141      </nestedChildShapes>
    177142    </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>
    185143    <classShape Id="cdddf4da-eaef-46a1-9cfd-987bb6b3d03e" absoluteBounds="17, 3.125, 2.5, 1.7708968098958327">
    186144      <DataClassMoniker Name="/HiveDataContext/DeletedJobStatistics" />
     
    228186      </nodes>
    229187    </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>
    230230  </nestedChildShapes>
    231231</ordesignerObjectsDiagram>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r6717 r6721  
    4343    partial void UpdateResource(Resource instance);
    4444    partial void DeleteResource(Resource instance);
    45     partial void InsertJob(Job instance);
    46     partial void UpdateJob(Job instance);
    47     partial void DeleteJob(Job instance);
     45    partial void InsertTask(Task instance);
     46    partial void UpdateTask(Task instance);
     47    partial void DeleteTask(Task instance);
    4848    partial void InsertDowntime(Downtime instance);
    4949    partial void UpdateDowntime(Downtime instance);
     
    5252    partial void UpdateHiveExperiment(HiveExperiment instance);
    5353    partial void DeleteHiveExperiment(HiveExperiment instance);
    54     partial void InsertJobData(JobData instance);
    55     partial void UpdateJobData(JobData instance);
    56     partial void DeleteJobData(JobData instance);
     54    partial void InsertTaskData(TaskData instance);
     55    partial void UpdateTaskData(TaskData instance);
     56    partial void DeleteTaskData(TaskData instance);
    5757    partial void InsertPluginData(PluginData instance);
    5858    partial void UpdatePluginData(PluginData instance);
     
    143143    }
    144144   
    145     public System.Data.Linq.Table<Job> Jobs
    146     {
    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>();
    150150      }
    151151    }
     
    167167    }
    168168   
    169     public System.Data.Linq.Table<JobData> JobDatas
    170     {
    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>();
    174174      }
    175175    }
     
    252252    private EntityRef<Resource> _Resource;
    253253   
    254     private EntityRef<Job> _Job;
     254    private EntityRef<Task> _Job;
    255255   
    256256    #region Extensibility Method Definitions
     
    260260    partial void OnResourceIdChanging(System.Guid value);
    261261    partial void OnResourceIdChanged();
    262     partial void OnJobIdChanging(System.Guid value);
    263     partial void OnJobIdChanged();
     262    partial void OnTaskIdChanging(System.Guid value);
     263    partial void OnTaskIdChanged();
    264264    #endregion
    265265   
     
    267267    {
    268268      this._Resource = default(EntityRef<Resource>);
    269       this._Job = default(EntityRef<Job>);
     269      this._Job = default(EntityRef<Task>);
    270270      OnCreated();
    271271    }
     
    296296   
    297297    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
    298     public System.Guid JobId
     298    public System.Guid TaskId
    299299    {
    300300      get
     
    310310            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    311311          }
    312           this.OnJobIdChanging(value);
     312          this.OnTaskIdChanging(value);
    313313          this.SendPropertyChanging();
    314314          this._JobId = value;
    315           this.SendPropertyChanged("JobId");
    316           this.OnJobIdChanged();
     315          this.SendPropertyChanged("TaskId");
     316          this.OnTaskIdChanged();
    317317        }
    318318      }
     
    353353    }
    354354   
    355     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]
    356     public Job Job
     355    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_AssignedResource", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true, DeleteRule="CASCADE")]
     356    public Task Task
    357357    {
    358358      get
     
    362362      set
    363363      {
    364         Job previousValue = this._Job.Entity;
     364        Task previousValue = this._Job.Entity;
    365365        if (((previousValue != value)
    366366              || (this._Job.HasLoadedOrAssignedValue == false)))
     
    376376          {
    377377            value.AssignedResources.Add(this);
    378             this._JobId = value.JobId;
     378            this._JobId = value.TaskId;
    379379          }
    380380          else
     
    382382            this._JobId = default(System.Guid);
    383383          }
    384           this.SendPropertyChanged("Job");
     384          this.SendPropertyChanged("Task");
    385385        }
    386386      }
     
    660660    private EntityRef<Plugin> _PluginInfo;
    661661   
    662     private EntityRef<Job> _Job;
     662    private EntityRef<Task> _Job;
    663663   
    664664    #region Extensibility Method Definitions
     
    668668    partial void OnRequiredPluginIdChanging(System.Guid value);
    669669    partial void OnRequiredPluginIdChanged();
    670     partial void OnJobIdChanging(System.Guid value);
    671     partial void OnJobIdChanged();
     670    partial void OnTaskIdChanging(System.Guid value);
     671    partial void OnTaskIdChanged();
    672672    partial void OnPluginIdChanging(System.Guid value);
    673673    partial void OnPluginIdChanged();
     
    677677    {
    678678      this._PluginInfo = default(EntityRef<Plugin>);
    679       this._Job = default(EntityRef<Job>);
     679      this._Job = default(EntityRef<Task>);
    680680      OnCreated();
    681681    }
     
    702702   
    703703    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
    704     public System.Guid JobId
     704    public System.Guid TaskId
    705705    {
    706706      get
     
    716716            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    717717          }
    718           this.OnJobIdChanging(value);
     718          this.OnTaskIdChanging(value);
    719719          this.SendPropertyChanging();
    720720          this._JobId = value;
    721           this.SendPropertyChanged("JobId");
    722           this.OnJobIdChanged();
     721          this.SendPropertyChanged("TaskId");
     722          this.OnTaskIdChanged();
    723723        }
    724724      }
     
    783783    }
    784784   
    785     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
    786     public Job Job
     785    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_RequiredPlugin", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
     786    public Task Task
    787787    {
    788788      get
     
    792792      set
    793793      {
    794         Job previousValue = this._Job.Entity;
     794        Task previousValue = this._Job.Entity;
    795795        if (((previousValue != value)
    796796              || (this._Job.HasLoadedOrAssignedValue == false)))
     
    806806          {
    807807            value.RequiredPlugins.Add(this);
    808             this._JobId = value.JobId;
     808            this._JobId = value.TaskId;
    809809          }
    810810          else
     
    812812            this._JobId = default(System.Guid);
    813813          }
    814           this.SendPropertyChanged("Job");
     814          this.SendPropertyChanged("Task");
    815815        }
    816816      }
     
    14461446  }
    14471447 
    1448   [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
    1449   public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
     1448  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Task")]
     1449  public partial class Task : INotifyPropertyChanging, INotifyPropertyChanged
    14501450  {
    14511451   
     
    14541454    private System.Guid _JobId;
    14551455   
    1456     private global::HeuristicLab.Services.Hive.DataAccess.JobState _State;
     1456    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
    14571457   
    14581458    private double _ExecutionTime;
     
    14821482    private EntitySet<RequiredPlugin> _RequiredPlugins;
    14831483   
    1484     private EntitySet<Job> _Jobs;
    1485    
    1486     private EntityRef<JobData> _JobData;
     1484    private EntitySet<Task> _Jobs;
     1485   
     1486    private EntityRef<TaskData> _JobData;
    14871487   
    14881488    private EntitySet<StateLog> _StateLogs;
    14891489   
    1490     private EntityRef<Job> _Job1;
     1490    private EntityRef<Task> _Job1;
    14911491   
    14921492    private EntityRef<HiveExperiment> _HiveExperiment;
     
    14961496    partial void OnValidate(System.Data.Linq.ChangeAction action);
    14971497    partial void OnCreated();
    1498     partial void OnJobIdChanging(System.Guid value);
    1499     partial void OnJobIdChanged();
    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);
    15011501    partial void OnStateChanged();
    15021502    partial void OnExecutionTimeMsChanging(double value);
     
    15041504    partial void OnLastHeartbeatChanging(System.Nullable<System.DateTime> value);
    15051505    partial void OnLastHeartbeatChanged();
    1506     partial void OnParentJobIdChanging(System.Nullable<System.Guid> value);
    1507     partial void OnParentJobIdChanged();
     1506    partial void OnParentTaskIdChanging(System.Nullable<System.Guid> value);
     1507    partial void OnParentTaskIdChanged();
    15081508    partial void OnPriorityChanging(int value);
    15091509    partial void OnPriorityChanged();
     
    15121512    partial void OnMemoryNeededChanging(int value);
    15131513    partial void OnMemoryNeededChanged();
    1514     partial void OnIsParentJobChanging(bool value);
    1515     partial void OnIsParentJobChanged();
     1514    partial void OnIsParentTaskChanging(bool value);
     1515    partial void OnIsParentTaskChanged();
    15161516    partial void OnFinishWhenChildJobsFinishedChanging(bool value);
    15171517    partial void OnFinishWhenChildJobsFinishedChanged();
     
    15241524    #endregion
    15251525   
    1526     public Job()
     1526    public Task()
    15271527    {
    15281528      this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources));
    15291529      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>);
    15321532      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>);
    15341534      this._HiveExperiment = default(EntityRef<HiveExperiment>);
    15351535      OnCreated();
     
    15371537   
    15381538    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
    1539     public System.Guid JobId
     1539    public System.Guid TaskId
    15401540    {
    15411541      get
     
    15471547        if ((this._JobId != value))
    15481548        {
    1549           this.OnJobIdChanging(value);
     1549          this.OnTaskIdChanging(value);
    15501550          this.SendPropertyChanging();
    15511551          this._JobId = value;
    1552           this.SendPropertyChanged("JobId");
    1553           this.OnJobIdChanged();
    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 State
     1552          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
    15601560    {
    15611561      get
     
    16171617   
    16181618    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
    1619     public System.Nullable<System.Guid> ParentJobId
     1619    public System.Nullable<System.Guid> ParentTaskId
    16201620    {
    16211621      get
     
    16311631            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    16321632          }
    1633           this.OnParentJobIdChanging(value);
     1633          this.OnParentTaskIdChanging(value);
    16341634          this.SendPropertyChanging();
    16351635          this._ParentJobId = value;
    1636           this.SendPropertyChanged("ParentJobId");
    1637           this.OnParentJobIdChanged();
     1636          this.SendPropertyChanged("ParentTaskId");
     1637          this.OnParentTaskIdChanged();
    16381638        }
    16391639      }
     
    17011701   
    17021702    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsParentJob", DbType="Bit")]
    1703     public bool IsParentJob
     1703    public bool IsParentTask
    17041704    {
    17051705      get
     
    17111711        if ((this._IsParentJob != value))
    17121712        {
    1713           this.OnIsParentJobChanging(value);
     1713          this.OnIsParentTaskChanging(value);
    17141714          this.SendPropertyChanging();
    17151715          this._IsParentJob = value;
    1716           this.SendPropertyChanged("IsParentJob");
    1717           this.OnIsParentJobChanged();
     1716          this.SendPropertyChanged("IsParentTask");
     1717          this.OnIsParentTaskChanged();
    17181718        }
    17191719      }
     
    18041804    }
    18051805   
    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")]
    18071807    public EntitySet<AssignedResource> AssignedResources
    18081808    {
     
    18171817    }
    18181818   
    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")]
    18201820    public EntitySet<RequiredPlugin> RequiredPlugins
    18211821    {
     
    18301830    }
    18311831   
    1832     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
    1833     public EntitySet<Job> ChildJobs
     1832    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Jobs", ThisKey="TaskId", OtherKey="ParentTaskId")]
     1833    public EntitySet<Task> ChildJobs
    18341834    {
    18351835      get
     
    18431843    }
    18441844   
    1845     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_JobData", ThisKey="JobId", OtherKey="JobId", IsUnique=true, IsForeignKey=false)]
    1846     public JobData JobData
     1845    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_JobData", ThisKey="TaskId", OtherKey="TaskId", IsUnique=true, IsForeignKey=false)]
     1846    public TaskData JobData
    18471847    {
    18481848      get
     
    18521852      set
    18531853      {
    1854         JobData previousValue = this._JobData.Entity;
     1854        TaskData previousValue = this._JobData.Entity;
    18551855        if (((previousValue != value)
    18561856              || (this._JobData.HasLoadedOrAssignedValue == false)))
     
    18601860          {
    18611861            this._JobData.Entity = null;
    1862             previousValue.Job = null;
     1862            previousValue.Task = null;
    18631863          }
    18641864          this._JobData.Entity = value;
    18651865          if ((value != null))
    18661866          {
    1867             value.Job = this;
     1867            value.Task = this;
    18681868          }
    18691869          this.SendPropertyChanged("JobData");
     
    18721872    }
    18731873   
    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")]
    18751875    public EntitySet<StateLog> StateLogs
    18761876    {
     
    18851885    }
    18861886   
    1887     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
    1888     public Job ParentJob
     1887    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_Task", Storage="_Job1", ThisKey="ParentTaskId", OtherKey="TaskId", IsForeignKey=true)]
     1888    public Task ParentJob
    18891889    {
    18901890      get
     
    18941894      set
    18951895      {
    1896         Job previousValue = this._Job1.Entity;
     1896        Task previousValue = this._Job1.Entity;
    18971897        if (((previousValue != value)
    18981898              || (this._Job1.HasLoadedOrAssignedValue == false)))
     
    19081908          {
    19091909            value.ChildJobs.Add(this);
    1910             this._ParentJobId = value.JobId;
     1910            this._ParentJobId = value.TaskId;
    19111911          }
    19121912          else
     
    19191919    }
    19201920   
    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)]
    19221922    public HiveExperiment HiveExperiment
    19231923    {
     
    19361936          {
    19371937            this._HiveExperiment.Entity = null;
    1938             previousValue.Jobs.Remove(this);
     1938            previousValue.Tasks.Remove(this);
    19391939          }
    19401940          this._HiveExperiment.Entity = value;
    19411941          if ((value != null))
    19421942          {
    1943             value.Jobs.Add(this);
     1943            value.Tasks.Add(this);
    19441944            this._HiveExperimentId = value.HiveExperimentId;
    19451945          }
     
    19761976    {
    19771977      this.SendPropertyChanging();
    1978       entity.Job = this;
     1978      entity.Task = this;
    19791979    }
    19801980   
     
    19821982    {
    19831983      this.SendPropertyChanging();
    1984       entity.Job = null;
     1984      entity.Task = null;
    19851985    }
    19861986   
     
    19881988    {
    19891989      this.SendPropertyChanging();
    1990       entity.Job = this;
     1990      entity.Task = this;
    19911991    }
    19921992   
     
    19941994    {
    19951995      this.SendPropertyChanging();
    1996       entity.Job = null;
    1997     }
    1998    
    1999     private void attach_Jobs(Job entity)
     1996      entity.Task = null;
     1997    }
     1998   
     1999    private void attach_Jobs(Task entity)
    20002000    {
    20012001      this.SendPropertyChanging();
     
    20032003    }
    20042004   
    2005     private void detach_Jobs(Job entity)
     2005    private void detach_Jobs(Task entity)
    20062006    {
    20072007      this.SendPropertyChanging();
     
    20122012    {
    20132013      this.SendPropertyChanging();
    2014       entity.Job = this;
     2014      entity.Task = this;
    20152015    }
    20162016   
     
    20182018    {
    20192019      this.SendPropertyChanging();
    2020       entity.Job = null;
     2020      entity.Task = null;
    20212021    }
    20222022  }
     
    22912291    private bool _IsHiveEngine;
    22922292   
    2293     private EntitySet<Job> _Jobs;
     2293    private EntitySet<Task> _Jobs;
    22942294   
    22952295    private EntitySet<HiveExperimentPermission> _HiveExperimentPermissions;
     
    23192319    public HiveExperiment()
    23202320    {
    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));
    23222322      this._HiveExperimentPermissions = new EntitySet<HiveExperimentPermission>(new Action<HiveExperimentPermission>(this.attach_HiveExperimentPermissions), new Action<HiveExperimentPermission>(this.detach_HiveExperimentPermissions));
    23232323      OnCreated();
     
    24842484    }
    24852485   
    2486     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_Job", Storage="_Jobs", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId")]
    2487     public EntitySet<Job> Jobs
     2486    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="HiveExperiment_Task", Storage="_Jobs", ThisKey="HiveExperimentId", OtherKey="HiveExperimentId")]
     2487    public EntitySet<Task> Tasks
    24882488    {
    24892489      get
     
    25302530    }
    25312531   
    2532     private void attach_Jobs(Job entity)
     2532    private void attach_Jobs(Task entity)
    25332533    {
    25342534      this.SendPropertyChanging();
     
    25362536    }
    25372537   
    2538     private void detach_Jobs(Job entity)
     2538    private void detach_Jobs(Task entity)
    25392539    {
    25402540      this.SendPropertyChanging();
     
    25552555  }
    25562556 
    2557   [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JobData")]
    2558   public partial class JobData : INotifyPropertyChanging, INotifyPropertyChanged
     2557  [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TaskData")]
     2558  public partial class TaskData : INotifyPropertyChanging, INotifyPropertyChanged
    25592559  {
    25602560   
     
    25672567    private System.DateTime _LastUpdate;
    25682568   
    2569     private EntityRef<Job> _Job;
     2569    private EntityRef<Task> _Job;
    25702570   
    25712571    #region Extensibility Method Definitions
     
    25732573    partial void OnValidate(System.Data.Linq.ChangeAction action);
    25742574    partial void OnCreated();
    2575     partial void OnJobIdChanging(System.Guid value);
    2576     partial void OnJobIdChanged();
     2575    partial void OnTaskIdChanging(System.Guid value);
     2576    partial void OnTaskIdChanged();
    25772577    partial void OnDataChanging(System.Data.Linq.Binary value);
    25782578    partial void OnDataChanged();
     
    25812581    #endregion
    25822582   
    2583     public JobData()
    2584     {
    2585       this._Job = default(EntityRef<Job>);
     2583    public TaskData()
     2584    {
     2585      this._Job = default(EntityRef<Task>);
    25862586      OnCreated();
    25872587    }
    25882588   
    25892589    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
    2590     public System.Guid JobId
     2590    public System.Guid TaskId
    25912591    {
    25922592      get
     
    26022602            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    26032603          }
    2604           this.OnJobIdChanging(value);
     2604          this.OnTaskIdChanging(value);
    26052605          this.SendPropertyChanging();
    26062606          this._JobId = value;
    2607           this.SendPropertyChanged("JobId");
    2608           this.OnJobIdChanged();
     2607          this.SendPropertyChanged("TaskId");
     2608          this.OnTaskIdChanged();
    26092609        }
    26102610      }
     
    26512651    }
    26522652   
    2653     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_JobData", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
    2654     public Job Job
     2653    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_TaskData", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
     2654    public Task Task
    26552655    {
    26562656      get
     
    26602660      set
    26612661      {
    2662         Job previousValue = this._Job.Entity;
     2662        Task previousValue = this._Job.Entity;
    26632663        if (((previousValue != value)
    26642664              || (this._Job.HasLoadedOrAssignedValue == false)))
     
    26742674          {
    26752675            value.JobData = this;
    2676             this._JobId = value.JobId;
     2676            this._JobId = value.TaskId;
    26772677          }
    26782678          else
     
    26802680            this._JobId = default(System.Guid);
    26812681          }
    2682           this.SendPropertyChanged("Job");
     2682          this.SendPropertyChanged("Task");
    26832683        }
    26842684      }
     
    28892889    private System.Guid _StateLogId;
    28902890   
    2891     private global::HeuristicLab.Services.Hive.DataAccess.JobState _State;
     2891    private global::HeuristicLab.Services.Hive.DataAccess.TaskState _State;
    28922892   
    28932893    private System.DateTime _DateTime;
     
    29012901    private string _Exception;
    29022902   
    2903     private EntityRef<Job> _Job;
     2903    private EntityRef<Task> _Job;
    29042904   
    29052905    private EntityRef<Resource> _Resource;
     
    29112911    partial void OnStateLogIdChanging(System.Guid value);
    29122912    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);
    29142914    partial void OnStateChanged();
    29152915    partial void OnDateTimeChanging(System.DateTime value);
    29162916    partial void OnDateTimeChanged();
    2917     partial void OnJobIdChanging(System.Guid value);
    2918     partial void OnJobIdChanged();
     2917    partial void OnTaskIdChanging(System.Guid value);
     2918    partial void OnTaskIdChanged();
    29192919    partial void OnUserIdChanging(System.Nullable<System.Guid> value);
    29202920    partial void OnUserIdChanged();
     
    29272927    public StateLog()
    29282928    {
    2929       this._Job = default(EntityRef<Job>);
     2929      this._Job = default(EntityRef<Task>);
    29302930      this._Resource = default(EntityRef<Resource>);
    29312931      OnCreated();
     
    29532953   
    29542954    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
    2955     public global::HeuristicLab.Services.Hive.DataAccess.JobState State
     2955    public global::HeuristicLab.Services.Hive.DataAccess.TaskState State
    29562956    {
    29572957      get
     
    29932993   
    29942994    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
    2995     public System.Guid JobId
     2995    public System.Guid TaskId
    29962996    {
    29972997      get
     
    30073007            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    30083008          }
    3009           this.OnJobIdChanging(value);
     3009          this.OnTaskIdChanging(value);
    30103010          this.SendPropertyChanging();
    30113011          this._JobId = value;
    3012           this.SendPropertyChanged("JobId");
    3013           this.OnJobIdChanged();
     3012          this.SendPropertyChanged("TaskId");
     3013          this.OnTaskIdChanged();
    30143014        }
    30153015      }
     
    30803080    }
    30813081   
    3082     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_StateLog", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
    3083     public Job Job
     3082    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Task_StateLog", Storage="_Job", ThisKey="TaskId", OtherKey="TaskId", IsForeignKey=true)]
     3083    public Task Task
    30843084    {
    30853085      get
     
    30893089      set
    30903090      {
    3091         Job previousValue = this._Job.Entity;
     3091        Task previousValue = this._Job.Entity;
    30923092        if (((previousValue != value)
    30933093              || (this._Job.HasLoadedOrAssignedValue == false)))
     
    31033103          {
    31043104            value.StateLogs.Add(this);
    3105             this._JobId = value.JobId;
     3105            this._JobId = value.TaskId;
    31063106          }
    31073107          else
     
    31093109            this._JobId = default(System.Guid);
    31103110          }
    3111           this.SendPropertyChanged("Job");
     3111          this.SendPropertyChanged("Task");
    31123112        }
    31133113      }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r6712 r6721  
    55CREATE TABLE [dbo].[AssignedResources](
    66  [ResourceId] UniqueIdentifier NOT NULL,
    7   [JobId] UniqueIdentifier NOT NULL,   
    8   CONSTRAINT [PK_dbo.ResourceIdJobId] PRIMARY KEY ([ResourceId], [JobId])
     7  [TaskId] UniqueIdentifier NOT NULL,   
     8  CONSTRAINT [PK_dbo.ResourceIdTaskId] PRIMARY KEY ([ResourceId], [TaskId])
    99  )
    1010CREATE TABLE [dbo].[Plugin](
     
    1919CREATE TABLE [dbo].[RequiredPlugins](
    2020  [RequiredPluginId] UniqueIdentifier NOT NULL,
    21   [JobId] UniqueIdentifier NOT NULL,
     21  [TaskId] UniqueIdentifier NOT NULL,
    2222  [PluginId] UniqueIdentifier NOT NULL,
    2323  CONSTRAINT [PK_dbo.RequiredPlugins] PRIMARY KEY ([RequiredPluginId])
     
    4242  CONSTRAINT [PK_dbo.Resource] PRIMARY KEY ([ResourceId])
    4343  )
    44 CREATE TABLE [dbo].[Job](
    45   [JobId] UniqueIdentifier NOT NULL,
    46   [JobState] VarChar(30),
     44CREATE TABLE [dbo].[Task](
     45  [TaskId] UniqueIdentifier NOT NULL,
     46  [TaskState] VarChar(30),
    4747  [ExecutionTimeMs] float,
    4848  [LastHeartbeat] DateTime,
    49   [ParentJobId] UniqueIdentifier,
     49  [ParentTaskId] UniqueIdentifier,
    5050  [Priority] Int NOT NULL,
    5151  [CoresNeeded] Int NOT NULL,
    5252  [MemoryNeeded] Int NOT NULL,
    53   [IsParentJob] Bit,
     53  [IsParentTask] Bit,
    5454  [FinishWhenChildJobsFinished] Bit,
    5555  [Command] VarChar(30),
    5656  [HiveExperimentId] UniqueIdentifier NOT NULL,
    5757  [IsPrivileged] Bit,
    58   CONSTRAINT [PK_dbo.Job] PRIMARY KEY ([JobId])
     58  CONSTRAINT [PK_dbo.Task] PRIMARY KEY ([TaskId])
    5959  )
    6060CREATE TABLE [dbo].[Downtime](
     
    7979  CONSTRAINT [PK_dbo.HiveExperiment] PRIMARY KEY ([HiveExperimentId])
    8080  )
    81 CREATE TABLE [dbo].[JobData](
    82   [JobId] UniqueIdentifier NOT NULL,
     81CREATE TABLE [dbo].[TaskData](
     82  [TaskId] UniqueIdentifier NOT NULL,
    8383  [Data] VarBinary(MAX),
    8484  [LastUpdate] DateTime,
    85   CONSTRAINT [PK_dbo.JobData] PRIMARY KEY ([JobId])
     85  CONSTRAINT [PK_dbo.TaskData] PRIMARY KEY ([TaskId])
    8686  )
    8787CREATE TABLE [dbo].[PluginData](
     
    9696  [State] VarChar(30) NOT NULL,
    9797  [DateTime] DateTime NOT NULL,
    98   [JobId] UniqueIdentifier NOT NULL,
     98  [TaskId] UniqueIdentifier NOT NULL,
    9999  [UserId] UniqueIdentifier,
    100100  [SlaveId] UniqueIdentifier,
     
    149149  ADD CONSTRAINT [Resource_AssignedResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId])
    150150ALTER 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])
    152152ALTER TABLE [dbo].[RequiredPlugins]
    153153  ADD CONSTRAINT [Plugin_RequiredPlugin] FOREIGN KEY ([PluginId]) REFERENCES [dbo].[Plugin]([PluginId])
    154154ALTER 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])
    156156ALTER TABLE [dbo].[Resource]
    157157  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]
     158ALTER TABLE [dbo].[Task]
     159  ADD CONSTRAINT [Task_Task] FOREIGN KEY ([ParentTaskId]) REFERENCES [dbo].[Task]([TaskId])
     160ALTER TABLE [dbo].[Task]
    161161  ADD CONSTRAINT [HiveExperiment_Job] FOREIGN KEY ([HiveExperimentId]) REFERENCES [dbo].[HiveExperiment]([HiveExperimentId])
    162162ALTER TABLE [dbo].[Downtime]
    163163  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])
     164ALTER TABLE [dbo].[TaskData]
     165  ADD CONSTRAINT [Task_TaskData] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId])
    166166ALTER TABLE [dbo].[PluginData]
    167167  ADD CONSTRAINT [Plugin_PluginData] FOREIGN KEY ([PluginId]) REFERENCES [dbo].[Plugin]([PluginId])
    168168ALTER 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])
    170170ALTER TABLE [dbo].[StateLog]
    171171  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  
    88
    99
    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])
     10ALTER TABLE [dbo].[AssignedResources]  DROP  CONSTRAINT [Task_AssignedResource]
     11ALTER TABLE [dbo].[AssignedResources]  WITH CHECK ADD  CONSTRAINT [Task_AssignedResource] FOREIGN KEY([TaskId])
     12REFERENCES [dbo].[Task] ([TaskId])
    1313ON UPDATE CASCADE
    1414ON DELETE CASCADE
     
    2121GO
    2222
    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])
     23ALTER TABLE dbo.Task ALTER COLUMN TaskId ADD ROWGUIDCOL;
     24ALTER TABLE dbo.Task WITH NOCHECK ADD CONSTRAINT [DF_Task_TaskId] DEFAULT (NEWSEQUENTIALID()) FOR TaskId;
     25GO
     26
     27ALTER TABLE [dbo].[StateLog]  DROP  CONSTRAINT [Task_StateLog]
     28ALTER TABLE [dbo].[StateLog]  WITH CHECK ADD CONSTRAINT [Task_StateLog] FOREIGN KEY([TaskId])
     29REFERENCES [dbo].[Task] ([TaskId])
    3030ON UPDATE CASCADE
    3131ON DELETE CASCADE
     
    5454ALTER TABLE dbo.RequiredPlugins WITH NOCHECK ADD CONSTRAINT [DF_RequiredPlugins_RequiredPluginId] DEFAULT (NEWSEQUENTIALID()) FOR RequiredPluginId;
    5555
    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])
     56ALTER TABLE [dbo].[RequiredPlugins]  DROP  CONSTRAINT [Task_RequiredPlugin]
     57ALTER TABLE [dbo].[RequiredPlugins]  WITH CHECK ADD  CONSTRAINT [Task_RequiredPlugin] FOREIGN KEY([TaskId])
     58REFERENCES [dbo].[Task] ([TaskId])
    5959ON UPDATE CASCADE
    6060ON DELETE CASCADE
     
    110110
    111111/* create indices */
    112 CREATE INDEX Index_RequiredPlugins_JobId ON RequiredPlugins(JobId);
     112CREATE INDEX Index_RequiredPlugins_TaskId ON RequiredPlugins(TaskId);
    113113GO
    114114
     
    120120CREATE VIEW [dbo].[view_FirstState]
    121121AS
    122 SELECT     sl.JobId, sl.DateTime, sl.State
     122SELECT     sl.TaskId, sl.DateTime, sl.State
    123123FROM         dbo.StateLog AS sl INNER JOIN
    124                           (SELECT     JobId, MIN(DateTime) AS DateTime
     124                          (SELECT     TaskId, MIN(DateTime) AS DateTime
    125125                            FROM          dbo.StateLog
    126                             GROUP BY JobId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.JobId = minDate.JobId
     126                            GROUP BY TaskId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.TaskId = minDate.TaskId
    127127
    128128GO
     
    134134CREATE VIEW [dbo].[view_LastState]
    135135AS
    136 SELECT     sl.JobId, sl.DateTime, sl.State
     136SELECT     sl.TaskId, sl.DateTime, sl.State
    137137FROM         dbo.StateLog AS sl INNER JOIN
    138                           (SELECT     JobId, MAX(DateTime) AS DateTime
     138                          (SELECT     TaskId, MAX(DateTime) AS DateTime
    139139                            FROM          dbo.StateLog
    140                             GROUP BY JobId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.JobId = minDate.JobId
     140                            GROUP BY TaskId) AS minDate ON sl.DateTime = minDate.DateTime AND sl.TaskId = minDate.TaskId
    141141GO
    142142
     
    176176CREATE TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS
    177177BEGIN
    178   DELETE Job FROM deleted, Job WHERE deleted.HiveExperimentId = Job.HiveExperimentId
     178  DELETE Task FROM deleted, Task WHERE deleted.HiveExperimentId = Task.HiveExperimentId
    179179  DELETE HiveExperiment FROM deleted, HiveExperiment WHERE deleted.HiveExperimentId = HiveExperiment.HiveExperimentId
    180180END
     
    186186-- 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/)
    187187-- =============================================
    188 CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[Job] INSTEAD OF DELETE AS
     188CREATE TRIGGER [dbo].[tr_JobDeleteCascade] ON [dbo].[Task] INSTEAD OF DELETE AS
    189189BEGIN
    190190  -- add statistics
     
    202202  WHERE
    203203    he.HiveExperimentId = j.HiveExperimentId AND
    204     fs.JobId = j.JobId AND
    205     ls.JobId = j.JobId
     204    fs.TaskId = j.TaskId AND
     205    ls.TaskId = j.TaskId
    206206  GROUP BY he.OwnerUserId
    207207
    208208  -- recursively delete jobs
    209209  CREATE TABLE #Table(
    210     JobId uniqueidentifier
     210    TaskId uniqueidentifier
    211211  )
    212   INSERT INTO #Table (JobId)
    213   SELECT JobId FROM deleted
     212  INSERT INTO #Table (TaskId)
     213  SELECT TaskId FROM deleted
    214214 
    215215  DECLARE @c INT
    216216  SET @c = 0
    217217 
    218   WHILE @c <> (SELECT COUNT(JobId) FROM #Table) BEGIN
    219     SELECT @c = COUNT(JobId) FROM #Table
     218  WHILE @c <> (SELECT COUNT(TaskId) FROM #Table) BEGIN
     219    SELECT @c = COUNT(TaskId) FROM #Table
    220220   
    221     INSERT INTO #Table (JobId)
    222       SELECT Job.JobId
    223       FROM Job
    224       LEFT OUTER JOIN #Table ON Job.JobId = #Table.JobId
    225       WHERE Job.ParentJobId IN (SELECT JobId FROM #Table)
    226         AND #Table.JobId IS NULL
     221    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
    227227  END
    228228 
    229   DELETE JobData FROM JobData INNER JOIN #Table ON JobData.JobId = #Table.JobId
    230   DELETE Job FROM Job INNER JOIN #Table ON Job.JobId = #Table.JobId
     229  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
    231231END
    232232GO
     
    235235-- Author:    cneumuel
    236236-- Create date: 17.05.2011
    237 -- Description: Writes the execution times of deleted jobs into DeletedJobStats to ensure correct statistics
    238 -- =============================================
    239 --CREATE TRIGGER [dbo].[tr_DeletedJobStats] ON [dbo].[Job] AFTER DELETE AS
     237-- 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
    240240--BEGIN
    241241
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Query Jobs.sql

    r6712 r6721  
    11/****** Script for SelectTopNRows command from SSMS  ******/
    2 SELECT j.[JobId]
    3       ,j.[JobState]
     2SELECT j.[TaskId]
     3      ,j.[TaskState]
    44      ,j.[ExecutionTimeMs]/1000/60/60 AS ExecutionTimeHours
    55      ,DATALENGTH(jd.data)/1024.0/1024.0 AS MB
     
    1313      ,j.[IsPrivileged]
    1414      ,j.[Command]
    15       ,j.[IsParentJob]   
     15      ,j.[IsParentTask]   
    1616      ,j.[FinishWhenChildJobsFinished]
    17       ,j.[ParentJobId]
     17      ,j.[ParentTaskId]
    1818      , he.HiveExperimentId
    1919  FROM
    20   [HeuristicLab.Hive-3.3].[dbo].[Job] j
     20  [HeuristicLab.Hive-3.3].[dbo].[Task] j
    2121  ,[HeuristicLab.Hive-3.3].[dbo].[HiveExperiment] he
    2222  ,[HeuristicLab.Authentication].dbo.aspnet_Users u
    23   ,[HeuristicLab.Hive-3.3].dbo.JobData jd
     23  ,[HeuristicLab.Hive-3.3].dbo.TaskData jd
    2424  WHERE
    2525  j.HiveExperimentId = he.HiveExperimentId
    26   AND j.JobId = jd.JobId
     26  AND j.TaskId = jd.TaskId
    2727  AND he.OwnerUserId = u.UserId
    2828  --AND he.DateCreated > '06-03-2011 10:30'
    2929 
    30 ORDER BY j.JobState, he.DateCreated DESC
     30ORDER BY j.TaskState, he.DateCreated DESC
Note: See TracChangeset for help on using the changeset viewer.