Package com.hazelcast.jet.core
Interface Processor.Context
- All Superinterfaces:
ProcessorMetaSupplier.Context
,ProcessorSupplier.Context
- All Known Implementing Classes:
TestProcessorContext
- Enclosing interface:
- Processor
Context passed to the processor in the
init()
call.- Since:
- Jet 3.0
-
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.logger()
Return a logger for the processordefault int[]
Returns the slice of partitions for this processor.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
-
Method Details
-
logger
Return a logger for the processor- Specified by:
logger
in interfaceProcessorMetaSupplier.Context
- Specified by:
logger
in interfaceProcessorSupplier.Context
-
localProcessorIndex
int localProcessorIndex()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]
. -
globalProcessorIndex
int globalProcessorIndex()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. -
processorPartitions
default int[] processorPartitions()Returns the slice of partitions for this processor. It distributesProcessorSupplier.Context.memberPartitions()
according to theProcessorMetaSupplier.Context.localParallelism()
andlocalProcessorIndex()
.
-