Package com.hazelcast.jet.core
Interface ProcessorMetaSupplier.Context
-
- All Known Subinterfaces:
Processor.Context
,ProcessorSupplier.Context
- All Known Implementing Classes:
TestProcessorContext
,TestProcessorMetaSupplierContext
,TestProcessorSupplierContext
- Enclosing interface:
- ProcessorMetaSupplier
public static interface ProcessorMetaSupplier.Context
Context passed to the meta-supplier at init time on the member that received a job request from the client.- Since:
- Jet 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
checkPermission(java.security.Permission permission)
Check if the current Subject has the given permission granted (or implied).java.lang.ClassLoader
classLoader()
Processor classloader configured viaJobConfig.addCustomClasspath(String, String)
DataConnectionService
dataConnectionService()
A service to accessDataConnection
s in processors.long
executionId()
Returns the job execution ID.HazelcastInstance
hazelcastInstance()
Returns the current Hazelcast instance.boolean
isLightJob()
Returns if this job runs as a light job, seeJetService.newLightJob(Pipeline)
.JetInstance
jetInstance()
Deprecated.UsehazelcastInstance().getJet()
instead.JobConfig
jobConfig()
Returns theJobConfig
.long
jobId()
Returns the job ID.int
localParallelism()
Returns the number of processors that eachProcessorSupplier
will be asked to create once deserialized on each member.ILogger
logger()
Returns a logger for the associatedProcessorMetaSupplier
.long
maxProcessorAccumulatedRecords()
Returns the maximum number of records that can be accumulated by any singleProcessor
.int
memberCount()
Returns the number of members running this job.java.util.Map<Address,int[]>
partitionAssignment()
Returns the partition assignment used by this job.ProcessingGuarantee
processingGuarantee()
Returns the guarantee for current job.default boolean
snapshottingEnabled()
Returns true, if snapshots will be saved for this job.int
totalParallelism()
Returns the total number ofProcessor
s that will be created across the cluster.java.lang.String
vertexName()
Returns the name of the associated vertex.
-
-
-
Method Detail
-
hazelcastInstance
@Nonnull HazelcastInstance hazelcastInstance()
Returns the current Hazelcast instance.- Since:
- 5.0
-
jetInstance
@Nonnull @Deprecated JetInstance jetInstance()
Deprecated.UsehazelcastInstance().getJet()
instead.Returns the current Jet instance.
-
jobId
long jobId()
Returns the job ID. Job id is unique for job submission and doesn't change when the job restarts. It's also unique for all running and archived jobs.
-
executionId
long executionId()
Returns the job execution ID. It's unique for one execution, but changes when the job restarts.
-
totalParallelism
int totalParallelism()
Returns the total number ofProcessor
s that will be created across the cluster. This number remains stable for entire job execution. It is equal tomemberCount()
*localParallelism()
.
-
localParallelism
int localParallelism()
Returns the number of processors that eachProcessorSupplier
will be asked to create once deserialized on each member. All members have equal local parallelism. The count doesn't change unless the job restarts.
-
memberCount
int memberCount()
Returns the number of members running this job.Note that the value might be lower than current member count if members were added after the job started. The count doesn't change unless the job restarts.
-
vertexName
@Nonnull java.lang.String vertexName()
Returns the name of the associated vertex.
-
logger
@Nonnull ILogger logger()
Returns a logger for the associatedProcessorMetaSupplier
.
-
snapshottingEnabled
default boolean snapshottingEnabled()
Returns true, if snapshots will be saved for this job.
-
processingGuarantee
ProcessingGuarantee processingGuarantee()
Returns the guarantee for current job.
-
maxProcessorAccumulatedRecords
long maxProcessorAccumulatedRecords()
Returns the maximum number of records that can be accumulated by any singleProcessor
. The returned value is strictly positive (>=1).
-
isLightJob
boolean isLightJob()
Returns if this job runs as a light job, seeJetService.newLightJob(Pipeline)
.
-
partitionAssignment
java.util.Map<Address,int[]> partitionAssignment()
Returns the partition assignment used by this job. This is the assignment partitioned edges will use and the assignment processors dealing with Hazelcast data structures should use. Each mapped partitions id array must be sorted.
-
classLoader
java.lang.ClassLoader classLoader()
Processor classloader configured viaJobConfig.addCustomClasspath(String, String)
- Returns:
- processor classloader, null if no custom classpath elements are configured
-
dataConnectionService
DataConnectionService dataConnectionService()
A service to accessDataConnection
s in processors.- Since:
- 5.3
-
checkPermission
void checkPermission(@Nonnull java.security.Permission permission) throws java.security.AccessControlException
Check if the current Subject has the given permission granted (or implied).- Parameters:
permission
- Permission to be checked- Throws:
java.security.AccessControlException
- when the security is enabled and the checked permission is not implied for the currentSubject
-
-