Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/15 18:06:19 (10 years ago)
Author:
dglaser
Message:

#2388: Updated Hive, DataAccess and WebApp

HeuristicLab.Services.Hive.DataAccess:

  • Updated database statistics schema

HeuristicLab.Services.Hive:

  • Fixed event flag in HiveJanitor Service
  • Improved UpdateTaskFactsTable in the HiveStatisticsGenerator

HeuristicLab.Services.WebApp:

  • Updated Statistics DataController to match the new statistics schema
Location:
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/GenericDao.cs

    r12468 r12484  
    108108    }
    109109
     110    public bool Exists(T entity) {
     111      return Table.Contains(entity);
     112    }
     113
    110114    public bool Exists(PK id) {
    111115      return GetById(id) != null;
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/SlaveDao.cs

    r12468 r12484  
    112112    }
    113113
     114    public bool Exists(Slave entity) {
     115      return Table.Contains(entity);
     116    }
     117
    114118    public bool Exists(Guid id) {
    115119      return GetById(id) != null;
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/SlaveGroupDao.cs

    r12468 r12484  
    111111    }
    112112
     113    public bool Exists(SlaveGroup entity) {
     114      return Table.Contains(entity);
     115    }
     116
    113117    public bool Exists(Guid id) {
    114118      return GetById(id) != null;
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r12477 r12484  
    225225    <Type Name="FactTask">
    226226      <Column Name="TaskId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
    227       <Column Name="TotalRuntime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    228       <Column Name="TotalWaitingTime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    229       <Column Name="TotalTransferTime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
     227      <Column Name="CalculatingTime" Storage="_TotalRuntime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
     228      <Column Name="WaitingTime" Storage="_TotalWaitingTime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
     229      <Column Name="TransferTime" Storage="_TotalTransferTime" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    230230      <Column Name="NumCalculationRuns" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
    231231      <Column Name="NumRetries" Storage="_NumFails" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
     
    235235      <Column Name="LastClientId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="true" />
    236236      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    237       <Column Name="StartTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
    238237      <Column Name="EndTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="true" />
    239238      <Column Name="TaskState" Type="global::HeuristicLab.Services.Hive.DataAccess.TaskState" DbType="varchar(30)" CanBeNull="false" />
    240239      <Column Name="Exception" Type="System.String" DbType="varchar(MAX)" CanBeNull="true" />
     240      <Column Name="InitialWaitingTime" Storage="_InitialWaitingTimeMs" Type="System.Double" CanBeNull="false" />
     241      <Column Name="StartTime" Type="System.DateTime" CanBeNull="true" />
    241242      <Association Name="DimClient_FactTask" Member="DimClient" ThisKey="LastClientId" OtherKey="Id" Type="DimClient" IsForeignKey="true" />
    242243      <Association Name="DimJob_FactTask" Member="DimJob" ThisKey="JobId" OtherKey="JobId" Type="DimJob" IsForeignKey="true" />
    243       <Association Name="DimTime_FactTask" Member="DimTimeEnd" Storage="_DimTime" ThisKey="EndTime" OtherKey="Time" Type="DimTime" IsForeignKey="true" />
    244       <Association Name="DimTime_FactTask1" Member="DimTimeStart" Storage="_DimTime1" ThisKey="StartTime" OtherKey="Time" Type="DimTime" IsForeignKey="true" />
    245244    </Type>
    246245  </Table>
     
    251250      <Column Name="JobName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    252251      <Column Name="UserName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    253       <Column Member="DateCreated" Type="System.DateTime" CanBeNull="false" />
     252      <Column Name="DateCreated" Type="System.DateTime" CanBeNull="false" />
    254253      <Association Name="DimJob_FactTask" Member="FactTasks" ThisKey="JobId" OtherKey="JobId" Type="FactTask" />
    255254    </Type>
     
    262261      <Column Name="Month" Type="System.DateTime" DbType="Date NOT NULL" CanBeNull="false" />
    263262      <Column Name="Year" Type="System.DateTime" DbType="Date NOT NULL" CanBeNull="false" />
    264       <Association Name="DimTime_FactTask" Member="FactTasks" ThisKey="Time" OtherKey="EndTime" Type="FactTask" />
    265       <Association Name="DimTime_FactTask1" Member="FactTasks1" ThisKey="Time" OtherKey="StartTime" Type="FactTask" />
     263      <Column Name="Minute" Type="System.DateTime" CanBeNull="false" />
    266264      <Association Name="DimTime_FactClientInfo" Member="FactClientInfos" ThisKey="Time" OtherKey="Time" Type="FactClientInfo" />
    267265    </Type>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r12477 r12484  
    253253      </nestedChildShapes>
    254254    </classShape>
    255     <classShape Id="04f52807-ce17-4d65-bd23-cc38c6dfbd7a" absoluteBounds="6.875, 11.25, 2, 3.6939111328125005">
     255    <classShape Id="04f52807-ce17-4d65-bd23-cc38c6dfbd7a" absoluteBounds="6.875, 11.25, 2, 3.8862125651041666">
    256256      <DataClassMoniker Name="/HiveDataContext/FactTask" />
    257257      <nestedChildShapes>
    258         <elementListCompartment Id="63e3ddcb-a6fe-48e0-a674-e650a55a9f2c" absoluteBounds="6.8900000000000006, 11.71, 1.9700000000000002, 3.1339111328125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     258        <elementListCompartment Id="63e3ddcb-a6fe-48e0-a674-e650a55a9f2c" absoluteBounds="6.8900000000000006, 11.71, 1.9700000000000002, 3.3262125651041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    259259      </nestedChildShapes>
    260260    </classShape>
     
    265265      </nestedChildShapes>
    266266    </classShape>
    267     <classShape Id="a769f2ac-c8e3-4860-baa5-c46f46c38ed8" absoluteBounds="3.625, 8.5, 2, 1.7708968098958344">
     267    <classShape Id="a769f2ac-c8e3-4860-baa5-c46f46c38ed8" absoluteBounds="3.625, 8.5, 2, 1.9631982421875005">
    268268      <DataClassMoniker Name="/HiveDataContext/DimTime" />
    269269      <nestedChildShapes>
    270         <elementListCompartment Id="694c4a5a-20fb-43a9-bc9a-7b59d794a7fb" absoluteBounds="3.6399999999999997, 8.96, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     270        <elementListCompartment Id="694c4a5a-20fb-43a9-bc9a-7b59d794a7fb" absoluteBounds="3.6399999999999997, 8.96, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    271271      </nestedChildShapes>
    272272    </classShape>
     
    283283      </nestedChildShapes>
    284284    </classShape>
    285     <associationConnector edgePoints="[(6.625 : 15.25); (6.875 : 14.9439111328125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     285    <associationConnector edgePoints="[(6.625 : 15.25); (6.875 : 15.1362125651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    286286      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactTask" />
    287287      <nodes>
     
    290290      </nodes>
    291291    </associationConnector>
    292     <associationConnector edgePoints="[(8.5 : 10.8958968098958); (8.5 : 11.25)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     292    <associationConnector edgePoints="[(8.5 : 10.8958968098958); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    293293      <AssociationMoniker Name="/HiveDataContext/DimJob/DimJob_FactTask" />
    294294      <nodes>
     
    297297      </nodes>
    298298    </associationConnector>
    299     <associationConnector edgePoints="[(5.02343625 : 10.2708968098958); (5.02343625 : 14.7227579166667); (5.90885291666667 : 14.7227579166667 : JumpStart); (6.07551958333333 : 14.7227579166667 : JumpEnd); (6.875 : 14.7227579166667)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    300       <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactTask" />
    301       <nodes>
    302         <classShapeMoniker Id="a769f2ac-c8e3-4860-baa5-c46f46c38ed8" />
    303         <classShapeMoniker Id="04f52807-ce17-4d65-bd23-cc38c6dfbd7a" />
    304       </nodes>
    305     </associationConnector>
    306     <associationConnector edgePoints="[(5.4218775 : 10.2708968098958); (5.4218775 : 13.3576659570313); (5.90885291666667 : 13.3576659570313 : JumpStart); (6.07551958333333 : 13.3576659570313 : JumpEnd); (6.71675495975 : 13.3576659570313); (6.71675495975 : 13.3568567264325); (6.875 : 13.3568567264325)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">
    307       <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactTask1" />
    308       <nodes>
    309         <classShapeMoniker Id="a769f2ac-c8e3-4860-baa5-c46f46c38ed8" />
    310         <classShapeMoniker Id="04f52807-ce17-4d65-bd23-cc38c6dfbd7a" />
    311       </nodes>
    312     </associationConnector>
    313     <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (5.50521083333333 : 12.1788329785157 : JumpStart); (5.33854416666667 : 12.1788329785157 : JumpEnd); (5.10676958333333 : 12.1788329785157 : JumpStart); (4.94010291666667 : 12.1788329785157 : JumpEnd); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     299    <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    314300      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
    315301      <nodes>
     
    318304      </nodes>
    319305    </associationConnector>
    320     <associationConnector edgePoints="[(4.125 : 10.2708968098958); (4.125 : 11)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     306    <associationConnector edgePoints="[(4.125 : 10.4631982421875); (4.125 : 11)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    321307      <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactClientInfo" />
    322308      <nodes>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r12477 r12484  
    48674867    private System.Guid _JobId;
    48684868   
    4869     private System.DateTime _StartTime;
    4870    
    48714869    private System.Nullable<System.DateTime> _EndTime;
    48724870   
     
    48754873    private string _Exception;
    48764874   
     4875    private double _InitialWaitingTimeMs;
     4876   
     4877    private System.Nullable<System.DateTime> _StartTime;
     4878   
    48774879    private EntityRef<DimClient> _DimClient;
    48784880   
    48794881    private EntityRef<DimJob> _DimJob;
    4880    
    4881     private EntityRef<DimTime> _DimTime;
    4882    
    4883     private EntityRef<DimTime> _DimTime1;
    48844882   
    48854883    #region Extensibility Method Definitions
     
    48894887    partial void OnTaskIdChanging(System.Guid value);
    48904888    partial void OnTaskIdChanged();
    4891     partial void OnTotalRuntimeChanging(double value);
    4892     partial void OnTotalRuntimeChanged();
    4893     partial void OnTotalWaitingTimeChanging(double value);
    4894     partial void OnTotalWaitingTimeChanged();
    4895     partial void OnTotalTransferTimeChanging(double value);
    4896     partial void OnTotalTransferTimeChanged();
     4889    partial void OnCalculatingTimeChanging(double value);
     4890    partial void OnCalculatingTimeChanged();
     4891    partial void OnWaitingTimeChanging(double value);
     4892    partial void OnWaitingTimeChanged();
     4893    partial void OnTransferTimeChanging(double value);
     4894    partial void OnTransferTimeChanged();
    48974895    partial void OnNumCalculationRunsChanging(int value);
    48984896    partial void OnNumCalculationRunsChanged();
     
    49094907    partial void OnJobIdChanging(System.Guid value);
    49104908    partial void OnJobIdChanged();
    4911     partial void OnStartTimeChanging(System.DateTime value);
    4912     partial void OnStartTimeChanged();
    49134909    partial void OnEndTimeChanging(System.Nullable<System.DateTime> value);
    49144910    partial void OnEndTimeChanged();
     
    49174913    partial void OnExceptionChanging(string value);
    49184914    partial void OnExceptionChanged();
     4915    partial void OnInitialWaitingTimeChanging(double value);
     4916    partial void OnInitialWaitingTimeChanged();
     4917    partial void OnStartTimeChanging(System.Nullable<System.DateTime> value);
     4918    partial void OnStartTimeChanged();
    49194919    #endregion
    49204920   
     
    49234923      this._DimClient = default(EntityRef<DimClient>);
    49244924      this._DimJob = default(EntityRef<DimJob>);
    4925       this._DimTime = default(EntityRef<DimTime>);
    4926       this._DimTime1 = default(EntityRef<DimTime>);
    49274925      OnCreated();
    49284926    }
     
    49494947   
    49504948    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRuntime", DbType="Float NOT NULL")]
    4951     public double TotalRuntime
     4949    public double CalculatingTime
    49524950    {
    49534951      get
     
    49594957        if ((this._TotalRuntime != value))
    49604958        {
    4961           this.OnTotalRuntimeChanging(value);
     4959          this.OnCalculatingTimeChanging(value);
    49624960          this.SendPropertyChanging();
    49634961          this._TotalRuntime = value;
    4964           this.SendPropertyChanged("TotalRuntime");
    4965           this.OnTotalRuntimeChanged();
     4962          this.SendPropertyChanged("CalculatingTime");
     4963          this.OnCalculatingTimeChanged();
    49664964        }
    49674965      }
     
    49694967   
    49704968    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWaitingTime", DbType="Float NOT NULL")]
    4971     public double TotalWaitingTime
     4969    public double WaitingTime
    49724970    {
    49734971      get
     
    49794977        if ((this._TotalWaitingTime != value))
    49804978        {
    4981           this.OnTotalWaitingTimeChanging(value);
     4979          this.OnWaitingTimeChanging(value);
    49824980          this.SendPropertyChanging();
    49834981          this._TotalWaitingTime = value;
    4984           this.SendPropertyChanged("TotalWaitingTime");
    4985           this.OnTotalWaitingTimeChanged();
     4982          this.SendPropertyChanged("WaitingTime");
     4983          this.OnWaitingTimeChanged();
    49864984        }
    49874985      }
     
    49894987   
    49904988    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTransferTime", DbType="Float NOT NULL")]
    4991     public double TotalTransferTime
     4989    public double TransferTime
    49924990    {
    49934991      get
     
    49994997        if ((this._TotalTransferTime != value))
    50004998        {
    5001           this.OnTotalTransferTimeChanging(value);
     4999          this.OnTransferTimeChanging(value);
    50025000          this.SendPropertyChanging();
    50035001          this._TotalTransferTime = value;
    5004           this.SendPropertyChanged("TotalTransferTime");
    5005           this.OnTotalTransferTimeChanged();
     5002          this.SendPropertyChanged("TransferTime");
     5003          this.OnTransferTimeChanged();
    50065004        }
    50075005      }
     
    51565154    }
    51575155   
    5158     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime", DbType="DateTime NOT NULL")]
    5159     public System.DateTime StartTime
     5156    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="DateTime NOT NULL")]
     5157    public System.Nullable<System.DateTime> EndTime
     5158    {
     5159      get
     5160      {
     5161        return this._EndTime;
     5162      }
     5163      set
     5164      {
     5165        if ((this._EndTime != value))
     5166        {
     5167          this.OnEndTimeChanging(value);
     5168          this.SendPropertyChanging();
     5169          this._EndTime = value;
     5170          this.SendPropertyChanged("EndTime");
     5171          this.OnEndTimeChanged();
     5172        }
     5173      }
     5174    }
     5175   
     5176    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskState", DbType="varchar(30)", CanBeNull=false)]
     5177    public global::HeuristicLab.Services.Hive.DataAccess.TaskState TaskState
     5178    {
     5179      get
     5180      {
     5181        return this._TaskState;
     5182      }
     5183      set
     5184      {
     5185        if ((this._TaskState != value))
     5186        {
     5187          this.OnTaskStateChanging(value);
     5188          this.SendPropertyChanging();
     5189          this._TaskState = value;
     5190          this.SendPropertyChanged("TaskState");
     5191          this.OnTaskStateChanged();
     5192        }
     5193      }
     5194    }
     5195   
     5196    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="varchar(MAX)")]
     5197    public string Exception
     5198    {
     5199      get
     5200      {
     5201        return this._Exception;
     5202      }
     5203      set
     5204      {
     5205        if ((this._Exception != value))
     5206        {
     5207          this.OnExceptionChanging(value);
     5208          this.SendPropertyChanging();
     5209          this._Exception = value;
     5210          this.SendPropertyChanged("Exception");
     5211          this.OnExceptionChanged();
     5212        }
     5213      }
     5214    }
     5215   
     5216    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InitialWaitingTimeMs")]
     5217    public double InitialWaitingTime
     5218    {
     5219      get
     5220      {
     5221        return this._InitialWaitingTimeMs;
     5222      }
     5223      set
     5224      {
     5225        if ((this._InitialWaitingTimeMs != value))
     5226        {
     5227          this.OnInitialWaitingTimeChanging(value);
     5228          this.SendPropertyChanging();
     5229          this._InitialWaitingTimeMs = value;
     5230          this.SendPropertyChanged("InitialWaitingTime");
     5231          this.OnInitialWaitingTimeChanged();
     5232        }
     5233      }
     5234    }
     5235   
     5236    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime")]
     5237    public System.Nullable<System.DateTime> StartTime
    51605238    {
    51615239      get
     
    51675245        if ((this._StartTime != value))
    51685246        {
    5169           if (this._DimTime1.HasLoadedOrAssignedValue)
    5170           {
    5171             throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    5172           }
    51735247          this.OnStartTimeChanging(value);
    51745248          this.SendPropertyChanging();
     
    51805254    }
    51815255   
    5182     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="DateTime NOT NULL")]
    5183     public System.Nullable<System.DateTime> EndTime
    5184     {
    5185       get
    5186       {
    5187         return this._EndTime;
    5188       }
    5189       set
    5190       {
    5191         if ((this._EndTime != value))
    5192         {
    5193           if (this._DimTime.HasLoadedOrAssignedValue)
    5194           {
    5195             throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
    5196           }
    5197           this.OnEndTimeChanging(value);
    5198           this.SendPropertyChanging();
    5199           this._EndTime = value;
    5200           this.SendPropertyChanged("EndTime");
    5201           this.OnEndTimeChanged();
    5202         }
    5203       }
    5204     }
    5205    
    5206     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaskState", DbType="varchar(30)", CanBeNull=false)]
    5207     public global::HeuristicLab.Services.Hive.DataAccess.TaskState TaskState
    5208     {
    5209       get
    5210       {
    5211         return this._TaskState;
    5212       }
    5213       set
    5214       {
    5215         if ((this._TaskState != value))
    5216         {
    5217           this.OnTaskStateChanging(value);
    5218           this.SendPropertyChanging();
    5219           this._TaskState = value;
    5220           this.SendPropertyChanged("TaskState");
    5221           this.OnTaskStateChanged();
    5222         }
    5223       }
    5224     }
    5225    
    5226     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="varchar(MAX)")]
    5227     public string Exception
    5228     {
    5229       get
    5230       {
    5231         return this._Exception;
    5232       }
    5233       set
    5234       {
    5235         if ((this._Exception != value))
    5236         {
    5237           this.OnExceptionChanging(value);
    5238           this.SendPropertyChanging();
    5239           this._Exception = value;
    5240           this.SendPropertyChanged("Exception");
    5241           this.OnExceptionChanged();
    5242         }
    5243       }
    5244     }
    5245    
    52465256    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactTask", Storage="_DimClient", ThisKey="LastClientId", OtherKey="Id", IsForeignKey=true)]
    52475257    public DimClient DimClient
     
    53085318          }
    53095319          this.SendPropertyChanged("DimJob");
    5310         }
    5311       }
    5312     }
    5313    
    5314     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_DimTime", ThisKey="EndTime", OtherKey="Time", IsForeignKey=true)]
    5315     public DimTime DimTimeEnd
    5316     {
    5317       get
    5318       {
    5319         return this._DimTime.Entity;
    5320       }
    5321       set
    5322       {
    5323         DimTime previousValue = this._DimTime.Entity;
    5324         if (((previousValue != value)
    5325               || (this._DimTime.HasLoadedOrAssignedValue == false)))
    5326         {
    5327           this.SendPropertyChanging();
    5328           if ((previousValue != null))
    5329           {
    5330             this._DimTime.Entity = null;
    5331             previousValue.FactTasks.Remove(this);
    5332           }
    5333           this._DimTime.Entity = value;
    5334           if ((value != null))
    5335           {
    5336             value.FactTasks.Add(this);
    5337             this._EndTime = value.Time;
    5338           }
    5339           else
    5340           {
    5341             this._EndTime = default(Nullable<System.DateTime>);
    5342           }
    5343           this.SendPropertyChanged("DimTimeEnd");
    5344         }
    5345       }
    5346     }
    5347    
    5348     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_DimTime1", ThisKey="StartTime", OtherKey="Time", IsForeignKey=true)]
    5349     public DimTime DimTimeStart
    5350     {
    5351       get
    5352       {
    5353         return this._DimTime1.Entity;
    5354       }
    5355       set
    5356       {
    5357         DimTime previousValue = this._DimTime1.Entity;
    5358         if (((previousValue != value)
    5359               || (this._DimTime1.HasLoadedOrAssignedValue == false)))
    5360         {
    5361           this.SendPropertyChanging();
    5362           if ((previousValue != null))
    5363           {
    5364             this._DimTime1.Entity = null;
    5365             previousValue.FactTasks1.Remove(this);
    5366           }
    5367           this._DimTime1.Entity = value;
    5368           if ((value != null))
    5369           {
    5370             value.FactTasks1.Add(this);
    5371             this._StartTime = value.Time;
    5372           }
    5373           else
    5374           {
    5375             this._StartTime = default(System.DateTime);
    5376           }
    5377           this.SendPropertyChanged("DimTimeStart");
    53785320        }
    53795321      }
     
    56035545    private System.DateTime _Year;
    56045546   
    5605     private EntitySet<FactTask> _FactTasks;
    5606    
    5607     private EntitySet<FactTask> _FactTasks1;
     5547    private System.DateTime _Minute;
    56085548   
    56095549    private EntitySet<FactClientInfo> _FactClientInfos;
     
    56235563    partial void OnYearChanging(System.DateTime value);
    56245564    partial void OnYearChanged();
     5565    partial void OnMinuteChanging(System.DateTime value);
     5566    partial void OnMinuteChanged();
    56255567    #endregion
    56265568   
    56275569    public DimTime()
    56285570    {
    5629       this._FactTasks = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks), new Action<FactTask>(this.detach_FactTasks));
    5630       this._FactTasks1 = new EntitySet<FactTask>(new Action<FactTask>(this.attach_FactTasks1), new Action<FactTask>(this.detach_FactTasks1));
    56315571      this._FactClientInfos = new EntitySet<FactClientInfo>(new Action<FactClientInfo>(this.attach_FactClientInfos), new Action<FactClientInfo>(this.detach_FactClientInfos));
    56325572      OnCreated();
     
    57335673    }
    57345674   
    5735     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask", Storage="_FactTasks", ThisKey="Time", OtherKey="EndTime")]
    5736     public EntitySet<FactTask> FactTasks
    5737     {
    5738       get
    5739       {
    5740         return this._FactTasks;
    5741       }
    5742       set
    5743       {
    5744         this._FactTasks.Assign(value);
    5745       }
    5746     }
    5747    
    5748     [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimTime_FactTask1", Storage="_FactTasks1", ThisKey="Time", OtherKey="StartTime")]
    5749     public EntitySet<FactTask> FactTasks1
    5750     {
    5751       get
    5752       {
    5753         return this._FactTasks1;
    5754       }
    5755       set
    5756       {
    5757         this._FactTasks1.Assign(value);
     5675    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Minute")]
     5676    public System.DateTime Minute
     5677    {
     5678      get
     5679      {
     5680        return this._Minute;
     5681      }
     5682      set
     5683      {
     5684        if ((this._Minute != value))
     5685        {
     5686          this.OnMinuteChanging(value);
     5687          this.SendPropertyChanging();
     5688          this._Minute = value;
     5689          this.SendPropertyChanged("Minute");
     5690          this.OnMinuteChanged();
     5691        }
    57585692      }
    57595693    }
     
    57905724        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    57915725      }
    5792     }
    5793    
    5794     private void attach_FactTasks(FactTask entity)
    5795     {
    5796       this.SendPropertyChanging();
    5797       entity.DimTimeEnd = this;
    5798     }
    5799    
    5800     private void detach_FactTasks(FactTask entity)
    5801     {
    5802       this.SendPropertyChanging();
    5803       entity.DimTimeEnd = null;
    5804     }
    5805    
    5806     private void attach_FactTasks1(FactTask entity)
    5807     {
    5808       this.SendPropertyChanging();
    5809       entity.DimTimeStart = this;
    5810     }
    5811    
    5812     private void detach_FactTasks1(FactTask entity)
    5813     {
    5814       this.SendPropertyChanging();
    5815       entity.DimTimeStart = null;
    58165726    }
    58175727   
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IGenericDao.cs

    r12468 r12484  
    4040    void Delete(T entity);
    4141    void Delete(IEnumerable<T> entities);
     42    bool Exists(T entity);
    4243    bool Exists(PK id);
    4344  }
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r12477 r12484  
    202202
    203203CREATE TABLE [statistics].[DimTime] (
    204     [Time]  DATETIME NOT NULL,
    205     [Hour]  DATETIME NOT NULL,
    206     [Day]   DATE     NOT NULL,
    207     [Month] DATE     NOT NULL,
    208     [Year]  DATE     NOT NULL,
     204    [Time]   DATETIME NOT NULL,
     205    [Minute] DATETIME NOT NULL,
     206    [Hour]   DATETIME NOT NULL,
     207    [Day]    DATE     NOT NULL,
     208    [Month]  DATE     NOT NULL,
     209    [Year]   DATE     NOT NULL,
    209210    CONSTRAINT [PK_DimTime] PRIMARY KEY CLUSTERED ([Time] ASC)
    210211);
     
    223224    [JobName]     VARCHAR (MAX)    NOT NULL,
    224225    [UserName]    VARCHAR (MAX)    NOT NULL,
    225   [DateCreated] DATETIME       NOT NULL,
     226    [DateCreated] DATETIME       NOT NULL,
    226227    CONSTRAINT [PK_DimJob] PRIMARY KEY CLUSTERED ([JobId] ASC)
    227228);
     
    252253);
    253254CREATE TABLE [statistics].[FactTask] (
    254     [TaskId]             UNIQUEIDENTIFIER NOT NULL,
    255     [TotalRuntime]       FLOAT (53)       NOT NULL,
    256     [TotalWaitingTime]   FLOAT (53)       NOT NULL,
    257     [TotalTransferTime]  FLOAT (53)       NOT NULL,
    258     [NumCalculationRuns] INT              NOT NULL,
    259     [NumRetries]         INT              NOT NULL,
    260     [CoresRequired]      INT              NOT NULL,
    261     [MemoryRequired]     INT              NOT NULL,
    262     [Priority]           INT              NOT NULL,
    263     [LastClientId]       UNIQUEIDENTIFIER NULL,
    264     [JobId]              UNIQUEIDENTIFIER NOT NULL,
    265     [StartTime]          DATETIME         NOT NULL,
    266     [EndTime]            DATETIME         NULL,
    267     [TaskState]          VARCHAR (30)     NOT NULL,
    268     [Exception]      VARCHAR (MAX)    NULL,
     255    [TaskId]         UNIQUEIDENTIFIER NOT NULL,
     256    [CalculatingTime]    FLOAT (53)       NOT NULL,
     257    [WaitingTime]      FLOAT (53)       NOT NULL,
     258    [TransferTime]         FLOAT (53)       NOT NULL,
     259    [NumCalculationRuns]   INT              NOT NULL,
     260    [NumRetries]       INT              NOT NULL,
     261    [CoresRequired]      INT              NOT NULL,
     262    [MemoryRequired]     INT              NOT NULL,
     263    [Priority]         INT              NOT NULL,
     264    [LastClientId]       UNIQUEIDENTIFIER NULL,
     265    [JobId]          UNIQUEIDENTIFIER NOT NULL,
     266    [StartTime]            DATETIME         NULL,
     267    [EndTime]        DATETIME         NULL,
     268    [TaskState]        VARCHAR (30)     NOT NULL,
     269    [Exception]        VARCHAR (MAX)  NULL,
     270    [InitialWaitingTime]   FLOAT (53)       NULL,
    269271    CONSTRAINT [PK_FactTask] PRIMARY KEY CLUSTERED ([TaskId] ASC),
    270272    CONSTRAINT [FK_FactTask_DimClient] FOREIGN KEY ([LastClientId]) REFERENCES [statistics].[DimClient] ([Id]),
    271     CONSTRAINT [FK_FactTask_DimJob] FOREIGN KEY ([JobId]) REFERENCES [statistics].[DimJob] ([JobId]),
    272     CONSTRAINT [FK_FactTask_DimTimeStart] FOREIGN KEY ([StartTime]) REFERENCES [statistics].[DimTime] ([Time]),
    273     CONSTRAINT [FK_FactTask_DimTimeEnd] FOREIGN KEY ([EndTime]) REFERENCES [statistics].[DimTime] ([Time])
     273    CONSTRAINT [FK_FactTask_DimJob] FOREIGN KEY ([JobId]) REFERENCES [statistics].[DimJob] ([JobId])
    274274);
    275275
Note: See TracChangeset for help on using the changeset viewer.