Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4116 for branches


Ignore:
Timestamp:
07/27/10 18:36:36 (14 years ago)
Author:
cneumuel
Message:

worked on HiveExperiment (#1115)

Location:
branches/3.3-HiveMigration/sources/HeuristicLab.Hive
Files:
14 added
19 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/Properties/AssemblyInfo.cs

    r4111 r4116  
    5757// by using the '*' as shown below:
    5858// [assembly: AssemblyVersion("1.0.*")]
    59 [assembly: AssemblyVersion("3.3.0.4107")]
    60 [assembly: AssemblyFileVersion("3.3.0.4107")]
    61 [assembly: AssemblyBuildDate("2010/07/27 14:15:11")]
     59[assembly: AssemblyVersion("3.3.0.4111")]
     60[assembly: AssemblyFileVersion("3.3.0.4111")]
     61[assembly: AssemblyBuildDate("2010/07/27 18:31:47")]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs

    r3931 r4116  
    2828namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    2929
    30   public enum State { nullState, idle, calculating, offline, finished, abort, requestSnapshot, requestSnapshotSent, pending };
     30  public enum State { NullState, Idle, Calculating, Offline, Finished, Abort, RequestSnapshot, RequestSnapshotSent, Pending };
    3131  public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch };
    3232
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Engine/3.3/HiveEngine.cs

    r4111 r4116  
    163163      JobDto jobDto = new JobDto();
    164164
    165       // serialize current job
     165      // serialize job
    166166      MemoryStream memStream = new MemoryStream();
    167167      XmlGenerator.Serialize(job, memStream);
     
    183183      jobDto.CoresNeeded = 1;
    184184      jobDto.PluginsNeeded = pluginsNeeded;
    185       jobDto.State = State.offline;
     185      jobDto.State = State.Offline;
    186186      return executableJobObj;
    187187    }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3

    • Property svn:ignore set to
      bin
      obj
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/Properties/AssemblyInfo.cs

    r4111 r4116  
    1 using System.Reflection;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 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.Reflection;
    223using System.Runtime.CompilerServices;
    324using System.Runtime.InteropServices;
    4 
     25using HeuristicLab.PluginInfrastructure;
     26using System.Security;
    527// General Information about an assembly is controlled through the following
    628// set of attributes. Change these attribute values to modify the information
    729// associated with an assembly.
    8 [assembly: AssemblyTitle("HeuristicLab.Hive.Experiment-3.3")]
     30[assembly: AssemblyTitle("HeuristicLab.Hive.Experiment.Views")]
    931[assembly: AssemblyDescription("")]
    1032[assembly: AssemblyConfiguration("")]
    11 [assembly: AssemblyCompany("FH OOE")]
    12 [assembly: AssemblyProduct("HeuristicLab.Hive.Experiment-3.3")]
    13 [assembly: AssemblyCopyright("Copyright © FH OOE 2010")]
     33[assembly: AssemblyCompany("")]
     34[assembly: AssemblyProduct("HeuristicLab")]
     35[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
    1436[assembly: AssemblyTrademark("")]
    1537[assembly: AssemblyCulture("")]
     38[assembly: AllowPartiallyTrustedCallers]
    1639
    1740// Setting ComVisible to false makes the types in this assembly not visible
     
    2144
    2245// The following GUID is for the ID of the typelib if this project is exposed to COM
    23 [assembly: Guid("b89cec07-9515-4898-8cbf-24fea34b2635")]
     46[assembly: Guid("9721605F-C79D-434a-8E42-C0A384477D53")]
    2447
    2548// Version information for an assembly consists of the following four values:
     
    3053//      Revision
    3154//
    32 // You can specify all the values or you can default the Build and Revision Numbers
     55// You can specify all the values or you can default the Revision and Build Numbers
    3356// by using the '*' as shown below:
    34 // [assembly: AssemblyVersion("1.0.*")]
    35 [assembly: AssemblyVersion("1.0.0.0")]
    36 [assembly: AssemblyFileVersion("1.0.0.0")]
     57[assembly: AssemblyVersion("3.3.0.4111")]
     58[assembly: AssemblyFileVersion("3.3.0.4111")]
     59[assembly: AssemblyBuildDate("2010/07/27 18:32:02")]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3

    • Property svn:ignore set to
      bin
      obj
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/AssemblyInfo.cs

    r4111 r4116  
    1 using System.Reflection;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 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.Reflection;
    223using System.Runtime.CompilerServices;
    324using System.Runtime.InteropServices;
    4 
     25using HeuristicLab.PluginInfrastructure;
     26using System.Security;
    527// General Information about an assembly is controlled through the following
    628// set of attributes. Change these attribute values to modify the information
    729// associated with an assembly.
    8 [assembly: AssemblyTitle("HeuristicLab.Hive.Experiment-3.3")]
    9 [assembly: AssemblyDescription("")]
     30[assembly: AssemblyTitle("HeuristicLab.Hive.Experiment")]
     31[assembly: AssemblyDescription("HeuristicLab experiment for distributed computation")]
    1032[assembly: AssemblyConfiguration("")]
    11 [assembly: AssemblyCompany("FH OOE")]
    12 [assembly: AssemblyProduct("HeuristicLab.Hive.Experiment-3.3")]
    13 [assembly: AssemblyCopyright("Copyright © FH OOE 2010")]
     33[assembly: AssemblyCompany("")]
     34[assembly: AssemblyProduct("HeuristicLab")]
     35[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
    1436[assembly: AssemblyTrademark("")]
    1537[assembly: AssemblyCulture("")]
     38[assembly: AllowPartiallyTrustedCallers]
    1639
    1740// Setting ComVisible to false makes the types in this assembly not visible
     
    2144
    2245// The following GUID is for the ID of the typelib if this project is exposed to COM
    23 [assembly: Guid("b89cec07-9515-4898-8cbf-24fea34b2635")]
     46[assembly: Guid("9721605F-C79D-434a-8E42-C0A384477D53")]
    2447
    2548// Version information for an assembly consists of the following four values:
     
    3053//      Revision
    3154//
    32 // You can specify all the values or you can default the Build and Revision Numbers
     55// You can specify all the values or you can default the Revision and Build Numbers
    3356// by using the '*' as shown below:
    34 // [assembly: AssemblyVersion("1.0.*")]
    35 [assembly: AssemblyVersion("1.0.0.0")]
    36 [assembly: AssemblyFileVersion("1.0.0.0")]
     57[assembly: AssemblyVersion("3.3.0.4111")]
     58[assembly: AssemblyFileVersion("3.3.0.4111")]
     59[assembly: AssemblyBuildDate("2010/07/27 18:31:34")]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/AddJobForm.cs

    r4105 r4116  
    110110        if (numJobs > 0) {
    111111          for (int i = 0; i < numJobs; i++) {
    112             JobDto job = new JobDto { State = State.offline, CoresNeeded = 1 };
     112            JobDto job = new JobDto { State = State.Offline, CoresNeeded = 1 };
    113113           
    114114            // if project selected (0 -> none)
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HiveServerManagementConsole.cs

    r4042 r4116  
    109109    void jdf_NewDataAvailable(object sender, EventArgs e) {
    110110      JobDataFetcher fetcher = (JobDataFetcher) sender;
    111       if (fetcher.PollStates.Contains(State.finished)) {
     111      if (fetcher.PollStates.Contains(State.Finished)) {
    112112        updateJobListView(fetcher, lv_finishedJobs, 0);
    113       } else if(fetcher.PollStates.Contains(State.calculating)) {
     113      } else if(fetcher.PollStates.Contains(State.Calculating)) {
    114114        updateJobListView(fetcher, lv_calculatingJobs, 1);
    115       } else if (fetcher.PollStates.Contains(State.offline)) {
     115      } else if (fetcher.PollStates.Contains(State.Offline)) {
    116116        updateJobListView(fetcher, lv_offlineJobs, 2);
    117117      }
     
    136136    private void Init() {
    137137
    138       jdfFinished = new JobDataFetcher(new State[] {State.finished}, 50);
    139       jdfCalculating = new JobDataFetcher(new State[] {State.calculating}, 50);
    140       jdfOffline = new JobDataFetcher(new State[] {State.offline}, 50);
     138      jdfFinished = new JobDataFetcher(new State[] {State.Finished}, 50);
     139      jdfCalculating = new JobDataFetcher(new State[] {State.Calculating}, 50);
     140      jdfOffline = new JobDataFetcher(new State[] {State.Offline}, 50);
    141141
    142142      cmb_finishedJob_count.SelectedItem = "50";
     
    348348          int percentageUsage = CapacityRam(((ClientDto)resource).NrOfCores, ((ClientDto)resource).NrOfFreeCores);
    349349          int usage = 3;
    350           if ((((ClientDto)resource).State != State.offline) &&
    351             (((ClientDto)resource).State != State.nullState)) {
     350          if ((((ClientDto)resource).State != State.Offline) &&
     351            (((ClientDto)resource).State != State.NullState)) {
    352352            if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
    353353              usage = 0;
     
    419419      //lvSnapshots.Enabled = true;
    420420
    421       if (job.State == State.offline) {
     421      if (job.State == State.Offline) {
    422422        pbJobControl.Image = ilLargeImgJob.Images[2];
    423       } else if (job.State == State.calculating) {
     423      } else if (job.State == State.Calculating) {
    424424        pbJobControl.Image = ilLargeImgJob.Images[1];
    425       } else if (job.State == State.finished) {
     425      } else if (job.State == State.Finished) {
    426426        pbJobControl.Image = ilLargeImgJob.Images[0];
    427427      }
     
    480480        lvJobDetails.Items.Add(lvi);
    481481
    482         if (job.State == State.finished) {
     482        if (job.State == State.Finished) {
    483483          lvi = null;
    484484            lvi = new ListViewItem();
     
    500500        int percentageUsage = CapacityRam(currentClient.NrOfCores, currentClient.NrOfFreeCores);
    501501        int usage = 3;
    502         if ((currentClient.State != State.offline) && (currentClient.State != State.nullState)) {
     502        if ((currentClient.State != State.Offline) && (currentClient.State != State.NullState)) {
    503503          if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
    504504            usage = 0;
     
    630630        JobDto selectedJob = (JobDto)jlv.SelectedItems[0].Tag;
    631631
    632         if (selectedJob != null && selectedJob.State == State.calculating) {
     632        if (selectedJob != null && selectedJob.State == State.Calculating) {
    633633          jlv.ContextMenuStrip.Items.Add(offlineItemAbortJob);
    634634          jlv.ContextMenuStrip.Items.Add(menuItemGetSnapshot);
     
    806806              change = true;
    807807            }
    808             if (job.State != State.offline) {
     808            if (job.State != State.Offline) {
    809809              if ((!IsEqual(job.Client, jobold.Client)) || (job.State != jobold.State)
    810810                   || (job.Percentage != jobold.Percentage)) {
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/JobListView.cs

    r4042 r4116  
    4040      JobDataFetcher datafetcher = (JobDataFetcher) sender;
    4141      this.BeginUpdate();
    42       if (datafetcher.PollStates.Contains(State.finished)) {
     42      if (datafetcher.PollStates.Contains(State.Finished)) {
    4343        this.Items.Clear();
    4444        ListViewItem lviDummy = new ListViewItem("blahr", 0);
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs

    r4092 r4116  
    8282
    8383        foreach (ClientDto client in allClients) {
    84           if (client.State != State.offline && client.State != State.nullState) {
     84          if (client.State != State.Offline && client.State != State.NullState) {
    8585            heartbeatLock.EnterUpgradeableReadLock();
    8686
     
    8888              Logger.Info("Client " + client.Id +
    8989                              " wasn't offline but hasn't sent heartbeats - setting offline");
    90               client.State = State.offline;
     90              client.State = State.Offline;
    9191              DaoLocator.ClientDao.Update(client);
    9292              Logger.Info("Client " + client.Id +
     
    113113                Logger.Debug("setting client offline");
    114114                // client must be set offline
    115                 client.State = State.offline;
     115                client.State = State.Offline;
    116116
    117117                //clientAdapter.Update(client);
     
    146146
    147147    private void CheckForPendingJobs() {
    148       IList<JobDto> pendingJobsInDB = new List<JobDto>(DaoLocator.JobDao.GetJobsByState(State.pending));
     148      IList<JobDto> pendingJobsInDB = new List<JobDto>(DaoLocator.JobDao.GetJobsByState(State.Pending));
    149149
    150150      foreach (JobDto currJob in pendingJobsInDB) {
     
    152152          if (pendingJobs.ContainsKey(currJob.Id)) {
    153153            if (pendingJobs[currJob.Id] <= 0) {
    154               currJob.State = State.offline;
     154              currJob.State = State.Offline;
    155155              DaoLocator.JobDao.Update(currJob);
    156156            } else {
     
    185185      //Really set offline?
    186186      //Reconnect issues with the currently calculating jobs
    187       clientInfo.State = State.idle;
     187      clientInfo.State = State.Idle;
    188188      clientInfo.CalendarSyncStatus = dbClient != null ? dbClient.CalendarSyncStatus : CalendarState.NotAllowedToFetch;
    189189
     
    258258      Logger.Debug("END Finished Client Fetching");
    259259      // check if the client is logged in
    260       if (client.State == State.offline || client.State == State.nullState) {
     260      if (client.State == State.Offline || client.State == State.NullState) {
    261261        response.Success = false;
    262262        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_USER_NOT_LOGGED_IN;
     
    341341            response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED;
    342342            Logger.Error("There is no job calculated by this user " + hbData.ClientId + " Job: " + curJob);
    343           } else if (curJob.State == State.abort) {
     343          } else if (curJob.State == State.Abort) {
    344344            // a request to abort the job has been set
    345345            response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
    346             curJob.State = State.finished;
     346            curJob.State = State.Finished;
    347347          } else {
    348348            // save job progress
    349349            curJob.Percentage = jobProgress.Value;
    350350
    351             if (curJob.State == State.requestSnapshot) {
     351            if (curJob.State == State.RequestSnapshot) {
    352352              // a request for a snapshot has been set
    353353              response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.RequestSnapshot, curJob.Id));
    354               curJob.State = State.requestSnapshotSent;
     354              curJob.State = State.RequestSnapshotSent;
    355355            }
    356356          }
     
    376376                Logger.Error("Job TTL reached Zero, Job gets removed: " + currJob + " and set back to offline. User that sucks: " + currJob.Client);
    377377
    378                 currJob.State = State.offline;
     378                currJob.State = State.Offline;
    379379                DaoLocator.JobDao.Update(currJob);
    380380
     
    385385            } else {
    386386              Logger.Error("Job ID wasn't with the heartbeats:  " + currJob);
    387               currJob.State = State.offline;
     387              currJob.State = State.Offline;
    388388              DaoLocator.JobDao.Update(currJob);
    389389            }
     
    516516        return response;
    517517      }
    518       if (job.JobInfo.State == State.abort) {
     518      if (job.JobInfo.State == State.Abort) {
    519519        response.Success = false;
    520520        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_WAS_ABORTED;
     
    545545        return response;
    546546      }
    547       if (job.JobInfo.State == State.finished) {
     547      if (job.JobInfo.State == State.Finished) {
    548548        response.Success = true;
    549549        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED;
     
    556556      }
    557557      //Todo: RequestsnapshotSent => calculating?
    558       if (job.JobInfo.State == State.requestSnapshotSent) {
    559         job.JobInfo.State = State.calculating;
    560       }
    561       if (job.JobInfo.State != State.calculating &&
    562         job.JobInfo.State != State.pending) {
     558      if (job.JobInfo.State == State.RequestSnapshotSent) {
     559        job.JobInfo.State = State.Calculating;
     560      }
     561      if (job.JobInfo.State != State.Calculating &&
     562        job.JobInfo.State != State.Pending) {
    563563        response.Success = false;
    564564        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_WRONG_JOB_STATE;
     
    573573
    574574      if (finished) {
    575         job.JobInfo.State = State.finished;
     575        job.JobInfo.State = State.Finished;
    576576        job.JobInfo.DateFinished = DateTime.Now;
    577577      }
     
    637637        return response;
    638638      }
    639       if (client.State == State.calculating) {
     639      if (client.State == State.Calculating) {
    640640        // check wich job the client was calculating and reset it
    641641        IEnumerable<JobDto> jobsOfClient = DaoLocator.JobDao.FindActiveJobsOfClient(client);
    642642        foreach (JobDto job in jobsOfClient) {
    643           if (job.State != State.finished)
     643          if (job.State != State.Finished)
    644644            DaoLocator.JobDao.SetJobOffline(job);
    645645        }
    646646      }
    647647
    648       client.State = State.offline;
     648      client.State = State.Offline;
    649649      DaoLocator.ClientDao.Update(client);
    650650
     
    670670        return response;
    671671      }
    672       if (job.State == State.finished) {
     672      if (job.State == State.Finished) {
    673673        response.Success = true;
    674674        response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_ALLREADY_FINISHED;
     
    676676        return response;
    677677      }
    678       job.State = State.pending;
     678      job.State = State.Pending;
    679679      lock (pendingJobs) {
    680680        pendingJobs.Add(job.Id, PENDING_TIMEOUT);
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DbTestApp.cs

    r4092 r4116  
    123123      c1.NrOfFreeCores = 2;
    124124      c1.CpuSpeedPerCore = 2500;
    125       c1.State = State.idle;
     125      c1.State = State.Idle;
    126126      c1 = clientDao.Insert(c1);
    127127
     
    137137      c2.NrOfFreeCores = 1;
    138138      c2.CpuSpeedPerCore = 4000;
    139       c2.State = State.idle;
     139      c2.State = State.Idle;
    140140      c2 = clientDao.Insert(c2);
    141141
     
    159159        Percentage = 0,
    160160        Priority = 1,
    161         State = State.offline
     161        State = State.Offline
    162162      };
    163163
     
    204204        client.NrOfFreeCores = 2;
    205205        client.CpuSpeedPerCore = 2500;
    206         client.State = State.idle;
     206        client.State = State.Idle;
    207207        client = clientDao.Insert(client);
    208208        cgd.AddRessourceToClientGroup(client.Id, mg.Id);
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DefaultScheduler.cs

    r4060 r4116  
    2626    public bool ExistsJobForClient(HeuristicLab.Hive.Contracts.BusinessObjects.HeartBeatData hbData) {
    2727      List<JobDto> allOfflineJobsForClient =
    28         new List<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.offline, hbData.FreeCores, hbData.FreeMemory,
     28        new List<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.Offline, hbData.FreeCores, hbData.FreeMemory,
    2929                                                                    hbData.ClientId));
    3030      return (allOfflineJobsForClient != null && allOfflineJobsForClient.Count > 0);
     
    3838        ClientDto client = DaoLocator.ClientDao.FindById(clientId);
    3939        LinkedList<JobDto> allOfflineJobsForClient =
    40           new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.offline, client.NrOfFreeCores,
     40          new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForClient(State.Offline, client.NrOfFreeCores,
    4141                                                                            client.FreeMemory, client.Id));       
    4242        if (allOfflineJobsForClient != null && allOfflineJobsForClient.Count > 0) {
    4343          jobToCalculate = allOfflineJobsForClient.First.Value;
    44           jobToCalculate.State = State.calculating;
     44          jobToCalculate.State = State.Calculating;
    4545          jobToCalculate.Client = client;
    46           jobToCalculate.Client.State = State.calculating;
     46          jobToCalculate.Client.State = State.Calculating;
    4747          jobToCalculate.DateCalculated = DateTime.Now;
    4848          DaoLocator.JobDao.AssignClientToJob(client.Id, jobToCalculate.Id);
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs

    r4107 r4116  
    6666        List<JobDto> allJobs = new List<JobDto>(DaoLocator.JobDao.FindAll());
    6767        foreach (JobDto curJob in allJobs) {
    68           if (curJob.State != State.calculating && curJob.State != State.finished) {
     68          if (curJob.State != State.Calculating && curJob.State != State.Finished) {
    6969            DaoLocator.JobDao.SetJobOffline(curJob);
    7070          }
     
    170170
    171171      if (job != null && job.JobInfo != null) {
    172         if (job.JobInfo.State != State.offline) {
     172        if (job.JobInfo.State != State.Offline) {
    173173          response.Success = false;
    174174          response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOBSTATE_MUST_BE_OFFLINE;
     
    242242
    243243      //if it's a snapshot but the result hasn't reached the server yet...
    244       if (snapshot && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) {
     244      if (snapshot && (job.State == State.RequestSnapshot || job.State == State.RequestSnapshotSent)) {
    245245        response.Success = true;
    246246        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
     
    250250
    251251      //if it's NOT a snapshot, NEITHER request NOR is it finished
    252       if (!requested && !snapshot && job.State != State.finished) {
     252      if (!requested && !snapshot && job.State != State.Finished) {
    253253        response.Success = true;
    254254        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
     
    273273
    274274      JobDto job = DaoLocator.JobDao.FindById(jobId);
    275       if (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent) {
     275      if (job.State == State.RequestSnapshot || job.State == State.RequestSnapshotSent) {
    276276        response.Success = true;
    277277        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_REQUEST_ALLREADY_SET;
    278278        return response;
    279279      }
    280       if (job.State != State.calculating) {
     280      if (job.State != State.Calculating) {
    281281        response.Success = false;
    282282        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED;
     
    284284      }
    285285      // job is in correct state
    286       job.State = State.requestSnapshot;
     286      job.State = State.RequestSnapshot;
    287287      DaoLocator.JobDao.Update(job);
    288288
     
    302302        return response; // no commit needed
    303303      }
    304       if (job.State == State.abort) {
     304      if (job.State == State.Abort) {
    305305        response.Success = true;
    306306        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_ABORT_REQUEST_ALLREADY_SET;
    307307        return response; // no commit needed
    308308      }
    309       if (job.State != State.calculating && job.State != State.requestSnapshot && job.State != State.requestSnapshotSent) {
     309      if (job.State != State.Calculating && job.State != State.RequestSnapshot && job.State != State.RequestSnapshotSent) {
    310310        response.Success = false;
    311311        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED;
     
    313313      }
    314314      // job is in correct state
    315       job.State = State.abort;
     315      job.State = State.Abort;
    316316      DaoLocator.JobDao.Update(job);
    317317
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs

    r4111 r4116  
    5555// by using the '*' as shown below:
    5656// [assembly: AssemblyVersion("1.0.*")]
    57 [assembly: AssemblyVersion("3.3.0.4107")]
    58 [assembly: AssemblyFileVersion("3.3.0.4107")]
    59 [assembly: AssemblyBuildDate("2010/07/27 14:15:12")]
     57[assembly: AssemblyVersion("3.3.0.4111")]
     58[assembly: AssemblyFileVersion("3.3.0.4111")]
     59[assembly: AssemblyBuildDate("2010/07/27 18:31:46")]
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ClientDao.cs

    r3931 r4116  
    101101      target.NrOfCores = source.NumberOfCores ?? 0;
    102102      target.NrOfFreeCores = source.NumberOfFreeCores ?? 0;
    103       target.State = (State) Enum.Parse(typeof (State), source.Status);
     103      target.State = (State) Enum.Parse(typeof (State), source.Status, true);
    104104      return target;
    105105    }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs

    r3931 r4116  
    2828
    2929      IQueryable<JobDto> query = null;
    30       if (jobState == State.finished) {
     30      if (jobState == State.Finished) {
    3131         query = from job in Context.Jobs
    3232                 where job.JobState == Enum.GetName(typeof (State), jobState)
    3333                 orderby job.DateFinished
    3434                 select EntityToDto(job, null);
    35       } else if (jobState == State.calculating || jobState == State.requestSnapshot || jobState == State.requestSnapshotSent) {
     35      } else if (jobState == State.Calculating || jobState == State.RequestSnapshot || jobState == State.RequestSnapshotSent) {
    3636        query = from job in Context.Jobs
    3737                    where job.JobState == Enum.GetName(typeof(State), jobState)
     
    9797    public IEnumerable<JobDto> FindActiveJobsOfClient(ClientDto client) {
    9898      return (from j in Context.Jobs
    99               where (j.JobState == Enum.GetName(typeof (State), State.calculating) ||
    100                      j.JobState == Enum.GetName(typeof (State), State.abort) ||
    101                      j.JobState == Enum.GetName(typeof (State), State.requestSnapshot) ||
    102                      j.JobState == Enum.GetName(typeof (State), State.requestSnapshotSent)) &&
     99              where (j.JobState == Enum.GetName(typeof (State), State.Calculating) ||
     100                     j.JobState == Enum.GetName(typeof (State), State.Abort) ||
     101                     j.JobState == Enum.GetName(typeof (State), State.RequestSnapshot) ||
     102                     j.JobState == Enum.GetName(typeof (State), State.RequestSnapshotSent)) &&
    103103                    (j.ResourceId.Equals(client.Id))
    104104              select EntityToDto(j, null)).ToList();
     
    112112     
    113113      var q = (from ar in Context.AssignedResources               
    114                where ar.Job.JobState == Enum.GetName(typeof (State), State.offline) &&
     114               where ar.Job.JobState == Enum.GetName(typeof (State), State.Offline) &&
    115115                     ar.Job.CoresNeeded <= freeCores &&
    116116                     ar.Job.MemoryNeeded <= freeMemory &&
     
    139139      Job j = Context.Jobs.SingleOrDefault(jq => jq.JobId.Equals(job.Id));
    140140      j.Client = null;
    141       j.JobState = Enum.GetName(typeof(State), State.offline);
     141      j.JobState = Enum.GetName(typeof(State), State.Offline);
    142142      CommitChanges();
    143143    }
     
    199199     
    200200      target.Priority = source.Priority;
    201       target.State = (State) Enum.Parse(typeof (State), source.JobState);
     201      target.State = (State) Enum.Parse(typeof (State), source.JobState, true);
    202202      return target;
    203203    }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/MergeConfigs.cmd

    r4107 r4116  
    11ConfigMerger "%SolutionDir%HeuristicLab.Hive.Server\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
    22ConfigMerger "%SolutionDir%HeuristicLab.Hive.Client.Core\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
     3ConfigMerger "%SolutionDir%HeuristicLab.Hive.Experiment\3.3\app.config" "HeuristicLab.Hive-3.3.dll.config"
    34
    45ConfigMerger "HeuristicLab.Hive-3.3.dll.config" "HeuristicLab 3.3.exe.config"
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs

    r4111 r4116  
    5151//      Revision
    5252//
    53 [assembly: AssemblyVersion("3.3.0.4107")]
    54 [assembly: AssemblyFileVersion("3.3.0.4107")]
     53[assembly: AssemblyVersion("3.3.0.4111")]
     54[assembly: AssemblyFileVersion("3.3.0.4111")]
Note: See TracChangeset for help on using the changeset viewer.