Package com.hazelcast.jet.core
Interface ProcessorSupplier.Context
- All Superinterfaces:
ProcessorMetaSupplier.Context
- All Known Subinterfaces:
Processor.Context
- All Known Implementing Classes:
TestProcessorContext
,TestProcessorSupplierContext
- Enclosing interface:
- ProcessorSupplier
Context passed to the supplier in the
init()
call.- Since:
- Jet 3.0
-
Method Summary
Modifier and TypeMethodDescriptionUses the supplied ID to look up a directory you attached to the current Jet job.attachedFile
(String id) Uses the supplied ID to look up a file you attached to the current Jet job.logger()
Returns a logger for the associatedProcessorSupplier
.ReturnsManagedContext
associated with this job.int
Returns the index of the member among all the members that run this job: it's a unique cluster-wide index.default int[]
Returns the partitions fromProcessorMetaSupplier.Context.partitionAssignment()
pertaining to this member.Behaves likeattachedDirectory(java.lang.String)
, but if the directory already exists, it deletes and recreates all its contents.Behaves likeattachedFile(java.lang.String)
, but if the file already exists, it deletes and recreates it.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
-
Method Details
-
logger
Returns a logger for the associatedProcessorSupplier
.- Specified by:
logger
in interfaceProcessorMetaSupplier.Context
-
memberIndex
int memberIndex()Returns the index of the member among all the members that run this job: it's a unique cluster-wide index.The value is in the range
[0...memberCount-1]
. -
attachedDirectory
Uses the supplied ID to look up a directory you attached to the current Jet job. Creates a temporary directory with the same contents on the local cluster member and returns the location of the created directory. If the directory was already created, just returns its location.- Parameters:
id
- the ID you used in a previousJobConfig.attachDirectory(java.net.URL)
call- Since:
- Jet 4.0
-
recreateAttachedDirectory
Behaves likeattachedDirectory(java.lang.String)
, but if the directory already exists, it deletes and recreates all its contents.- Since:
- Jet 4.3
-
attachedFile
Uses the supplied ID to look up a file you attached to the current Jet job. Creates a temporary file with the same contents on the local cluster member and returns the location of the created file. If the file was already created, just returns its location.- Parameters:
id
- the ID you used in a previousJobConfig.attachFile(java.net.URL)
call- Since:
- Jet 4.0
-
recreateAttachedFile
Behaves likeattachedFile(java.lang.String)
, but if the file already exists, it deletes and recreates it.- Since:
- Jet 4.3
-
managedContext
ReturnsManagedContext
associated with this job. -
memberPartitions
@Nonnull default int[] memberPartitions()Returns the partitions fromProcessorMetaSupplier.Context.partitionAssignment()
pertaining to this member. The returned list can be empty.
-