Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6367


Ignore:
Timestamp:
06/06/11 16:30:05 (13 years ago)
Author:
cneumuel
Message:

#1233

  • code cleanup
  • deleted obsolete folder
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
4 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConsoleTests/Program.cs

    r6357 r6367  
    133133
    134134      //TestAbortAll(mockPluginService, jobManager);
    135       TestStopAll(mockPluginService, jobManager);
     135      //TestStopAll(mockPluginService, jobManager);
    136136      //TestPauseAll(mockPluginService, jobManager);
    137137
     
    143143      StartStatusObservationThread();
    144144
    145       Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4);
     145      Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 10, 1000);
    146146      Task.WaitAll(tasks);
    147147
     
    209209      StartStatusObservationThread();
    210210
    211       Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4, 5000);
     211      Task[] tasks = CreateAndStartJobs(mockPluginService, jobManager, 4, 1000);
    212212      Task.WaitAll(tasks);
    213213
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ApplicationConstants.cs

    r6267 r6367  
    2121
    2222using System;
    23 using System.Data;
    2423
    2524namespace HeuristicLab.Services.Hive.Common {
    2625  public class ApplicationConstants {
    27 
    28     public static System.Data.IsolationLevel IsolationLevel = IsolationLevel.ReadUncommitted;
    29 
    3026    public static TimeSpan SlaveHeartbeatTimeout = TimeSpan.FromMinutes(1);
    3127
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveItem.cs

    r5614 r6367  
    1010
    1111    public HiveItem() { }
    12 
    1312  }
    1413}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/NamedHiveItem.cs

    r5614 r6367  
    1 using System.Runtime.Serialization;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Runtime.Serialization;
    223
    324namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     
    1031
    1132    protected NamedHiveItem() { }
    12 
    1333  }
    1434}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Plugin.cs

    r5614 r6367  
    4040
    4141    public Plugin() { }
    42 
    43 
    4442  }
    4543}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/PluginData.cs

    r5614 r6367  
    3535
    3636    public PluginData() { }
    37 
    38 
    3937  }
    4038}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Resource.cs

    r5614 r6367  
    3131
    3232    public Resource() { }
    33 
    3433  }
    3534}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/SlaveStatistics.cs

    r6229 r6367  
    3939    [DataMember]
    4040    public double CpuUtilization { get; set; }
    41 
    4241  }
    4342}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/StateLog.cs

    r5614 r6367  
    4141
    4242    public StateLog() { }
    43 
    4443  }
    4544}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Statistics.cs

    r6229 r6367  
    3131    public DateTime TimeStamp { get; set; }
    3232    [DataMember]
    33     public IEnumerable<UserStatistics> UserStatistics {get;set;}
     33    public IEnumerable<UserStatistics> UserStatistics { get; set; }
    3434    [DataMember]
    35     public IEnumerable<SlaveStatistics> SlaveStatistics {get;set;}
     35    public IEnumerable<SlaveStatistics> SlaveStatistics { get; set; }
    3636
    3737    public Statistics() { }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/UserStatistics.cs

    r6229 r6367  
    3737    [DataMember]
    3838    public TimeSpan StartToEndTime { get; set; }
    39    
    40 
    41 
    4239  }
    4340}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/MessageContainer.cs

    r5599 r6367  
    4848      ShutdownSlave,  // slave should shutdown immediately without submitting results
    4949      SayHello,  // Slave should say hello, because he is unknown to the server
    50 
    51       // *** commands from execution engine ***
    52       AddChildJob,     // adds a new child job for the provided jobId
    53       GetChildJobs,    // return all child jobs of the provided jobId
    54       DeleteChildJobs, // delete all child jobs of the provided jobId
    5550    };
    5651
     
    6358    public Guid JobId { get; set; }
    6459
     60    [StorableConstructor]
     61    protected MessageContainer(bool deserializing) { }
    6562    protected MessageContainer() { }
    6663    public MessageContainer(MessageType message) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Exceptions/DaoException.cs

    r5404 r6367  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    523
    624namespace HeuristicLab.Services.Hive.DataAccess {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs

    r6357 r6367  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    6868        if (entity == null) db.Jobs.InsertOnSubmit(Convert.ToEntity(dto));
    6969        else Convert.ToEntity(dto, entity);
    70         // todo: update required plugins
     70        foreach (Guid pluginId in dto.PluginsNeededIds) {
     71          if (db.RequiredPlugins.Count(p => p.PluginId == pluginId) == 0) {
     72            db.RequiredPlugins.InsertOnSubmit(new RequiredPlugin() { JobId = entity.JobId, PluginId = pluginId });
     73          }         
     74        }
    7175        db.SubmitChanges();
    7276      }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs

    r6267 r6367  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Transactions;
    324
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs

    r6362 r6367  
    4141        jobData.JobId = job.Id;
    4242        jobData.LastUpdate = DateTime.Now;
    43         if (resourceIds != null) {
    44           foreach (Guid slaveGroupId in resourceIds) {
    45             dao.AssignJobToResource(job.Id, slaveGroupId);
    46           }
    47         } else {
    48           // todo: use default group
     43        foreach (Guid slaveGroupId in resourceIds) {
     44          dao.AssignJobToResource(job.Id, slaveGroupId);
    4945        }
    5046        dao.AddJobData(jobData);
     
    138134          job.Command = null;
    139135        } else if (jobState == JobState.Paused && !job.Command.HasValue) {
    140           // job was paused and uploaded by slave without the user-command to pause it -> set waiting
     136          // slave paused and uploaded the job (no user-command) -> set waiting.
    141137          job = dao.UpdateJobState(jobId, JobState.Waiting, slaveId, userId, exception);
    142138        }
     
    256252          dbSlave.SlaveState = SlaveState.Idle;
    257253
    258           // don't update those properties:
    259           // dbSlave.IsAllowedToCalculate = slaveInfo.IsAllowedToCalculate;
    260           // dbSlave.ParentResourceId = slaveInfo.ParentResourceId;
     254          // don't update those properties: dbSlave.IsAllowedToCalculate, dbSlave.ParentResourceId
    261255
    262256          dao.UpdateSlave(dbSlave);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs

    r6267 r6367  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    4869      }
    4970      stats.SlaveStatistics = slaveStats;
    50 
    5171      stats.UserStatistics = dao.GetUserStatistics();
    52 
    5372      dao.AddStatistics(stats);
    5473    }
     
    91110    /// </summary>
    92111    private void SetTimeoutJobsWaiting() {
    93       var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.CalculatingJobHeartbeatTimeout) 
     112      var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.CalculatingJobHeartbeatTimeout)
    94113                               || (x.State == JobState.Transferring && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.TransferringJobHeartbeatTimeout));
    95114      foreach (var j in jobs) {
Note: See TracChangeset for help on using the changeset viewer.