Package com.hazelcast.jet.core.test
Class TestProcessorContext
java.lang.Object
com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
com.hazelcast.jet.core.test.TestProcessorSupplierContext
com.hazelcast.jet.core.test.TestProcessorContext
- All Implemented Interfaces:
Processor.Context
,ProcessorMetaSupplier.Context
,ProcessorSupplier.Context
,com.hazelcast.jet.impl.execution.init.Contexts.InternalProcSupplierCtx
Processor.Context
implementation suitable to be used in tests.- Since:
- Jet 3.0
-
Field Summary
Fields inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the index of the processor among all the processors created for this vertex on all nodes: it's a unique cluster-wide index.int
Returns the index of the processor among all the processors created for this vertex on a single node: it's a unique node-wide index.protected String
setGlobalProcessorIndex
(int globalProcessorIndex) Set the global processor indexsetHazelcastInstance
(HazelcastInstance instance) Sets the Hazelcast instance.setIsLightJob
(boolean isLightJob) Sets the isLightJob flag.setJobConfig
(JobConfig jobConfig) Sets the config for the job.setLocalParallelism
(int localParallelism) Sets local parallelism.setLocalProcessorIndex
(int localProcessorIndex) Set the local processor indexSets the logger.setManagedContext
(ManagedContext managedContext) Sets theManagedContext
setPartitionAssignment
(Map<Address, int[]> partitionAssignment) Sets the partition assignment.setProcessingGuarantee
(ProcessingGuarantee processingGuarantee) Sets the processing guarantee.setTotalParallelism
(int totalParallelism) Sets the total parallelism.setVertexName
(String vertexName) Sets the vertex name.Methods inherited from class com.hazelcast.jet.core.test.TestProcessorSupplierContext
addFile, attachedDirectory, attachedFile, managedContext, memberIndex, recreateAttachedDirectory, recreateAttachedFile, serializationService, setMemberIndex
Methods inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
checkPermission, classLoader, dataConnectionService, executionId, getNodeEngine, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, logger, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, setClassLoader, setExecutionId, setJobId, setMaxProcessorAccumulatedRecords, totalParallelism, vertexName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.hazelcast.jet.core.Processor.Context
logger, processorPartitions
Methods inherited from interface com.hazelcast.jet.core.ProcessorMetaSupplier.Context
checkPermission, classLoader, dataConnectionService, executionId, hazelcastInstance, isLightJob, jetInstance, jobConfig, jobId, localParallelism, maxProcessorAccumulatedRecords, memberCount, partitionAssignment, processingGuarantee, snapshottingEnabled, totalParallelism, vertexName
Methods inherited from interface com.hazelcast.jet.core.ProcessorSupplier.Context
attachedDirectory, attachedFile, managedContext, memberIndex, memberPartitions, recreateAttachedDirectory, recreateAttachedFile
-
Constructor Details
-
TestProcessorContext
public TestProcessorContext()Constructor with default values.
-
-
Method Details
-
localProcessorIndex
public int localProcessorIndex()Description copied from interface:Processor.Context
Returns the index of the processor among all the processors created for this vertex on a single node: it's a unique node-wide index.The value is in the range
[0...localParallelism-1]
.- Specified by:
localProcessorIndex
in interfaceProcessor.Context
-
globalProcessorIndex
public int globalProcessorIndex()Description copied from interface:Processor.Context
Returns the index of the processor among all the processors created for this vertex on all nodes: it's a unique cluster-wide index.The value is in the range
[0...totalParallelism-1]
. For example if there are 2 members in the cluster and local parallelism is 4, the processors on the 1st cluster member will have indexes 0..3 and on the second member they will have indexes 4..7.- Specified by:
globalProcessorIndex
in interfaceProcessor.Context
-
setLocalProcessorIndex
Set the local processor index -
setGlobalProcessorIndex
Set the global processor index -
setLogger
Description copied from class:TestProcessorMetaSupplierContext
Sets the logger.- Overrides:
setLogger
in classTestProcessorSupplierContext
-
setHazelcastInstance
Description copied from class:TestProcessorMetaSupplierContext
Sets the Hazelcast instance.- Overrides:
setHazelcastInstance
in classTestProcessorSupplierContext
-
setJobConfig
Description copied from class:TestProcessorMetaSupplierContext
Sets the config for the job.- Overrides:
setJobConfig
in classTestProcessorSupplierContext
-
setTotalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets the total parallelism.- Overrides:
setTotalParallelism
in classTestProcessorSupplierContext
-
setLocalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets local parallelism.- Overrides:
setLocalParallelism
in classTestProcessorSupplierContext
-
setVertexName
Description copied from class:TestProcessorMetaSupplierContext
Sets the vertex name.- Overrides:
setVertexName
in classTestProcessorSupplierContext
-
setProcessingGuarantee
@Nonnull public TestProcessorContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee) Description copied from class:TestProcessorMetaSupplierContext
Sets the processing guarantee.- Overrides:
setProcessingGuarantee
in classTestProcessorSupplierContext
-
setIsLightJob
Description copied from class:TestProcessorMetaSupplierContext
Sets the isLightJob flag.- Overrides:
setIsLightJob
in classTestProcessorSupplierContext
-
setPartitionAssignment
Description copied from class:TestProcessorMetaSupplierContext
Sets the partition assignment.- Overrides:
setPartitionAssignment
in classTestProcessorSupplierContext
-
setManagedContext
Description copied from class:TestProcessorSupplierContext
Sets theManagedContext
- Overrides:
setManagedContext
in classTestProcessorSupplierContext
-
loggerName
- Overrides:
loggerName
in classTestProcessorSupplierContext
-