JobManagerNode
Use Jython to manage job manager settings with wsadmin. Use the commands and parameters in the JobManagerNode group to register nodes that do not contain an administrative agent with the job manager.
Use the following commands to administer and query managed node and resource configurations:
- cleanupManagedNode
- getContexts
- getManagedNodeKeys
- getManagedNodeProperties
- getManagedResourceProperties
- getManagedResourcePropertyKeys
- getManagedResourceTypes
- modifyManagedNodeProperties
- queryManagedNodes
- queryManagedResources
cleanupManagedNode
The cleanupManagedNode command cleans up registration information for a managed node. If the system fails when removing a node from the agent, use this command to explicitly clean up the registration information on the job manager. The command does not remove the job history for the node. Jobs in progress continue to run, but new jobs do not start for the node.
Target object
None.
Required parameters
- -managedNodeName
- Name of the node of interest. (String, required)
Return value
The command returns the UUID of the job manager that the system cleaned up.
Batch mode example usage
- Use Jython string:
AdminTask.cleanupManagedNode('-managedNodeName Node1')- Use Jython list:
AdminTask.cleanupManagedNode('-managedNodeName', 'Node1')
Interactive mode example usage
- Jython...
AdminTask.cleanupManagedNode('-interactive')
getContexts
The getContexts command displays all contexts in the management model, including nodes and servers.
Target object
None.
Required parameters
None.
Return value
The command returns a list of all context paths.
Batch mode example usage
Interactive mode example usage
- Jython...
AdminTask.getContexts('-interactive')
getManagedNodeKeys
The getManagedNodeKeys command displays the keys to use to query for managed nodes, including the name, alias, and uuid keys.
Target object
None.
Optional parameters
- -managedNodeName
- Name of the node of interest. (String, optional)
Return value
The command returns a list of the keys.
Batch mode example usage
- Use Jython string:
AdminTask.getManagedNodeKeys('-managedNodeName Node1')- Use Jython list:
AdminTask.getManagedNodeKeys('-managedNodeName', 'Node1')
Interactive mode example usage
- Jython...
AdminTask.getManagedNodeKeys('-interactive')
getManagedNodeProperties
The getManagedNodeProperties command displays the properties for one or more managed or unmanaged nodes.
Target object
None.
Optional parameters
- -managedNodeNameList
- List of names of the nodes of interest. (String [], optional)
Return value
The command returns a list of properties for each node specified with the -managedNodeNameList parameter.
Batch mode example usage
- Use Jython string:
AdminTask.getManagedNodeProperties('-managedNodeNameList [Node1,Node2]')- Use Jython list:
AdminTask.getManagedNodeProperties('-managedNodeNameList', '[Node1, Node2]')
Interactive mode example usage
- Jython...
AdminTask.getManagedNodeProperties('-interactive')
getManagedResourceProperties
The getManagedResourceProperties command displays the properties of one or more managed resources. Managed resources are instances within a node context or server context. For example, within a server context we can have the managed resources server1, server2, or server3.
Target object
None.
Required parameters
- -resourceIdList
- List of unique identifiers for the resources of interest. (String, optional)
Return value
The command returns a list of properties for each managed resource.
Batch mode example usage
- Use Jython string:
AdminTask.getManagedResourceProperties('-resourceIdList AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb/nodes/myNode/servers/server1')- Use Jython list:
AdminTask.getManagedResourceProperties('-resourceIdList', 'AppSrv01-BASE-b83dc35c-69d4-40af-af60-127de7002cfb/nodes/myNode/servers/server1')
Interactive mode example usage
- Jython...
AdminTask.getManagedResourceProperties('-interactive')
getManagedResourcePropertyKeys
The getManagedResourcePropertyKeys command displays the property keys for a specific type of managed resources.
Target object
None.
Required parameters
- -resourceType
- Type of managed resource of interest. (String, required)
Return value
The command returns a list of managed resource keys for the specific resource type.
Batch mode example usage
- Use Jython string:
AdminTask.getManagedResourcePropertyKeys('-resourceType server')- Use Jython list:
AdminTask.getManagedResourcePropertyKeys('-resourceType', 'server')
Interactive mode example usage
- Jython...
AdminTask.getManagedResourcePropertyKeys('-interactive')
getManagedResourceTypes
The getManagedResourceTypes command displays each of the managed resource types.
Target object
None.
Required parameters
None.
Return value
The command returns a list of managed resource types.
Batch mode example usage
- Use Jython string:
AdminTask.getManagedResourceTypes()- Use Jython list:
AdminTask.getManagedResourceTypes()
Interactive mode example usage
- Jython...
AdminTask.getManagedResourceTypes('-interactive')
modifyManagedNodeProperties
The modifyManagedNodeProperties command replaces each property in a managed node configuration. If the managed node has an administrative agent, the command only modifies the alias property. If the managed node does not have an administrative agent, the command replaces all properties.
Target object
None.
Required parameters
- -managedNodeName
- Name of the node of interest. (String, required)
- -managedNodeProps
- Name and value property pairs to modify for the node of interest. (Properties, required)
Optional parameters
- -replace
- Specifies whether to replace the existing properties. Specify true to replace the existing properties. Specify false to merge the properties. The default value is false. (Boolean, optional)
Return value
The command does not return output.
Batch mode example usage
- Use Jython string:
AdminTask.modifyManagedNodeProperties('-managedNodeName Node1 -managedNodeProps "[alias myNewAlias]"')- Use Jython list:
AdminTask.modifyManagedNodeProperties('-managedNodeName', 'Node1', '-managedNodeProps', '"[alias myNewAlias]"')
Interactive mode example usage
- Jython...
AdminTask.modifyManagedNodeProperties('-interactive')
queryManagedNodes
The queryManagedNodes command searches for managed nodes based on a query expression. If we do not specify a query expression, the command returns all managed nodes.
Target object
None.
Required parameters
- -maxReturn
- Maximum number of managed nodes to return. (Integer, required)
Optional parameters
- -query
- Specifies a query that consists of one or more query expressions separated by spaces. If we do not specify this parameter, the command returns all managed nodes. (String, optional)Construct the queries based on the following guidelines:
- Each query expression consists of the key, operator, and value elements.
The following operators are supported:
Table 1. queryManagedNodes -query operators
Character Value = Equal to. Specify that the value is null by using = NULL. != Not equal to. Specify that the value is not null by using != NULL > Greater than < Less than >= Greater than or equal to <= Less than or equal to
- We can specify one value or multiple values separated by commas.
- Use pattern matching to specify the value.
- -validate
- Specifies whether to validate the search query. (Boolean, optional)
Return value
The command returns the number of matches the query found. Secondly, the command returns a list of UUIDs of the managed nodes that met the search query criterion.
Batch mode example usage
- Use Jython string:
AdminTask.queryManagedNodes('[-maxReturn 20 -query "alias=managedNode1" -validate true]')- Use Jython list:
AdminTask.queryManagedNodes(['-maxReturn', '20', '-query', '"alias=managedNode1"', '-validate', 'true'])
Interactive mode example usage
- Jython...
AdminTask.queryManagedNodes('-interactive')
queryManagedResources
The queryManagedResources command queries the managed resources for specific managed nodes based on a query expression.
Target object
None.
Required parameters
- -maxReturn
- Maximum number of managed resources to return. (Integer, required)
Optional parameters
- -query
- Specifies a query that consists of one or more query expressions separated by spaces. If we do not specify this parameter, the command returns all managed nodes. (String, optional)Construct the queries based on the following guidelines:
- Each query expression consists of the key, operator, and value elements.
The following operators are supported:
Character Value = Equal to. Specify that the value is null by using = NULL. != Not equal to. Specify that the value is not null by using != NULL > Greater than < Less than >= Greater than or equal to <= Less than or equal to
- We can specify one value or multiple values separated by commas.
- Use pattern matching to specify the value.
- -validate
- Specifies whether to validate the search query. (Boolean, optional)
Return value
The command returns the number of matches the query found. Secondly, the command returns a list of UUIDs of the managed nodes that met the search query criterion.
Batch mode example usage
- Use Jython string:
AdminTask.queryManagedResources('-maxReturn 20 -query "alias=managedNode1"')- Use Jython list:
AdminTask.queryManagedResources('-maxReturn', '20', '-query', '"alias=managedNode1"')
Interactive mode example usage
- Jython...
AdminTask.queryManagedResources('-interactive')
Related tasks
Administer jobs in a flexible management environment using scripting
Registering nodes with the job manager using scripting
Grouping nodes in a flexible management environment using scripting
Running admin jobs using scripting
Running admin jobs across multiple nodes using scripting
Scheduling future admin jobs using scripting
Manage admin jobs using scripting
Related
AdministrativeJobs
ManagedNodeGroup
ManagedNodeAgent