Interface JobTarget
- All Known Implementing Classes:
AnyNodeJobTarget,ColocatedJobTarget
Determines the rules for selecting nodes to execute a job.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic JobTargetanyNode(Collection<ClusterNode> nodes) Creates a job target for any node from the provided collection.static JobTargetanyNode(Set<ClusterNode> nodes) Creates a job target for any node from the provided collection.static JobTargetanyNode(ClusterNode... nodes) Creates a job target for any node from the provided collection.static <K> JobTargetCreates a colocated job target for a specific table and key with mapper.static JobTargetCreates a colocated job target for a specific table and key.static <K> JobTargetcolocated(QualifiedName name, K key, Mapper<K> keyMapper) Creates a colocated job target for a specificQualifiedNameand key with mapper.static JobTargetcolocated(QualifiedName name, Tuple key) Creates a colocated job target for a specificQualifiedNameand key.static JobTargetnode(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 specificQualifiedNameand 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 specificQualifiedNameand 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.
-