- java.lang.Object
-
- com.pervasive.datarush.cal.ResourceSpecifier
-
- All Implemented Interfaces:
Serializable
public final class ResourceSpecifier extends Object implements Serializable
Resource specifier for the resources needed by a job. Currently, this consists of three things, but may expand in the future:- the degree of parallelism for the job
- the resources required by the job master process
- the resources required by workers for each assigned partition
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceSpecifier
UNSPECIFIED
Default, unspecified resources
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceAllocation
masterResources()
ResourceSpecifier
masterResources(ResourceAllocation resources)
Returns a resource specifier applying the specified allocation for job master resourcesint
maximumParallelism()
ResourceSpecifier
maximumParallelism(int partitions)
Returns a resource specifier with the given specified maximum parallelismint
minimumParallelism()
ResourceSpecifier
minimumParallelism(int partitions)
Returns a resource specifier with the given specified minimum parallelismint
parallelism()
ResourceSpecifier
parallelism(int parallelism)
Returns a resource specifier with the given specified parallelismstatic ResourceSpecifier
PARALLELISM(int parallelism)
Specifies the parallelismResourceAllocation
partitionResources()
ResourceSpecifier
partitionResources(ResourceAllocation resources)
Returns a resource specifier applying the specified allocation for per-partition resources
-
-
-
Field Detail
-
UNSPECIFIED
public static ResourceSpecifier UNSPECIFIED
Default, unspecified resources
-
-
Method Detail
-
PARALLELISM
public static ResourceSpecifier PARALLELISM(int parallelism)
Specifies the parallelism- Parameters:
the
- desired parallelism
-
parallelism
public int parallelism()
-
minimumParallelism
public int minimumParallelism()
-
maximumParallelism
public int maximumParallelism()
-
masterResources
public ResourceAllocation masterResources()
-
partitionResources
public ResourceAllocation partitionResources()
-
parallelism
public ResourceSpecifier parallelism(int parallelism)
Returns a resource specifier with the given specified parallelism- Parameters:
parallelism
- the parallelism to request- Returns:
- a resource specifier
-
minimumParallelism
public ResourceSpecifier minimumParallelism(int partitions)
Returns a resource specifier with the given specified minimum parallelism- Parameters:
partitions
- the minimal number of partitions to acquire- Returns:
- a resource specifier
-
maximumParallelism
public ResourceSpecifier maximumParallelism(int partitions)
Returns a resource specifier with the given specified maximum parallelism- Parameters:
partitions
- the maximum number of partitions to acquire- Returns:
- a resource specifier
-
masterResources
public ResourceSpecifier masterResources(ResourceAllocation resources)
Returns a resource specifier applying the specified allocation for job master resources- Parameters:
resources
- the resources to request- Returns:
- a resource specifier
-
partitionResources
public ResourceSpecifier partitionResources(ResourceAllocation resources)
Returns a resource specifier applying the specified allocation for per-partition resources- Parameters:
resources
- the resources to request- Returns:
- a resource specifier
-
-