Back to index

nordugrid-arc-nox  1.1.0~rc6
ExecutionTarget.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_EXECUTIONTARGET_H__
00004 #define __ARC_EXECUTIONTARGET_H__
00005 
00006 #include <list>
00007 #include <map>
00008 #include <string>
00009 
00010 #include <arc/DateTime.h>
00011 #include <arc/URL.h>
00012 #include <arc/client/JobDescription.h>
00013 #include <arc/client/Software.h>
00014 #include <arc/client/Submitter.h>
00015 
00016 namespace Arc {
00017 
00018   class Submitter;
00019   class UserConfig;
00020 
00022 
00032   class ApplicationEnvironment
00033     : public Software {
00034   public:
00035     ApplicationEnvironment() {}
00036     ApplicationEnvironment(const std::string& Name)
00037       : Software(Name) {}
00038     ApplicationEnvironment(const std::string& Name, const std::string& Version)
00039       : Software(Name, Version) {}
00040     ApplicationEnvironment& operator=(const Software& sv) {
00041       Software::operator=(sv);
00042       return *this;
00043     }
00044     std::string State;
00045     int FreeSlots;
00046     int FreeJobs;
00047     int FreeUserSeats;
00048   };
00049 
00050 
00052 
00059   class ExecutionTarget {
00060 
00061   public:
00063 
00067     ExecutionTarget();
00068 
00070 
00075     ExecutionTarget(const ExecutionTarget& target);
00076 
00078 
00084     ExecutionTarget(const long int addrptr);
00085 
00087 
00093     ExecutionTarget& operator=(const ExecutionTarget& target);
00094 
00095     virtual ~ExecutionTarget();
00096 
00097   private:
00098     void Copy(const ExecutionTarget& target);
00099 
00100   public:
00101 
00103 
00112     Submitter* GetSubmitter(const UserConfig& ucfg) const;
00113 
00114 
00116 
00126     void Update(const JobDescription& jobdesc);
00127 
00129 
00134     void Print(bool longlist) const;
00135 
00136     // Attributes from 5.3 Location
00137 
00138     std::string Address;
00139     std::string Place;
00140     std::string Country;
00141     std::string PostCode;
00142     float Latitude;
00143     float Longitude;
00144 
00145     // Attributes from 5.5.1 Admin Domain
00146 
00147     std::string DomainName;
00148     std::string Owner;
00149 
00150     // Attributes from 6.1 Computing Service
00151 
00152     std::string ServiceName;
00153     std::string ServiceType;
00154 
00155     // Attributes from 6.2 Computing Endpoint
00156 
00157     URL url;
00158     std::list<std::string> Capability;
00159     std::string Technology;
00160     std::string InterfaceName;
00161     std::list<std::string> InterfaceVersion;
00162     std::list<std::string> InterfaceExtension;
00163     std::list<std::string> SupportedProfile;
00164     std::string Implementor;
00165     Software Implementation;
00166     std::string QualityLevel;
00167     std::string HealthState;
00168     std::string HealthStateInfo;
00169     std::string ServingState;
00170     std::string IssuerCA;
00171     std::list<std::string> TrustedCA;
00172     Time DowntimeStarts;
00173     Time DowntimeEnds;
00174     std::string Staging;
00175     std::list<std::string> JobDescriptions;
00176 
00177     // Attributes from 6.3 Computing Share
00178 
00180 
00184     std::string ComputingShareName;
00185 
00186     Period MaxWallTime;
00187     Period MaxTotalWallTime; // not in current Glue2 draft
00188     Period MinWallTime;
00189     Period DefaultWallTime;
00190     Period MaxCPUTime;
00191     Period MaxTotalCPUTime;
00192     Period MinCPUTime;
00193     Period DefaultCPUTime;
00194     int MaxTotalJobs;
00195     int MaxRunningJobs;
00196     int MaxWaitingJobs;
00197     int MaxPreLRMSWaitingJobs;
00198     int MaxUserRunningJobs;
00199     int MaxSlotsPerJob;
00200     int MaxStageInStreams;
00201     int MaxStageOutStreams;
00202     std::string SchedulingPolicy;
00203 
00205 
00210     int64_t MaxMainMemory;
00211 
00213 
00218     int64_t MaxVirtualMemory;
00219 
00221 
00226     int64_t MaxDiskSpace;
00227 
00228     URL DefaultStorageService;
00229     bool Preemption;
00230     int TotalJobs;
00231     int RunningJobs;
00232     int LocalRunningJobs;
00233     int WaitingJobs;
00234     int LocalWaitingJobs;
00235     int SuspendedJobs;
00236     int LocalSuspendedJobs;
00237     int StagingJobs;
00238     int PreLRMSWaitingJobs;
00239     Period EstimatedAverageWaitingTime;
00240     Period EstimatedWorstWaitingTime;
00241     int FreeSlots;
00242     std::map<Period, int> FreeSlotsWithDuration;
00243     int UsedSlots;
00244     int RequestedSlots;
00245     std::string ReservationPolicy;
00246 
00247     // Attributes from 6.4 Computing Manager
00248 
00249     std::string ManagerProductName;
00250     std::string ManagerProductVersion;
00251     bool Reservation;
00252     bool BulkSubmission;
00253     int TotalPhysicalCPUs;
00254     int TotalLogicalCPUs;
00255     int TotalSlots;
00256     bool Homogeneous;
00257     std::list<std::string> NetworkInfo;
00258     bool WorkingAreaShared;
00259     int WorkingAreaTotal;
00260     int WorkingAreaFree;
00261     Period WorkingAreaLifeTime;
00262     int CacheTotal;
00263     int CacheFree;
00264 
00265     // Attributes from 6.5 Benchmark
00266 
00267     std::map<std::string, double> Benchmarks;
00268 
00269     // Attributes from 6.6 Execution Environment
00270 
00271     std::string Platform;
00272     bool VirtualMachine;
00273     std::string CPUVendor;
00274     std::string CPUModel;
00275     std::string CPUVersion;
00276     int CPUClockSpeed;
00277     int MainMemorySize;
00278 
00280 
00291     Software OperatingSystem;
00292 
00293     bool ConnectivityIn;
00294     bool ConnectivityOut;
00295 
00297 
00301     std::list<ApplicationEnvironment> ApplicationEnvironments;
00302 
00303     // Other
00304 
00305     std::string GridFlavour;
00306     URL Cluster; // contains the URL of the infosys that provided the info
00307 
00308   private:
00309     SubmitterLoader loader;
00310   };
00311 
00312 } // namespace Arc
00313 
00314 #endif // __ARC_EXECUTIONTARGET_H__