You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by bf...@apache.org on 2011/11/16 20:13:50 UTC
svn commit: r1202844 [1/2] - in /oodt/trunk/resource: ./ src/main/assembly/
src/main/bin/ src/main/java/org/apache/oodt/cas/resource/cli/
src/main/java/org/apache/oodt/cas/resource/cli/action/
src/main/java/org/apache/oodt/cas/resource/system/ src/main...
Author: bfoster
Date: Wed Nov 16 19:13:49 2011
New Revision: 1202844
URL: http://svn.apache.org/viewvc?rev=1202844&view=rev
Log:
- integrated CAS-Resource with CAS-CLI
Added:
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java (with props)
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java (with props)
oodt/trunk/resource/src/main/resources/cmd-line-actions.xml (with props)
oodt/trunk/resource/src/main/resources/cmd-line-options.xml (with props)
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/cli/
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/cli/TestResourceCli.java (with props)
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/cli/UseMockClientCmdLineActionStore.java (with props)
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/schedule/
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/schedule/MockScheduler.java (with props)
oodt/trunk/resource/src/test/org/apache/oodt/cas/resource/system/MockXmlRpcResourceManagerClient.java (with props)
Modified:
oodt/trunk/resource/pom.xml
oodt/trunk/resource/src/main/assembly/assembly.xml
oodt/trunk/resource/src/main/bin/resmgr-client
oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManagerClient.java
oodt/trunk/resource/src/main/resources/logging.properties
Modified: oodt/trunk/resource/pom.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/pom.xml?rev=1202844&r1=1202843&r2=1202844&view=diff
==============================================================================
--- oodt/trunk/resource/pom.xml (original)
+++ oodt/trunk/resource/pom.xml Wed Nov 16 19:13:49 2011
@@ -91,6 +91,11 @@ the License.
<version>${project.parent.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.oodt</groupId>
+ <artifactId>cas-cli</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.3</version>
Modified: oodt/trunk/resource/src/main/assembly/assembly.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/assembly/assembly.xml?rev=1202844&r1=1202843&r2=1202844&view=diff
==============================================================================
--- oodt/trunk/resource/src/main/assembly/assembly.xml (original)
+++ oodt/trunk/resource/src/main/assembly/assembly.xml Wed Nov 16 19:13:49 2011
@@ -55,6 +55,14 @@ the License.
</includes>
</fileSet>
<fileSet>
+ <directory>${basedir}/src/main/resources</directory>
+ <outputDirectory>policy</outputDirectory>
+ <includes>
+ <include>cmd-line-actions.xml</include>
+ <include>cmd-line-options.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
<directory>${basedir}/src/main/resources/examples</directory>
<outputDirectory>policy</outputDirectory>
<excludes/>
Modified: oodt/trunk/resource/src/main/bin/resmgr-client
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/bin/resmgr-client?rev=1202844&r1=1202843&r2=1202844&view=diff
==============================================================================
--- oodt/trunk/resource/src/main/bin/resmgr-client (original)
+++ oodt/trunk/resource/src/main/bin/resmgr-client Wed Nov 16 19:13:49 2011
@@ -25,4 +25,10 @@ fi
export JAVA_HOME
-$JAVA_HOME/bin/java -Djava.ext.dirs=../lib -Dorg.apache.oodt.cas.resource.properties=../etc/resource.properties -Djava.util.logging.config.file=../etc/logging.properties org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient $*
+$JAVA_HOME/bin/java \
+ -Djava.ext.dirs=../lib \
+ -Dorg.apache.oodt.cas.resource.properties=../etc/resource.properties \
+ -Djava.util.logging.config.file=../etc/logging.properties \
+ -Dorg.apache.oodt.cas.cli.action.spring.config=../policy/cmd-line-actions.xml \
+ -Dorg.apache.oodt.cas.cli.option.spring.config=../policy/cmd-line-options.xml \
+ org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient $*
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.net.URL;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.cas.resource.structs.ResourceNode;
+
+/**
+ * A {@link CmdLineAction} which adds a ResourceNode.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class AddNodeCliAction extends ResourceCliAction {
+
+ private String nodeId;
+ private URL nodeUrl;
+ private int capacity;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+ Validate.notNull(nodeUrl, "Must specify nodeUrl");
+ Validate.notNull(capacity, "Must specify capacity");
+
+ getClient().addNode(new ResourceNode(nodeId, nodeUrl, capacity));
+ System.out.println("Successfully added node!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to add node with nodeId '"
+ + nodeId + "', nodeUrl '" + nodeUrl + "', and capacity '"
+ + capacity + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ public void setNodeUrl(URL nodeUrl) {
+ this.nodeUrl = nodeUrl;
+ }
+
+ public void setCapacity(int capacity) {
+ this.capacity = capacity;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAcion} which adds a Node to a Queue.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class AddNodeToQueueCliAction extends ResourceCliAction {
+
+ private String queueName;
+ private String nodeId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(queueName, "Must specify queueName");
+ Validate.notNull(nodeId, "Must specify nodeId");
+
+ getClient().addNodeToQueue(nodeId, queueName);
+ System.out.println("Successfully added node to queue!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get add node '" + nodeId
+ + "' to queue '" + queueName + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddNodeToQueueCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which adds a queue.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class AddQueueCliAction extends ResourceCliAction {
+
+ private String queueName;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(queueName, "Must specify queueName");
+
+ getClient().addQueue(queueName);
+ System.out.println("Successfully added queue!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to add queue with name '"
+ + queueName + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/AddQueueCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which get execution node for a job.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetExecNodeCliAction extends ResourceCliAction {
+
+ private String jobId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(jobId, "Must specify jobId");
+
+ String execNode = getClient().getExecutionNode(jobId);
+ System.out.println("Executing node: " + execNode);
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get execution node for"
+ + " job '" + jobId + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetExecNodeCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.cas.resource.structs.Job;
+import org.apache.oodt.cas.resource.structs.JobStatus;
+
+/**
+ * A {@link CmdLineAction} which gets job info.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetJobInfoCliAction extends ResourceCliAction {
+
+ private String jobId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(jobId, "Must specify jobId");
+
+ Job jobInfo = getClient().getJobInfo(jobId);
+
+ System.out.println("Job: [id=" + jobId + ", status="
+ + getReadableJobStatus(jobInfo.getStatus()) + ",name="
+ + jobInfo.getName() + ",queue=" + jobInfo.getQueueName()
+ + ",load=" + jobInfo.getLoadValue() + ",inputClass="
+ + jobInfo.getJobInputClassName() + ",instClass="
+ + jobInfo.getJobInstanceClassName() + "]");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get job info for job '"
+ + jobId + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+
+ private static String getReadableJobStatus(String status) {
+ if (status.equals(JobStatus.SUCCESS)) {
+ return "SUCCESS";
+ } else if (status.equals(JobStatus.FAILURE)) {
+ return "FAILURE";
+ } else if (status.equals(JobStatus.EXECUTED)) {
+ return "EXECUTED";
+ } else if (status.equals(JobStatus.QUEUED)) {
+ return "QUEUED";
+ } else if (status.equals(JobStatus.SCHEDULED)) {
+ return "SCHEDULED";
+ } else if (status.equals(JobStatus.KILLED)) {
+ return "KILLED";
+ } else
+ return null;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetJobInfoCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.cas.resource.structs.ResourceNode;
+
+/**
+ * A {@link CmdLineAction} which gets a ResourceNode by ID.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetNodeByIdCliAction extends ResourceCliAction {
+
+ private String nodeId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+
+ ResourceNode node = getClient().getNodeById(nodeId);
+
+ if (node == null) {
+ throw new Exception("ResourceManager returned null ResourceNode"
+ + " for nodeId '" + nodeId + "'");
+ }
+ System.out.println("node: [id=" + node.getNodeId() + ",capacity="
+ + node.getCapacity() + ",url=" + node.getIpAddr() + "]");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get node by id '" + nodeId
+ + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeByIdCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which get load of given node.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetNodeLoadCliAction extends ResourceCliAction {
+
+ private String nodeId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+
+ String result = getClient().getNodeLoad(nodeId);
+ System.out.println("Load for node '" + nodeId + "': " + result);
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get node load for node '"
+ + nodeId + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodeLoadCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.util.List;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.cas.resource.structs.ResourceNode;
+
+/**
+ * A {@link CmdLineAction} which get list of ResourceNodes.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetNodesCliAction extends ResourceCliAction {
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ @SuppressWarnings("unchecked")
+ List<ResourceNode> nodes = getClient().getNodes();
+
+ if (nodes == null) {
+ throw new Exception("ResourceManager returned null nodes");
+ }
+ for (ResourceNode node : nodes) {
+ System.out.println("node: [id=" + node.getNodeId() + ",capacity="
+ + node.getCapacity() + ",url=" + node.getIpAddr() + "]");
+ }
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get nodes : "
+ + e.getMessage(), e);
+ }
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.util.List;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which gets the nodes in a queue.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetNodesInQueueCliAction extends ResourceCliAction {
+
+ private String queueName;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(queueName, "Must specify queueName");
+
+ List<String> nodeIds = getClient().getNodesInQueue(queueName);
+ System.out.println("Nodes in Queue '" + queueName + "':");
+ for (String nodeId : nodeIds)
+ System.out.println(" - " + nodeId);
+ System.out.println();
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get nodes in queue '"
+ + queueName + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetNodesInQueueCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.util.List;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which gets list of Node queues.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetQueuesCliAction extends ResourceCliAction {
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ List<String> queueNames = getClient().getQueues();
+ System.out.println("Queues:");
+ for (String queueName : queueNames)
+ System.out.println(" - " + queueName);
+ System.out.println();
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get queues : "
+ + e.getMessage(), e);
+ }
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.util.List;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which gets queues with given node id.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class GetQueuesWithNodeCliAction extends ResourceCliAction {
+
+ private String nodeId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+
+ List<String> queueNames = getClient().getQueuesWithNode(nodeId);
+ System.out.println("Queues with node '" + nodeId + "':");
+ for (String queueName : queueNames)
+ System.out.println(" - " + queueName);
+ System.out.println();
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to get queues with node '"
+ + nodeId + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/GetQueuesWithNodeCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which kills a job.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class KillCliAction extends ResourceCliAction {
+
+ private String jobId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(jobId, "Must specify jobId");
+
+ if (getClient().killJob(jobId)) {
+ System.out.println("Job: [" + jobId + "] successfully killed.");
+ } else {
+ throw new Exception("Kill job returned false");
+ }
+
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to kill job '" + jobId
+ + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/KillCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which removes a node by id.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class RemoveNodeCliAction extends ResourceCliAction {
+
+ private String nodeId;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+
+ getClient().removeNode(nodeId);
+ System.out.println("Successfully removed node!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to remove node with id '"
+ + nodeId + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which removes a node from a queue.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class RemoveNodeFromQueueCliAction extends ResourceCliAction {
+
+ private String nodeId;
+ private String queueName;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+ Validate.notNull(queueName, "Must specify queueName");
+
+ getClient().removeNodeFromQueue(nodeId, queueName);
+ System.out.println("Successfully removed node from queue!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to remove node '"
+ + nodeId + "' from queue '" + queueName + "' : "
+ + e.getMessage(), e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveNodeFromQueueCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which removes a queue.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class RemoveQueueCliAction extends ResourceCliAction {
+
+ private String queueName;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull("Must specify queueName");
+
+ getClient().removeQueue(queueName);
+ System.out.println("Successfully removed queue!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to remove queue with name '"
+ + queueName + "' : " + e.getMessage(), e);
+ }
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/RemoveQueueCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.net.MalformedURLException;
+import java.net.URL;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.action.CmdLineAction;
+import org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient;
+
+/**
+ * Base {@link CmdLineAction} for Workflow Manager.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public abstract class ResourceCliAction extends CmdLineAction {
+
+ private XmlRpcResourceManagerClient client;
+
+ public String getUrl() {
+ return System.getProperty("org.apache.oodt.cas.workflow.url");
+ }
+
+ protected XmlRpcResourceManagerClient getClient()
+ throws MalformedURLException {
+ Validate.notNull(getUrl());
+
+ if (client != null) {
+ return client;
+ } else {
+ return new XmlRpcResourceManagerClient(new URL(getUrl()));
+ }
+ }
+
+ public void setClient(XmlRpcResourceManagerClient client) {
+ this.client = client;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/ResourceCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+
+/**
+ * A {@link CmdLineAction} which changes a node's capacity.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class SetNodeCapacityCliAction extends ResourceCliAction {
+
+ private String nodeId;
+ private int capacity;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(nodeId, "Must specify nodeId");
+ Validate.notNull(capacity, "Must specify capacity");
+
+ getClient().setNodeCapacity(nodeId, capacity);
+ System.out.println("Successfully set node capacity!");
+ } catch (Exception e) {
+ throw new CmdLineActionException("", e);
+ }
+ }
+
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ public void setCapacity(int capacity) {
+ this.capacity = capacity;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SetNodeCapacityCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java (added)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java Wed Nov 16 19:13:49 2011
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.cli.action;
+
+//JDK imports
+import java.net.URL;
+
+//Apache imports
+import org.apache.commons.lang.Validate;
+
+//OODT imports
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.cas.resource.structs.JobSpec;
+import org.apache.oodt.cas.resource.util.JobBuilder;
+
+/**
+ * A {@link CmdLineAction} which submits a job.
+ *
+ * @author bfoster (Brian Foster)
+ */
+public class SubmitJobCliAction extends ResourceCliAction {
+
+ public String jobDefinitionFile;
+ public URL url;
+
+ @Override
+ public void execute() throws CmdLineActionException {
+ try {
+ Validate.notNull(jobDefinitionFile, "Must specify jobDefinitionFile");
+
+ JobSpec spec = JobBuilder.buildJobSpec(jobDefinitionFile);
+ if (url == null) {
+ getClient().submitJob(spec.getJob(), spec.getIn());
+ } else {
+ getClient().submitJob(spec.getJob(), spec.getIn(), url);
+ }
+ } catch (Exception e) {
+ throw new CmdLineActionException("Failed to submit job for job"
+ + " definition file '" + jobDefinitionFile + "' : "
+ + e.getMessage(), e);
+ }
+ }
+
+ public void setJobDefinitionFile(String jobDefinitionFile) {
+ this.jobDefinitionFile = jobDefinitionFile;
+ }
+
+ public void setUrl(URL url) {
+ this.url = url;
+ }
+}
Propchange: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/cli/action/SubmitJobCliAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManagerClient.java
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManagerClient.java?rev=1202844&r1=1202843&r2=1202844&view=diff
==============================================================================
--- oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManagerClient.java (original)
+++ oodt/trunk/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManagerClient.java Wed Nov 16 19:13:49 2011
@@ -24,6 +24,7 @@ import org.apache.xmlrpc.XmlRpcClient;
import org.apache.xmlrpc.XmlRpcException;
//OODTimports
+import org.apache.oodt.cas.cli.CmdLineUtility;
import org.apache.oodt.cas.resource.structs.Job;
import org.apache.oodt.cas.resource.structs.JobInput;
import org.apache.oodt.cas.resource.structs.JobStatus;
@@ -113,364 +114,9 @@ public class XmlRpcResourceManagerClient
resMgrUrl = url;
}
- public static void main(String[] args) throws Exception {
-
- String getNodeByIdOperation = "--getNodeById --nodeId <node id>\n";
- String getNodesOperation = "--getNodes\n";
- String getQueuesOperation = "--getQueues\n";
- String addNodeOperation = "--addNode --nodeId <node id> --ipAddr <url> --capacity <max load>\n";
- String removeNodeOperation = "--removeNode --nodeId <node id>\n";
- String setNodeCapacityOperation = "--setNodeCapacity --nodeId <node id> --capacity <max load>\n";
- String addQueueOperation = "--addQueue --queueName <queue name>\n";
- String removeQueueOperation = "--removeQueue --queueName <queue name>\n";
- String addNodeToQueueOperation = "--addNodeToQueue --nodeId <node id> --queueName <queue name>\n";
- String getNodesInQueueOperation = "--getNodesInQueue --queueName <queue name>\n";
- String getQueuesWithNodeOperation = "--getQueuesWithNode --nodeId <node id>\n";
- String removeNodeFromQueueOperation = "--removeNodeFromQueue --nodeId <node id> --queueName <queue name>\n";
- String getNodeLoadOperation = "--getNodeLoad --nodeId <node id>\n";
- String submitJobOperation = "--submitJob --def <job def file> --input <job input constructor>\n";
- String submitJobRemoteOperation = "--submitJob --def <job def file> --input <job input constructor> --url <url>\n";
- String getJobInfoOperation = "--getJobInfo --id <job id>\n";
- String killOperation = "--kill --id <job id>\n";
- String getExecutionNodeOperation = "--getExecNode --id <job id>\n";
-
- String usage = "resmgr-client --url <url to xml rpc service> --operation "
- + "[<operation> [params]]\n"
- + "operations:\n"
- + getNodeByIdOperation
- + getNodesOperation
- + getQueuesOperation
- + addNodeOperation
- + removeNodeOperation
- + addQueueOperation
- + removeQueueOperation
- + addNodeToQueueOperation
- + getNodesInQueueOperation
- + getQueuesWithNodeOperation
- + removeNodeFromQueueOperation
- + submitJobOperation
- + submitJobRemoteOperation
- + getJobInfoOperation
- + killOperation + getExecutionNodeOperation;
-
- String operation = null, url = null;
-
- for (int i = 0; i < args.length; i++) {
- if (args[i].equals("--operation")) {
- operation = args[++i];
- } else if (args[i].equals("--url")) {
- url = args[++i];
- }
- }
-
- if (operation == null) {
- System.err.println(usage);
- System.exit(1);
- }
-
- // create the client
- XmlRpcResourceManagerClient client = new XmlRpcResourceManagerClient(
- new URL(url));
-
- if (operation.equals("--getNodes")) {
- // no arguments to read, just call getNodes
- List resNodes = client.getNodes();
-
- if (resNodes != null && resNodes.size() > 0) {
- for (Iterator i = resNodes.iterator(); i.hasNext();) {
- ResourceNode node = (ResourceNode) i.next();
- System.out.println("node: [id=" + node.getNodeId()
- + ",capacity=" + node.getCapacity() + ",url="
- + node.getIpAddr() + "]");
- }
- }
-
- }else if (operation.equals("--getQueues")) {
- List<String> queueNames = client.getQueues();
- System.out.println("Queues:");
- for (String queueName : queueNames)
- System.out.println(" - " + queueName);
- System.out.println();
-
- }else if (operation.equals("--addNode")) {
- String nodeId = null;
- String nodeUrl = null;
- String capacity = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }else if (args[i].equals("--ipAddr")) {
- nodeUrl = args[++i];
- }else if (args[i].equals("--capacity")) {
- capacity = args[++i];
- }
- }
-
- if (nodeId == null || nodeUrl == null || capacity == null) {
- System.err.println(addNodeOperation);
- System.exit(1);
- }
-
- client.addNode(new ResourceNode(nodeId, new URL(nodeUrl), Integer.parseInt(capacity)));
- System.out.println("Successfully added node!");
-
- }else if (operation.equals("--removeNode")) {
- String nodeId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }
- }
-
- if (nodeId == null) {
- System.err.println(removeNodeOperation);
- System.exit(1);
- }
-
- client.removeNode(nodeId);
- System.out.println("Successfully removed node!");
-
- }else if (operation.equals("--setNodeCapacity")){
- String nodeId = null;
- String capacity = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }else if (args[i].equals("--capacity")) {
- capacity = args[++i];
- }
- }
-
- if (nodeId == null || capacity == null) {
- System.err.println(setNodeCapacityOperation);
- System.exit(1);
- }
-
- client.setNodeCapacity(nodeId, Integer.parseInt(capacity));
- System.out.println("Successfully set node capacity!");
-
- }else if (operation.equals("--addQueue")) {
- String queueName = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--queueName")) {
- queueName = args[++i];
- }
- }
-
- if (queueName == null) {
- System.err.println(addQueueOperation);
- System.exit(1);
- }
-
- client.addQueue(queueName);
- System.out.println("Successfully added queue!");
-
- }else if (operation.equals("--removeQueue")) {
- String queueName = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--queueName")) {
- queueName = args[++i];
- }
- }
-
- if (queueName == null) {
- System.err.println(removeQueueOperation);
- System.exit(1);
- }
-
- client.removeQueue(queueName);
- System.out.println("Successfully removed queue!");
-
- }else if (operation.equals("--addNodeToQueue")) {
- String nodeId = null;
- String queueName = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }else if (args[i].equals("--queueName")) {
- queueName = args[++i];
- }
- }
-
- if (nodeId == null || queueName == null) {
- System.err.println(addNodeToQueueOperation);
- System.exit(1);
- }
-
- client.addNodeToQueue(nodeId, queueName);
- System.out.println("Successfully added node to queue!");
-
- }else if (operation.equals("--removeNodeFromQueue")) {
- String nodeId = null;
- String queueName = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }else if (args[i].equals("--queueName")) {
- queueName = args[++i];
- }
- }
-
- if (nodeId == null || queueName == null) {
- System.err.println(removeNodeFromQueueOperation);
- System.exit(1);
- }
-
- client.removeNodeFromQueue(nodeId, queueName);
- System.out.println("Successfully removed node from queue!");
-
- }else if (operation.equals("--getNodeLoad")){
- String nodeId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }
- }
-
- if(nodeId == null){
- System.err.println(getNodeLoadOperation);
- System.exit(1);
- }
-
- String result = client.getNodeLoad(nodeId);
- System.out.println("Load for " + nodeId + ": " + result);
-
- }else if (operation.equals("--getNodesInQueue")) {
- String queueName = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--queueName")) {
- queueName = args[++i];
- }
- }
-
- if (queueName == null) {
- System.err.println(getNodesInQueueOperation);
- System.exit(1);
- }
-
- List<String> nodeIds = client.getNodesInQueue(queueName);
- System.out.println("Nodes in Queue '" + queueName + "':");
- for (String nodeId : nodeIds)
- System.out.println(" - " + nodeId);
- System.out.println();
-
- }else if (operation.equals("--getQueuesWithNode")) {
- String nodeId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }
- }
-
- if (nodeId == null) {
- System.err.println(getQueuesWithNodeOperation);
- System.exit(1);
- }
-
- List<String> queueNames = client.getQueuesWithNode(nodeId);
- System.out.println("Queues with node '" + nodeId + "':");
- for (String queueName : queueNames)
- System.out.println(" - " + queueName);
- System.out.println();
-
- } else if (operation.equals("--getExecNode")) {
- String jobId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--id")) {
- jobId = args[++i];
- }
- }
-
- if (jobId == null) {
- System.err.println(getExecutionNodeOperation);
- System.exit(1);
-
- }
-
- String execNode = client.getExecutionNode(jobId);
- if (execNode == null || (execNode != null && execNode.equals(""))) {
- System.out.println("Job: [" + jobId
- + "] not executing on any known node!");
- } else {
- System.out.println(execNode);
- }
- } else if (operation.equals("--kill")) {
- String jobId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--id")) {
- jobId = args[++i];
- }
- }
-
- if (jobId == null) {
- System.err.println(killOperation);
- System.exit(1);
-
- }
-
- if (client.killJob(jobId)) {
- System.out.println("Job: [" + jobId + "] successfully killed.");
- } else {
- System.out.println("Unable to kill job: [" + jobId + "]");
- }
-
- } else if (operation.equals("--getNodeById")) {
- String nodeId = null;
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--nodeId")) {
- nodeId = args[++i];
- }
- }
-
- if (nodeId == null) {
- System.err.println(getNodeByIdOperation);
- System.exit(1);
- }
-
- ResourceNode node = client.getNodeById(nodeId);
-
- if (node != null) {
- System.out.println("node: [id=" + node.getNodeId()
- + ",capacity=" + node.getCapacity() + ",url="
- + node.getIpAddr() + "]");
- }
- } else if (operation.equals("--getJobInfo")) {
- String jobId = null;
-
- for (int i = 4; i < args.length; i++) {
- if (args[i].equals("--id")) {
- jobId = args[++i];
- }
- }
-
- if (jobId == null) {
- System.err.println(getJobInfoOperation);
- System.exit(1);
- }
-
- Job jobInfo = client.getJobInfo(jobId);
-
- System.out.println("Job: [id=" + jobId + ", status="
- + getReadableJobStatus(jobInfo.getStatus()) + ",name="
- + jobInfo.getName() + ",queue=" + jobInfo.getQueueName()
- + ",load=" + jobInfo.getLoadValue() + ",inputClass="
- + jobInfo.getJobInputClassName() + ",instClass="
- + jobInfo.getJobInstanceClassName() + "]");
- } else
- throw new IllegalArgumentException("Unknown Operation!");
-
+ public static void main(String[] args) {
+ CmdLineUtility cmdLineUtility = new CmdLineUtility();
+ cmdLineUtility.run(args);
}
public boolean isJobComplete(String jobId) throws JobRepositoryException {
Added: oodt/trunk/resource/src/main/resources/cmd-line-actions.xml
URL: http://svn.apache.org/viewvc/oodt/trunk/resource/src/main/resources/cmd-line-actions.xml?rev=1202844&view=auto
==============================================================================
--- oodt/trunk/resource/src/main/resources/cmd-line-actions.xml (added)
+++ oodt/trunk/resource/src/main/resources/cmd-line-actions.xml Wed Nov 16 19:13:49 2011
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ Author: bfoster (Brian Foster)
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <bean id="AddNode"
+ class="org.apache.oodt.cas.resource.cli.action.AddNodeCliAction">
+ <property name="description" value="Adds a ResourceNode" />
+ </bean>
+ <bean id="AddNodeToQueue"
+ class="org.apache.oodt.cas.resource.cli.action.AddNodeToQueueCliAction">
+ <property name="description" value="Adds a ResourceNode to a Queue" />
+ </bean>
+ <bean id="AddQueue"
+ class="org.apache.oodt.cas.resource.cli.action.AddQueueCliAction">
+ <property name="description" value="Adds a queue" />
+ </bean>
+ <bean id="GetExecNode"
+ class="org.apache.oodt.cas.resource.cli.action.GetExecNodeCliAction">
+ <property name="description" value="Get execution node for a job" />
+ </bean>
+ <bean id="GetJobInfo"
+ class="org.apache.oodt.cas.resource.cli.action.GetJobInfoCliAction">
+ <property name="description" value="Gets information about a job" />
+ </bean>
+ <bean id="GetNodeById"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodeByIdCliAction">
+ <property name="description" value="Gets information about a node" />
+ </bean>
+ <bean id="GetNodeLoad"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodeLoadCliAction">
+ <property name="description" value="Gets the current job load of a node" />
+ </bean>
+ <bean id="GetNodes"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodesCliAction">
+ <property name="description" value="Gets a list of managed nodes" />
+ </bean>
+ <bean id="GetNodesInQueue"
+ class="org.apache.oodt.cas.resource.cli.action.GetNodesInQueueCliAction">
+ <property name="description"
+ value="Gets list of nodes which belong to given queue" />
+ </bean>
+ <bean id="GetQueues"
+ class="org.apache.oodt.cas.resource.cli.action.GetQueuesCliAction">
+ <property name="description" value="Gets list of queues" />
+ </bean>
+ <bean id="GetQueuesWithNode"
+ class="org.apache.oodt.cas.resource.cli.action.GetQueuesWithNodeCliAction">
+ <property name="description" value="Gets list of queues which contain given node" />
+ </bean>
+ <bean id="Kill" class="org.apache.oodt.cas.resource.cli.action.KillCliAction">
+ <property name="description" value="Kills a job" />
+ </bean>
+ <bean id="RemoveNode"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveNodeCliAction">
+ <property name="description" value="Removes given node from managed nodes" />
+ </bean>
+ <bean id="RemoveNodeFromQueue"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveNodeFromQueueCliAction">
+ <property name="description" value="Removes given node from given queue" />
+ </bean>
+ <bean id="RemoveQueue"
+ class="org.apache.oodt.cas.resource.cli.action.RemoveQueueCliAction">
+ <property name="description" value="Removes a queue" />
+ </bean>
+ <bean id="SetNodeCapacity"
+ class="org.apache.oodt.cas.resource.cli.action.SetNodeCapacityCliAction">
+ <property name="description" value="Changes a nodes capacity" />
+ </bean>
+ <bean id="SubmitJob"
+ class="org.apache.oodt.cas.resource.cli.action.SubmitJobCliAction">
+ <property name="description" value="Submits a job for execution" />
+ </bean>
+</beans>
Propchange: oodt/trunk/resource/src/main/resources/cmd-line-actions.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain