Package com.hazelcast.jet.core.test
Class TestProcessorSupplierContext
java.lang.Object
com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
com.hazelcast.jet.core.test.TestProcessorSupplierContext
- All Implemented Interfaces:
ProcessorMetaSupplier.Context
,ProcessorSupplier.Context
- Direct Known Subclasses:
TestProcessorContext
public class TestProcessorSupplierContext extends TestProcessorMetaSupplierContext implements ProcessorSupplier.Context
Implementation of
ProcessorSupplier.Context
suitable to be used
in tests.- Since:
- 3.0
-
Field Summary
Fields inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
logger
-
Constructor Summary
Constructors Constructor Description TestProcessorSupplierContext()
-
Method Summary
Modifier and Type Method Description TestProcessorSupplierContext
addFile(String id, File file)
Add an attached file or folder.File
attachedDirectory(String id)
Uses the supplied ID to look up a directory you attached to the current Jet job.File
attachedFile(String id)
Uses the supplied ID to look up a file you attached to the current Jet job.protected String
loggerName()
ManagedContext
managedContext()
ReturnsManagedContext
associated with this job.int
memberIndex()
Returns the index of the member among all the members that run this job: it's a unique cluster-wide index.TestProcessorSupplierContext
setJetInstance(JetInstance jetInstance)
Sets the jet instance.TestProcessorSupplierContext
setLocalParallelism(int localParallelism)
Sets local parallelism.TestProcessorSupplierContext
setLogger(ILogger logger)
Sets the logger.TestProcessorSupplierContext
setManagedContext(ManagedContext managedContext)
Sets theManagedContext
TestProcessorSupplierContext
setMemberIndex(int memberIndex)
Sets the member indexTestProcessorSupplierContext
setProcessingGuarantee(ProcessingGuarantee processingGuarantee)
Sets the processing guarantee.TestProcessorSupplierContext
setTotalParallelism(int totalParallelism)
Sets the total parallelism.TestProcessorSupplierContext
setVertexName(String vertexName)
Sets the vertex name.Methods inherited from class com.hazelcast.jet.core.test.TestProcessorMetaSupplierContext
executionId, jetInstance, jobConfig, jobId, localParallelism, logger, memberCount, processingGuarantee, setExecutionId, setJobConfig, setJobId, 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.ProcessorMetaSupplier.Context
executionId, jetInstance, jobConfig, jobId, localParallelism, memberCount, processingGuarantee, snapshottingEnabled, totalParallelism, vertexName
Methods inherited from interface com.hazelcast.jet.core.ProcessorSupplier.Context
logger
-
Constructor Details
-
TestProcessorSupplierContext
public TestProcessorSupplierContext()
-
-
Method Details
-
setLogger
Description copied from class:TestProcessorMetaSupplierContext
Sets the logger.- Overrides:
setLogger
in classTestProcessorMetaSupplierContext
-
setJetInstance
Description copied from class:TestProcessorMetaSupplierContext
Sets the jet instance.- Overrides:
setJetInstance
in classTestProcessorMetaSupplierContext
-
setVertexName
Description copied from class:TestProcessorMetaSupplierContext
Sets the vertex name.- Overrides:
setVertexName
in classTestProcessorMetaSupplierContext
-
setTotalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets the total parallelism.- Overrides:
setTotalParallelism
in classTestProcessorMetaSupplierContext
-
setLocalParallelism
Description copied from class:TestProcessorMetaSupplierContext
Sets local parallelism.- Overrides:
setLocalParallelism
in classTestProcessorMetaSupplierContext
-
setProcessingGuarantee
@Nonnull public TestProcessorSupplierContext setProcessingGuarantee(@Nonnull ProcessingGuarantee processingGuarantee)Description copied from class:TestProcessorMetaSupplierContext
Sets the processing guarantee.- Overrides:
setProcessingGuarantee
in classTestProcessorMetaSupplierContext
-
memberIndex
public int memberIndex()Description copied from interface:ProcessorSupplier.Context
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]
.- Specified by:
memberIndex
in interfaceProcessorSupplier.Context
-
attachedDirectory
Description copied from interface:ProcessorSupplier.Context
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.- Specified by:
attachedDirectory
in interfaceProcessorSupplier.Context
- Parameters:
id
- the ID you used in a previousJobConfig.attachDirectory(java.net.URL)
call
-
attachedFile
Description copied from interface:ProcessorSupplier.Context
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.- Specified by:
attachedFile
in interfaceProcessorSupplier.Context
- Parameters:
id
- the ID you used in a previousJobConfig.attachFile(java.net.URL)
call
-
managedContext
Description copied from interface:ProcessorSupplier.Context
ReturnsManagedContext
associated with this job.- Specified by:
managedContext
in interfaceProcessorSupplier.Context
-
addFile
Add an attached file or folder. The test context doesn't distinguish between files and folders; -
setMemberIndex
Sets the member index -
setManagedContext
@Nonnull public TestProcessorSupplierContext setManagedContext(@Nonnull ManagedContext managedContext)Sets theManagedContext
-
loggerName
- Overrides:
loggerName
in classTestProcessorMetaSupplierContext
-