|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.farming.common.Server
org.gridbus.broker.farming.common.ComputeServer
public abstract class ComputeServer
This class describes a general computational server and provides the methods for accessing and manipulating the information contained.
| Field Summary | |
|---|---|
static int |
ALCHEMI
Default Alchemi version supported (v.0.8) |
static int |
ALCHEMI_0_8
|
static int |
BUSY
Server is busy |
static int |
CHECKING_REQUIREMENTS
Status used when the ComputeServer is checking requirements... |
static int |
CONDOR
Default Condor Version supported (v.6.6.9) |
static int |
CONDOR_6_6_9
|
static int |
CONDOR_SHAREDFS
Condor server with a shared-file-system |
static int |
FORK
|
static int |
GLOBUS
Default Globus version supported (v.2.4) |
static int |
GLOBUS_2_4
|
static int |
GLOBUS_3_2
|
static int |
GLOBUS_4_0
|
static int |
NORDUGRID
Default NORDUGRID version supported () |
static int |
PBS
Default PBS version supported (OpenPBS 2.3) |
static int |
READY
Server is ready |
static int |
SGE
Default SGE version supported () |
static int |
STATUS_ANY
Refers to ComputeServer with all / any status |
static int |
UNICORE
Default Unicore version supported (v.4.1) |
static int |
UNICORE_4_1
|
static int |
UNKNOWN
|
static int |
XGRID
Default XGRID version supported (technical preview 2, v.1.0) |
| Constructor Summary | |
|---|---|
ComputeServer(java.lang.String hostname,
java.lang.String managerType,
java.lang.Object o)
This constructor allows for passing of an Object which may be used to configure this object. |
|
ComputeServer(java.lang.String hostname,
java.lang.String managerType,
java.lang.Object o,
Dispatcher d)
Constructor using the dispatcher |
|
| Method Summary | |
|---|---|
void |
addJobListener(JobListener jl)
Registers a joblistener with the server. |
void |
addQueue(JobQueue q)
|
void |
calcJobLimit(long totalWaitJobs,
float totalAvgRateCompl)
Calculates the number of jobs that can be allocated to this server. |
void |
decAllocatedJobs()
Decrements the number of jobs allocated to this server |
abstract boolean |
discoverProperties()
Discover the dynamic server properties |
boolean |
discoverPropertiesGeneric()
Checks if the compute server is up, and sets all its attributes (This method has some generic code that could be used by all middleware(running locally / remotely-on-Unix-like nodes)) |
long |
getAllocatedJobs()
Returns the number of jobs allocated to this server and not in execution |
java.lang.String |
getArch()
Returns the architecture of the compute server |
float |
getAvgJobComputationTime()
Returns the average job completion time |
float |
getAvgRateofCompletion()
Returns the rate of completion of jobs of this server averaged over the number of polling intervals |
long |
getBufferedJobs()
Returns the number of jobs locally queued to this server and not in execution |
float |
getBusytime()
Returns the time interval for which the server was busy. |
java.lang.Object |
getConfig()
|
java.lang.String |
getContactString()
Returns the server contact string. |
java.lang.String |
getCPU()
Returns the processor in the compute server |
java.lang.String |
getCPUspeed()
Returns the processor speed. |
Dispatcher |
getDispatcher()
tcma added for the dispatcher |
long |
getExecutingJobs()
Returns the number of jobs currently executing on the server. |
long |
getFailedJobs()
Returns the number of failed jobs |
int |
getJobLimit()
Returns the maximum number of jobs that can be allocated to this server. |
java.lang.String |
getJobManager()
|
int |
getJobsCompletedCurrentPoll()
Returns the number of jobs finished since the last time the server information was updated |
int |
getMaxnumjobs()
|
float |
getMemfree()
Returns the free RAM available |
float |
getMemtotal()
Returns total physical memory (RAM) available |
NodeRequirement |
getNodeRequirements()
|
int |
getNumCPUs()
Returns the number of processors. |
java.lang.String |
getOS()
Returns the OS string |
float |
getPrevtime()
Returns the prevtime. |
float |
getPricePerCpuSec()
Returns the cost of using the server per one second of CPU execution time |
float |
getPricePerJob()
Returns the cost per each job executed on this computeserver |
java.util.Collection |
getQueues()
|
int |
getServerStatus()
Returns the server status as an integer |
java.lang.String |
getStatus()
returns the Status of this compute Server |
float |
getTimeperjob()
Returns the time taken per job |
long |
getTotalFinishedJobs()
Returns the number of jobs that have been finished on this server so far. |
int |
getType()
|
UserCredential |
getUserCredential()
|
void |
incAllocatedJobs()
Increments the number of jobs allocated to this server |
void |
incFailedJobs()
Increments the number of jobs failed on this server |
void |
incJobsCompletedCurrentPoll()
Increments the number of jobs that have finished on this server |
void |
incTotalFinishedJobs()
Increments the totalFinishedJobs. |
boolean |
isAlive()
Checks if this server is alive or not, that is whether it is reachable and responding to queries. |
boolean |
isFirewalled()
|
boolean |
isRequirementSatisfied()
|
void |
notifyListeners(Job j)
|
void |
recoverJob(Job j)
This method queries the remote-node for the latest job-status and tries to recover the job output from the remote-node. |
void |
removeAllJobListeners()
Unregisters all the joblisteners |
void |
removeJobListener(JobListener jl)
Unregisters a joblistener. |
static java.lang.String |
serverTypeString(int serverType)
Default type is GLOBUS. |
void |
setAliveFlag(boolean alive)
Sets the alive flag |
void |
setAllocatedJobs(long number)
Sets the number of jobs that have been allocated to this server. |
void |
setArch(java.lang.String string)
Sets the architecture of this server |
void |
setAvgJobComputationTime(float f)
Sets the average job completion time |
void |
setBufferedJobs(long locallyQed)
|
void |
setBusytime(float busytime)
Sets the busytime. |
void |
setConfig(java.lang.Object o)
The object o, is used to set some configuration properties for the ComputeServer, and related classes. |
void |
setContactString(java.lang.String string)
Sets the server contact string. |
void |
setDispatcher(Dispatcher d)
Sets the dispatcher |
void |
setExecutingJobs(long executingJobs)
|
void |
setFailedJobs(long failedJobs)
|
void |
setFirewalled(boolean isFirewalled)
|
void |
setJobLimit(int jobLimit)
Sets the maximum number of jobs that can be allocated to this server. |
void |
setJobManager(java.lang.String jobManager)
|
void |
setJobsCompletedCurrentPoll(int n)
Sets the number of Finished jobs |
void |
setMaxnumjobs(int maxnumjobs)
|
void |
setMemtotal(float f)
Sets the value for the total physical memory for this server |
void |
setNodeRequirements(NodeRequirement nodeRequirements)
|
void |
setNumCPUs(int i)
Sets the number of processors. |
void |
setOS(java.lang.String string)
Sets the OS |
void |
setPrevtime(float prevtime)
Sets the last time the server information was updated |
void |
setPricePerCpuSec(float cost)
Sets the cost of using the server per second of the CPUtime used |
void |
setPricePerJob(float cost)
Sets the cost per job for this compute server |
void |
setQueues(java.util.Collection queues)
|
void |
setTimeperjob(float timeperjob)
Sets the timeperjob. |
void |
setTotalFinishedJobs(long i)
Sets the number of jobs that have been finished so far |
void |
setType(int type)
|
void |
setUserCredential(UserCredential userCredential)
|
void |
shutdown()
This method will stop the manager for this compute server, and shutdown the compute server. |
void |
startMonitoring(Job j)
Starts monitoring the job passed in, if it was submitted to this server. |
void |
startup()
Start the ComputeServer, and its Manager and JobMonitor for this server. |
static int |
statusInt(java.lang.String serverStatus)
Converts the given string status to int form. |
static java.lang.String |
statusString(int serverStatus)
Converts the given int status to string form. |
void |
submitJob(Job j)
Submits a job for execution on this server. |
void |
updateAvgRateofCompletion(int numPoll,
int pollTime)
Updates the average rate of completion |
void |
updateStatus(java.lang.String status)
Updates the status of this server. |
| Methods inherited from class org.gridbus.broker.farming.common.Server |
|---|
getHostname, getServerID, setHostname, setServerID |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int FORK
public static final int GLOBUS_2_4
public static final int GLOBUS_3_2
public static final int GLOBUS_4_0
public static final int GLOBUS
public static final int UNICORE_4_1
public static final int UNICORE
public static final int ALCHEMI_0_8
public static final int ALCHEMI
public static final int CONDOR_6_6_9
public static final int CONDOR
public static final int CONDOR_SHAREDFS
public static final int PBS
public static final int NORDUGRID
public static final int XGRID
public static final int SGE
public static final int READY
public static final int BUSY
public static final int CHECKING_REQUIREMENTS
public static final int STATUS_ANY
| Constructor Detail |
|---|
public ComputeServer(java.lang.String hostname,
java.lang.String managerType,
java.lang.Object o)
hostname - managerType - o -
public ComputeServer(java.lang.String hostname,
java.lang.String managerType,
java.lang.Object o,
Dispatcher d)
hostname - managerType - o - d - | Method Detail |
|---|
public void setConfig(java.lang.Object o)
o - public static java.lang.String statusString(int serverStatus)
serverStatus -
public static int statusInt(java.lang.String serverStatus)
serverStatus -
public static java.lang.String serverTypeString(int serverType)
serverType -
public java.lang.String getStatus()
public int getServerStatus()
public int getMaxnumjobs()
public void setMaxnumjobs(int maxnumjobs)
maxnumjobs - The maxnumjobs to set.public final void startup()
public final void shutdown()
public void calcJobLimit(long totalWaitJobs,
float totalAvgRateCompl)
totalWaitJobs - totalAvgRateCompl - public long getAllocatedJobs()
public long getBufferedJobs()
public float getAvgRateofCompletion()
public float getBusytime()
public float getPricePerCpuSec()
public float getPricePerJob()
public long getExecutingJobs()
public int getJobsCompletedCurrentPoll()
public int getJobLimit()
public float getPrevtime()
public float getTimeperjob()
public long getTotalFinishedJobs()
public void incAllocatedJobs()
public void decAllocatedJobs()
public void incJobsCompletedCurrentPoll()
public void incTotalFinishedJobs()
public void incFailedJobs()
public boolean isAlive()
public void setAliveFlag(boolean alive)
alive - public void setAllocatedJobs(long number)
number - public void setExecutingJobs(long executingJobs)
executingJobs - The executingJobs to set.public void setFailedJobs(long failedJobs)
failedJobs - The failedJobs to set.
public void updateAvgRateofCompletion(int numPoll,
int pollTime)
numPoll - pollTime - public void setBusytime(float busytime)
busytime - The busytime to setpublic void setPricePerCpuSec(float cost)
cost - public void setPricePerJob(float cost)
cost - public void setJobsCompletedCurrentPoll(int n)
n - public void setJobLimit(int jobLimit)
jobLimit - The jobLimit to setpublic void setPrevtime(float prevtime)
prevtime - The prevtime to setpublic void setTimeperjob(float timeperjob)
timeperjob - The timeperjob to setpublic void setTotalFinishedJobs(long i)
i - public boolean discoverPropertiesGeneric()
public abstract boolean discoverProperties()
throws java.lang.Exception
java.lang.Exceptionpublic void updateStatus(java.lang.String status)
status - public final void submitJob(Job j)
j - - the Job to be executed.public final void startMonitoring(Job j)
j - public java.lang.String getOS()
public void setOS(java.lang.String string)
string - public float getAvgJobComputationTime()
public void setAvgJobComputationTime(float f)
f - public long getFailedJobs()
public java.lang.String getContactString()
public void setContactString(java.lang.String string)
string - public java.lang.String getArch()
public float getMemtotal()
public void setArch(java.lang.String string)
string - public void setMemtotal(float f)
f - public int getNumCPUs()
public void setNumCPUs(int i)
i - intpublic int getType()
public void setType(int type)
type - The type to set.public void setNodeRequirements(NodeRequirement nodeRequirements)
nodeRequirements - public NodeRequirement getNodeRequirements()
public boolean isRequirementSatisfied()
public final void addJobListener(JobListener jl)
jl - public final void notifyListeners(Job j)
j - public final void removeJobListener(JobListener jl)
jl - public final void removeAllJobListeners()
public final void recoverJob(Job j)
j - (Job whose output needs to be recovered).public UserCredential getUserCredential()
public void setUserCredential(UserCredential userCredential)
userCredential - The userCredential to set.public java.util.Collection getQueues()
public void addQueue(JobQueue q)
q - public void setQueues(java.util.Collection queues)
queues - The queues to set.public java.lang.Object getConfig()
public boolean isFirewalled()
public void setFirewalled(boolean isFirewalled)
isFirewalled - The isFirewalled to set.public void setDispatcher(Dispatcher d)
d - public Dispatcher getDispatcher()
public java.lang.String getJobManager()
public void setJobManager(java.lang.String jobManager)
jobManager - The jobManager to set.public void setBufferedJobs(long locallyQed)
locallyQed - public java.lang.String getCPU()
public float getMemfree()
public java.lang.String getCPUspeed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||