Changeset 4914 for branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
- Timestamp:
- 11/23/10 18:22:25 (14 years ago)
- Location:
- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
- Files:
-
- 1 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLab.Hive.ExperimentManager-3.3.csproj
r4769 r4914 80 80 </PropertyGroup> 81 81 <ItemGroup> 82 <Reference Include="HeuristicLab.Clients.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 83 <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath> 84 </Reference> 82 85 <Reference Include="HeuristicLab.Collections-3.3"> 83 86 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> … … 131 134 <Compile Include="Progress\Progress.cs" /> 132 135 <Compile Include="Properties\AssemblyInfo.cs" /> 133 <Compile Include="Properties\Settings.Designer.cs">134 <AutoGen>True</AutoGen>135 <DesignTimeSharedInput>True</DesignTimeSharedInput>136 <DependentUpon>Settings.settings</DependentUpon>137 </Compile>138 136 <Compile Include="ServiceLocator.cs" /> 139 137 </ItemGroup> … … 142 140 <SubType>Designer</SubType> 143 141 </None> 142 <None Include="localhost - app.config"> 143 <SubType>Designer</SubType> 144 </None> 145 <None Include="services.heuristiclab.com - app.config"> 146 <SubType>Designer</SubType> 147 </None> 144 148 <None Include="Jobs.cd" /> 145 149 <None Include="HeuristicLab.snk" /> 146 150 <None Include="Properties\AssemblyInfo.frame" /> 147 <None Include="Properties\Settings.settings">148 <Generator>PublicSettingsSingleFileGenerator</Generator>149 <LastGenOutput>Settings.Designer.cs</LastGenOutput>150 </None>151 151 <None Include="Tools\RecreateServiceConfig.bat" /> 152 152 </ItemGroup> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLabHiveExperimentManagerPlugin.cs
r4760 r4914 25 25 [Plugin("HeuristicLab.Hive.ExperimentManager", "3.3")] 26 26 [PluginFile("HeuristicLab.Hive.ExperimentManager-3.3.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.Clients.Common", "3.3")] 27 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 28 29 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs
r4810 r4914 32 32 using HeuristicLab.Hive.ExperimentManager.Jobs; 33 33 using HeuristicLab.Hive.Tracing; 34 using HeuristicLab.Clients.Common; 34 35 35 36 namespace HeuristicLab.Hive.ExperimentManager { … … 114 115 public HiveExperiment() 115 116 : base(itemName, itemDescription) { 116 this.ResourceIds = HeuristicLab.Hive.ExperimentManager.Properties.Settings.Default.ResourceIds;117 this.ResourceIds = "HEAL"; 117 118 this.log = new Log(); 118 119 InitTimer(); … … 534 535 int totalJobCount = 0; 535 536 int jobCount = 0; 537 JobResultList allResults; 538 IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>(); 536 539 progress.Status = "Connecting to Server..."; 537 540 using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 538 541 // fetch all JobDto objects to create the full tree of tree of HiveJob objects 539 542 progress.Status = "Downloading list of jobs..."; 540 JobResultListallResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj;543 allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj; 541 544 totalJobCount = allResults.Count; 542 545 543 546 // download them first 544 IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>();545 547 foreach (JobResult jobResult in allResults) { 546 548 jobCount++; … … 549 551 progress.ProgressValue = (double)jobCount / totalJobCount; 550 552 } 551 552 jobCount = 1; 553 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allSerializedJobs[this.rootJobId.Value].SerializedJobData.Count() / 1024);554 this.HiveJob = new HiveJob(allSerializedJobs[this.rootJobId.Value], false);555 allSerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint556 progress.ProgressValue = (double)jobCount / totalJobCount;557 558 if (this.HiveJob.JobDto.DateFinished.HasValue) { 559 this.ExecutionTime = this.HiveJob.JobDto.DateFinished.Value - this.HiveJob.JobDto.DateCreated.Value;560 this.lastUpdateTime = this.HiveJob.JobDto.DateFinished.Value;561 this.ExecutionState = Core.ExecutionState.Stopped;562 OnStopped();563 } else {564 this.ExecutionTime = DateTime.Now - this.HiveJob.JobDto.DateCreated.Value;565 this.lastUpdateTime = DateTime.Now;566 this.ExecutionState = Core.ExecutionState.Started;567 OnStarted();568 }569 570 // build child-job tree 571 LoadChildResults(service.Obj, this.HiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);572 StartResultPolling();573 }553 } 554 555 jobCount = 1; 556 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allSerializedJobs[this.rootJobId.Value].SerializedJobData.Count() / 1024); 557 this.HiveJob = new HiveJob(allSerializedJobs[this.rootJobId.Value], false); 558 allSerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint 559 progress.ProgressValue = (double)jobCount / totalJobCount; 560 561 if (this.HiveJob.JobDto.DateFinished.HasValue) { 562 this.ExecutionTime = this.HiveJob.JobDto.DateFinished.Value - this.HiveJob.JobDto.DateCreated.Value; 563 this.lastUpdateTime = this.HiveJob.JobDto.DateFinished.Value; 564 this.ExecutionState = Core.ExecutionState.Stopped; 565 OnStopped(); 566 } else { 567 this.ExecutionTime = DateTime.Now - this.HiveJob.JobDto.DateCreated.Value; 568 this.lastUpdateTime = DateTime.Now; 569 this.ExecutionState = Core.ExecutionState.Started; 570 OnStarted(); 571 } 572 573 // build child-job tree 574 LoadChildResults(this.HiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount); 575 StartResultPolling(); 574 576 } 575 577 catch (Exception e) { … … 581 583 } 582 584 583 private void LoadChildResults( IClientFacade service,HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, SerializedJob> allSerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) {585 private void LoadChildResults(HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, SerializedJob> allSerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) { 584 586 IEnumerable<JobResult> childResults = from result in allResults 585 587 where result.ParentJobId.HasValue && result.ParentJobId.Value == parentHiveJob.JobDto.Id … … 602 604 allSerializedJobs.Remove(jobResult.Id); // reduce memory footprint 603 605 if (jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high 604 LoadChildResults( service,childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount);606 LoadChildResults(childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount); 605 607 } 606 608 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs
r4769 r4914 29 29 using HeuristicLab.Hive.Contracts.ResponseObjects; 30 30 using HeuristicLab.Common; 31 using HeuristicLab.Clients.Common; 31 32 32 33 namespace HeuristicLab.Hive.ExperimentManager { -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs
r4760 r4914 27 27 using HeuristicLab.Hive.Contracts.Interfaces; 28 28 using HeuristicLab.Hive.Contracts.ResponseObjects; 29 using HeuristicLab.Clients.Common; 29 30 30 31 namespace HeuristicLab.Hive.ExperimentManager { … … 95 96 96 97 private void FetchJobResults() { 98 ResponseObject<JobResultList> response; 97 99 using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 98 ResponseObject<JobResultList>response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);99 if (response.StatusMessage == ResponseStatus.Ok) {100 OnJobResultsReceived(response.Obj);101 } else {102 throw new JobResultPollingException(response.StatusMessage.ToString());103 }100 response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true); 101 } 102 if (response.StatusMessage == ResponseStatus.Ok) { 103 OnJobResultsReceived(response.Obj); 104 } else { 105 throw new JobResultPollingException(response.StatusMessage.ToString()); 104 106 } 105 107 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/ServiceLocator.cs
r4760 r4914 22 22 using HeuristicLab.Hive.Contracts; 23 23 using HeuristicLab.Hive.Contracts.Interfaces; 24 using HeuristicLab.Hive.ExperimentManager.Properties;25 24 26 25 namespace HeuristicLab.Hive.ExperimentManager { … … 39 38 } 40 39 41 public ServiceLocator() { 42 Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(Default_SettingChanging); 43 } 44 45 internal void Default_SettingChanging(object sender, System.Configuration.SettingChangingEventArgs e) { 46 if (clientFacadePool != null) { 47 clientFacadePool.Username = Settings.Default.HiveUsername; 48 clientFacadePool.Password = Settings.Default.HivePassword; 49 } 50 if (streamedClientFacadePool != null) { 51 streamedClientFacadePool.Username = Settings.Default.HiveUsername; 52 streamedClientFacadePool.Password = Settings.Default.HivePassword; 53 } 54 } 40 public ServiceLocator() { } 55 41 56 42 internal WcfServicePool<IClientFacade> ClientFacadePool { 57 43 get { 58 44 if (clientFacadePool == null) { 59 clientFacadePool = new WcfServicePool<IClientFacade>( Settings.Default.HiveUsername, Settings.Default.HivePassword,"ClientHttpEndpoint");45 clientFacadePool = new WcfServicePool<IClientFacade>("ClientHttpEndpoint"); 60 46 } 61 47 return clientFacadePool; … … 66 52 get { 67 53 if (streamedClientFacadePool == null) { 68 streamedClientFacadePool = new WcfServicePool<IClientFacade>( Settings.Default.HiveUsername, Settings.Default.HivePassword,"ClientTcpStreamedEndpoint");54 streamedClientFacadePool = new WcfServicePool<IClientFacade>("ClientTcpStreamedEndpoint"); 69 55 } 70 56 return streamedClientFacadePool; -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/app.config
r4810 r4914 2 2 <configuration> 3 3 <configSections> 4 <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">5 <section name="HeuristicLab.Hive.ExperimentManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />6 <section name="HeuristicLab.Hive.Experiment.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>7 </sectionGroup>8 4 </configSections> 9 <userSettings> 10 <HeuristicLab.Hive.ExperimentManager.Properties.Settings> 11 <setting name="ResourceIds" serializeAs="String"> 12 <value>HEAL</value> 13 </setting> 14 <setting name="HiveUsername" serializeAs="String"> 15 <value>cneumuel</value> 16 </setting> 17 <setting name="HivePassword" serializeAs="String"> 18 <value /> 19 </setting> 20 </HeuristicLab.Hive.ExperimentManager.Properties.Settings> 21 </userSettings> 5 22 6 <system.serviceModel> 23 7 24 8 <bindings> 25 9 <netTcpBinding> 26 <binding name="ClientTcpStreamedEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00: 10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="104857600">27 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead=" 4096" maxNameTableCharCount="16384"/>28 <reliableSession ordered="true" inactivityTimeout="00: 10:00" enabled="false"/>10 <binding name="ClientTcpStreamedEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="104857600"> 11 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/> 12 <reliableSession ordered="true" inactivityTimeout="00:30:00" enabled="false"/> 29 13 <security mode="TransportWithMessageCredential"> 30 14 <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> … … 34 18 </netTcpBinding> 35 19 <wsHttpBinding> 36 <binding name="ClientHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00: 10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">37 <readerQuotas maxDepth="32" maxStringContentLength=" 8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>38 <reliableSession ordered="true" inactivityTimeout="00: 10:00" enabled="false"/>20 <binding name="ClientHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="104857600" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> 21 <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/> 22 <reliableSession ordered="true" inactivityTimeout="00:30:00" enabled="false"/> 39 23 <security mode="Message"> 40 24 <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/> … … 45 29 </bindings> 46 30 <client> 47 <endpoint address="net.tcp:// services.heuristiclab.com:8000/Hive-3.3/ClientService.svc" behaviorConfiguration="ClientServiceBehaviour" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint">31 <endpoint address="net.tcp://localhost:9001/Hive/ClientService.svc" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint"> 48 32 <identity> 49 <dns value=" services.heuristiclab.com"/>33 <dns value="localhost"/> 50 34 </identity> 51 35 </endpoint> 52 <endpoint address="http:// services.heuristiclab.com/Hive-3.3/ClientService.svc" binding="wsHttpBinding" behaviorConfiguration="ClientServiceBehaviour" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint">36 <endpoint address="http://localhost:9000/Hive/ClientService.svc" binding="wsHttpBinding" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint"> 53 37 <identity> 54 <certificate encodedValue="AwAAAAEAAAAUAAAA wK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FIn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V42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/> 55 39 </identity> 56 40 </endpoint> 57 41 </client> 58 42 59 <behaviors>60 <endpointBehaviors>61 <behavior name="ClientServiceBehaviour">62 <clientCredentials>63 <serviceCertificate>64 <authentication certificateValidationMode="None"/>65 </serviceCertificate>66 </clientCredentials>67 </behavior>68 </endpointBehaviors>69 </behaviors>70 71 43 </system.serviceModel> 72 44 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Note: See TracChangeset
for help on using the changeset viewer.