Changeset 2111 for trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs
- Timestamp:
- 06/25/09 18:28:38 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs
r2105 r2111 43 43 private const int SNAPSHOT_POLLING_INTERVAL_MS = 1000; 44 44 private const int RESULT_POLLING_INTERVAL_MS = 10000; 45 private const int MAX_SNAPSHOT_RETRIES = 20; 45 46 private Guid jobId; 46 47 private Job job; … … 117 118 HiveLogger.Debug("HiveEngine: Results-polling - Got result!"); 118 119 restoredJob = (Job)PersistenceManager.RestoreFromGZip(response.Obj.SerializedJobResultData); 119 HiveLogger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + restoredJob.Engine.Canceled);120 HiveLogger.Debug("HiveEngine: Results-polling - IsSnapshotResult: " + (restoredJob.Progress<1.0)); 120 121 } 121 122 } 122 } while (restoredJob == null || restoredJob.Engine.Canceled);123 } while (restoredJob == null || (restoredJob.Progress < 1.0)); 123 124 124 125 job = restoredJob; … … 133 134 public void RequestSnapshot() { 134 135 IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(HiveServerUrl); 135 136 int retryCount = 0; 136 137 ResponseObject<SerializedJobResult> response; 137 138 lock (locker) { … … 151 152 response = executionEngineFacade.GetLastSerializedResult(jobId, true); 152 153 HiveLogger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success); 154 retryCount++; 153 155 // loop while 154 156 // 1. problem with communication with server 155 157 // 2. job result not yet ready 156 158 } while ( 159 (retryCount < MAX_SNAPSHOT_RETRIES) && ( 157 160 !response.Success || 158 response.StatusMessage == ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE); 161 response.StatusMessage == ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE) 162 ); 159 163 } 160 164 } … … 180 184 public void Abort() { 181 185 abortRequested = true; 182 RequestSnapshot();186 // RequestSnapshot(); 183 187 IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(HiveServerUrl); 184 188 executionEngineFacade.AbortJob(jobId); … … 195 199 196 200 private HeuristicLab.Hive.Contracts.BusinessObjects.SerializedJob CreateJobObj() { 197 HeuristicLab.Hive.Contracts.BusinessObjects.Job jobObj = 201 HeuristicLab.Hive.Contracts.BusinessObjects.Job jobObj = 198 202 new HeuristicLab.Hive.Contracts.BusinessObjects.Job(); 199 203
Note: See TracChangeset
for help on using the changeset viewer.