Interface JobTarget
- All Known Implementing Classes:
AnyNodeJobTarget
,ColocatedJobTarget
Determines the rules for selecting nodes to execute a job.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic JobTarget
anyNode
(Collection<ClusterNode> nodes) Creates a job target for any node from the provided collection.static JobTarget
anyNode
(Set<ClusterNode> nodes) Creates a job target for any node from the provided collection.static JobTarget
anyNode
(ClusterNode... nodes) Creates a job target for any node from the provided collection.static <K> JobTarget
Creates a colocated job target for a specific table and key with mapper.static JobTarget
Creates a colocated job target for a specific table and key.static <K> JobTarget
colocated
(QualifiedName name, K key, Mapper<K> keyMapper) Creates a colocated job target for a specificQualifiedName
and key with mapper.static JobTarget
colocated
(QualifiedName name, Tuple key) Creates a colocated job target for a specificQualifiedName
and key.static JobTarget
node
(ClusterNode node) Creates a job target for a specific node.
-
Method Details
-
node
Creates a job target for a specific node.This target determines that a job should be executed on a given node.
- Parameters:
node
- Node.- Returns:
- Job target.
-
anyNode
Creates a job target for any node from the provided collection.This target determines that a job can be executed on any node in a given collection, but only one of them. Which node is chosen is implementation defined.
- Parameters:
nodes
- Collection of nodes.- Returns:
- Job target.
-
anyNode
Creates a job target for any node from the provided collection.This target determines that a job can be executed on any node in a given collection, but only one of them. Which node is chosen is implementation defined.
- Parameters:
nodes
- Collection of nodes.- Returns:
- Job target.
-
anyNode
Creates a job target for any node from the provided collection.This target determines that a job can be executed on any node in a given collection, but only one of them. Which node is chosen is implementation defined.
- Parameters:
nodes
- Collection of nodes.- Returns:
- Job target.
-
colocated
Creates a colocated job target for a specific table and key.This target determines that a job should be executed on the same node that hosts the data for a given key of provided table.
- Parameters:
tableName
- Table name.key
- Key.- Returns:
- Job target.
-
colocated
Creates a colocated job target for a specificQualifiedName
and key.This target determines that a job should be executed on the same node that hosts the data for a given key of provided table.
- Parameters:
name
- QualifiedName name.key
- Key.- Returns:
- Job target.
-
colocated
Creates a colocated job target for a specific table and key with mapper.This target determines that a job should be executed on the same node that hosts the data for a given key of provided table.
- Parameters:
tableName
- Table name.key
- Key.- Returns:
- Job target.
-
colocated
Creates a colocated job target for a specificQualifiedName
and key with mapper.This target determines that a job should be executed on the same node that hosts the data for a given key of provided table.
- Parameters:
name
- QualifiedName name.key
- Key.- Returns:
- Job target.
-