Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 16:38:28 (13 years ago)
Author:
ascheibe
Message:

#1233 more renaming for more consistency

Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Convert.cs

    r6723 r6725  
    4444        State = Convert.ToDto(source.State),
    4545        StateLog = (source.StateLogs == null ? new List<DT.StateLog>() : source.StateLogs.Select(x => Convert.ToDto(x)).OrderBy(x => x.DateTime).ToList()),
    46         IsParentJob = source.IsParentTask,
     46        IsParentTask = source.IsParentTask,
    4747        FinishWhenChildJobsFinished = source.FinishWhenChildJobsFinished,
    4848        Command = Convert.ToDto(source.Command),
     
    7272          target.StateLogs.Add(Convert.ToEntity(sl));
    7373        }
    74         target.IsParentTask = source.IsParentJob;
     74        target.IsParentTask = source.IsParentTask;
    7575        target.FinishWhenChildJobsFinished = source.FinishWhenChildJobsFinished;
    7676        target.Command = Convert.ToEntity(source.Command);
     
    8282    #endregion
    8383
    84     #region JobData
     84    #region TaskData
    8585    public static DT.TaskData ToDto(DB.TaskData source) {
    8686      if (source == null) return null;
     
    133133    #endregion
    134134
    135     #region HiveExperiment
     135    #region Job
    136136    public static DT.Job ToDto(DB.Job source) {
    137137      if (source == null) return null;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/DataTransfer/Task.cs

    r6723 r6725  
    3939    public DateTime? LastHeartbeat { get; set; }
    4040    [DataMember]
    41     public bool IsParentJob { get; set; }
     41    public bool IsParentTask { get; set; }
    4242    [DataMember]
    4343    public bool FinishWhenChildJobsFinished { get; set; }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs

    r6723 r6725  
    150150    #endregion
    151151
    152     #region JobData Methods
     152    #region TaskData Methods
    153153    public DT.TaskData GetJobData(Guid id) {
    154154      using (var db = CreateContext(true)) {
     
    230230    #endregion
    231231
    232     #region HiveExperiment Methods
     232    #region Job Methods
    233233    public DT.Job GetHiveExperiment(Guid id) {
    234234      using (var db = CreateContext()) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs

    r6723 r6725  
    196196    #endregion
    197197
    198     #region Job Control Methods
     198    #region Task Control Methods
    199199    public void StopJob(Guid jobId) {
    200200      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave);
     
    238238    #endregion
    239239
    240     #region HiveExperiment Methods
     240    #region Job Methods
    241241    public Job GetHiveExperiment(Guid id) {
    242242      authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IHiveDao.cs

    r6723 r6725  
    2828namespace HeuristicLab.Services.Hive {
    2929  public interface IHiveDao {
    30     #region Job Methods
     30    #region Task Methods
    3131    DT.Task GetJob(Guid id);
    3232    IEnumerable<DT.Task> GetJobs(Expression<Func<Task, bool>> predicate);
     
    3939    #endregion
    4040
    41     #region JobData Methods
     41    #region TaskData Methods
    4242    DT.TaskData GetJobData(Guid id);
    4343    IEnumerable<DT.TaskData> GetJobDatas(Expression<Func<TaskData, bool>> predicate);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs

    r6721 r6725  
    6363            var job = availableJobs.First();
    6464            if (AssignJob(slave, job))
    65               actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateJob, job.Id));
     65              actions.Add(new MessageContainer(MessageContainer.MessageType.CalculateTask, job.Id));
    6666          }
    6767        }
     
    101101          if (curJob == null) {
    102102            // job does not exist in db
    103             actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key));
     103            actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, jobProgress.Key));
    104104            DA.LogFactory.GetLogger(this.GetType().Namespace).Log("Job does not exist in DB: " + jobProgress.Key);
    105105          } else {
    106106            if (curJob.CurrentStateLog.SlaveId == Guid.Empty || curJob.CurrentStateLog.SlaveId != heartbeat.SlaveId) {
    107107              // assigned slave does not match heartbeat
    108               actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
     108              actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curJob.Id));
    109109              DA.LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob);
    110110            } else if (!JobIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curJob)) {
    111111              // assigned resources ids of job do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group
    112               actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id));
     112              actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curJob.Id));
    113113            } else {
    114114              // save job execution time
     
    118118              switch (curJob.Command) {
    119119                case Command.Stop:
    120                   actions.Add(new MessageContainer(MessageContainer.MessageType.StopJob, curJob.Id));
     120                  actions.Add(new MessageContainer(MessageContainer.MessageType.StopTask, curJob.Id));
    121121                  break;
    122122                case Command.Pause:
    123                   actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id));
     123                  actions.Add(new MessageContainer(MessageContainer.MessageType.PauseTask, curJob.Id));
    124124                  break;
    125125                case Command.Abort:
    126                   actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
     126                  actions.Add(new MessageContainer(MessageContainer.MessageType.AbortTask, curJob.Id));
    127127                  break;
    128128              }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/MessageContainer.cs

    r6721 r6725  
    3737    public enum MessageType {
    3838      // *** commands from hive server ***
    39       CalculateJob, // slave should calculate a job. the job is already assigned to the slave
    40       StopJob,   // slave should stop the job and submit results
     39      CalculateTask, // slave should calculate a job. the job is already assigned to the slave
     40      StopTask,   // slave should stop the job and submit results
    4141      StopAll,   // stop all and submit results
    42       AbortJob,  // slave should shut the job down immediately without submitting results
     42      AbortTask,  // slave should shut the job down immediately without submitting results
    4343      AbortAll,  // slave should abort all jobs immediately
    44       PauseJob,  // pause the job and submit the results   
     44      PauseTask,  // pause the job and submit the results   
    4545      PauseAll,  // pause all jobs and submit results
    4646      Restart,   // restart operation after Sleep
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs

    r6723 r6725  
    3131  public interface IHiveService {
    3232
     33    #region Task Methods
     34    [OperationContract]
     35    Guid AddJob(Task job, TaskData jobData, IEnumerable<Guid> resourceIds);
     36
     37    [OperationContract]
     38    Guid AddChildJob(Guid parentJobId, Task job, TaskData jobData);
     39
     40    [OperationContract]
     41    Task GetJob(Guid jobId);
     42
     43    [OperationContract]
     44    IEnumerable<Task> GetJobs();
     45
     46    [OperationContract]
     47    IEnumerable<LightweightTask> GetLightweightJobs(IEnumerable<Guid> jobIds);
     48
     49    [OperationContract]
     50    IEnumerable<LightweightTask> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
     51
     52    [OperationContract]
     53    IEnumerable<LightweightTask> GetLightweightExperimentJobs(Guid experimentId);
     54
     55    [OperationContract]
     56    TaskData GetJobData(Guid jobId);
     57
     58    [OperationContract]
     59    void UpdateJob(Task jobDto);
     60
     61    [OperationContract]
     62    void UpdateJobData(Task jobDto, TaskData jobDataDto);
     63
     64    [OperationContract]
     65    void DeleteJob(Guid jobId);
     66
     67    [OperationContract]
     68    void DeleteChildJobs(Guid parentJobId);
     69
     70    [OperationContract]
     71    Task UpdateJobState(Guid jobId, TaskState jobState, Guid? slaveId, Guid? userId, string exception);
     72    #endregion
     73
     74    #region Job Control Methods
     75    [OperationContract]
     76    void StopJob(Guid jobId);
     77
     78    [OperationContract]
     79    void PauseJob(Guid jobId);
     80
     81    [OperationContract]
     82    void RestartJob(Guid jobId);
     83    #endregion
     84
    3385    #region Job Methods
    34     [OperationContract]
    35     Guid AddJob(Task job, TaskData jobData, IEnumerable<Guid> resourceIds);
    36 
    37     [OperationContract]
    38     Guid AddChildJob(Guid parentJobId, Task job, TaskData jobData);
    39 
    40     [OperationContract]
    41     Task GetJob(Guid jobId);
    42 
    43     [OperationContract]
    44     IEnumerable<Task> GetJobs();
    45 
    46     [OperationContract]
    47     IEnumerable<LightweightTask> GetLightweightJobs(IEnumerable<Guid> jobIds);
    48 
    49     [OperationContract]
    50     IEnumerable<LightweightTask> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
    51 
    52     [OperationContract]
    53     IEnumerable<LightweightTask> GetLightweightExperimentJobs(Guid experimentId);
    54 
    55     [OperationContract]
    56     TaskData GetJobData(Guid jobId);
    57 
    58     [OperationContract]
    59     void UpdateJob(Task jobDto);
    60 
    61     [OperationContract]
    62     void UpdateJobData(Task jobDto, TaskData jobDataDto);
    63 
    64     [OperationContract]
    65     void DeleteJob(Guid jobId);
    66 
    67     [OperationContract]
    68     void DeleteChildJobs(Guid parentJobId);
    69 
    70     [OperationContract]
    71     Task UpdateJobState(Guid jobId, TaskState jobState, Guid? slaveId, Guid? userId, string exception);
    72     #endregion
    73 
    74     #region Job Control Methods
    75     [OperationContract]
    76     void StopJob(Guid jobId);
    77 
    78     [OperationContract]
    79     void PauseJob(Guid jobId);
    80 
    81     [OperationContract]
    82     void RestartJob(Guid jobId);
    83     #endregion
    84 
    85     #region HiveExperiment Methods
    8686    [OperationContract]
    8787    Job GetHiveExperiment(Guid id);
Note: See TracChangeset for help on using the changeset viewer.