public class XmlRpcResourceManagerClient extends Object
The XML RPC based resource manager client.
Modifier and Type | Field and Description |
---|---|
static int |
INT |
static int |
INT1 |
static int |
VAL |
static int |
VAL1 |
Constructor and Description |
---|
XmlRpcResourceManagerClient(URL url)
Constructs a new XmlRpcResourceManagerClient with the given
url . |
Modifier and Type | Method and Description |
---|---|
void |
addNode(ResourceNode node)
Adds a node
|
void |
addNodeToQueue(String nodeId,
String queueName)
Addes the node with given id to the queue with the given name
|
void |
addQueue(String queueName)
Creates a queue with the given name
|
String |
getExecReport() |
String |
getExecutionNode(String jobId) |
Job |
getJobInfo(String jobId) |
int |
getJobQueueCapacity()
Gets the max number of Jobs allowed in JobQueue
|
int |
getJobQueueSize()
Gets the number of Jobs in JobQueue
|
ResourceNode |
getNodeById(String nodeId) |
String |
getNodeLoad(String nodeId)
Report on the load of the requested node
|
String |
getNodeReport() |
List |
getNodes() |
List<String> |
getNodesInQueue(String queueName)
Gets a list of ids of the nodes in the given queue
|
List |
getQueuedJobs() |
List<String> |
getQueues()
Gets a list of currently supported queue names
|
List<String> |
getQueuesWithNode(String nodeId)
Gets a list of queues which contain the node with the given nodeId
|
static String |
getReadableJobStatus(String status) |
URL |
getResMgrUrl() |
boolean |
isAlive() |
boolean |
isJobComplete(String jobId) |
boolean |
killJob(String jobId) |
static void |
main(String[] args) |
void |
removeNode(String nodeId)
Removes the node with the given id
|
void |
removeNodeFromQueue(String nodeId,
String queueName)
Remove the node with the given id from the queue with the given name
|
void |
removeQueue(String queueName)
Removes the queue with the given name
|
void |
setNodeCapacity(String nodeId,
int capacity) |
void |
setResMgrUrl(URL resMgrUrl) |
String |
submitJob(Job exec,
JobInput in) |
boolean |
submitJob(Job exec,
JobInput in,
URL hostUrl) |
public static final int VAL
public static final int INT
public static final int VAL1
public static final int INT1
public XmlRpcResourceManagerClient(URL url)
Constructs a new XmlRpcResourceManagerClient with the given
url
.
url
- The url pointer to the xml rpc resource manager service.public static void main(String[] args)
public boolean isJobComplete(String jobId) throws JobRepositoryException
JobRepositoryException
public Job getJobInfo(String jobId) throws JobRepositoryException
JobRepositoryException
public boolean isAlive()
public int getJobQueueSize() throws JobRepositoryException
JobRepositoryException
- On Any Exceptionpublic int getJobQueueCapacity() throws JobRepositoryException
JobRepositoryException
- On Any Exceptionpublic boolean killJob(String jobId)
public String submitJob(Job exec, JobInput in) throws JobExecutionException
JobExecutionException
public boolean submitJob(Job exec, JobInput in, URL hostUrl) throws JobExecutionException
JobExecutionException
public List getNodes() throws MonitorException
MonitorException
public ResourceNode getNodeById(String nodeId) throws MonitorException
MonitorException
public URL getResMgrUrl()
public void setResMgrUrl(URL resMgrUrl)
resMgrUrl
- the resMgrUrl to setpublic void addQueue(String queueName) throws QueueManagerException
queueName
- The name of the queue to be createdQueueManagerException
- on any errorpublic void removeQueue(String queueName) throws QueueManagerException
queueName
- The name of the queue to be removedQueueManagerException
- on any errorpublic void addNode(ResourceNode node) throws MonitorException
node
- The node to be addedMonitorException
- on any errorpublic void removeNode(String nodeId) throws MonitorException
nodeId
- The id of the node to be removedMonitorException
- on any errorpublic void setNodeCapacity(String nodeId, int capacity) throws MonitorException
MonitorException
public void addNodeToQueue(String nodeId, String queueName) throws QueueManagerException
nodeId
- The id of the node to be added to the given queueNamequeueName
- The name of the queue to add the given nodeQueueManagerException
- on any errorpublic void removeNodeFromQueue(String nodeId, String queueName) throws QueueManagerException
nodeId
- The id of the node to be remove from the given queueNamequeueName
- The name of the queue from which to remove the given nodeQueueManagerException
- on any errorpublic List<String> getQueues() throws QueueManagerException
QueueManagerException
- on any errorpublic List<String> getNodesInQueue(String queueName) throws QueueManagerException
queueName
- The name of the queue to get node ids fromQueueManagerException
- on any errorpublic List<String> getQueuesWithNode(String nodeId) throws QueueManagerException
nodeId
- The id of the node to get queues it belongs toQueueManagerException
- on any errorpublic String getNodeLoad(String nodeId) throws MonitorException
nodeId
- The id of the node to be polledMonitorException
- on any errorpublic List getQueuedJobs() throws JobQueueException
JobQueueException
public String getNodeReport() throws MonitorException
MonitorException
public String getExecReport() throws JobRepositoryException
JobRepositoryException
Copyright © 1999–2017 Apache OODT. All rights reserved.