Search in sources :

Example 1 with ProcSupplierCtx

use of com.hazelcast.jet.impl.execution.init.Contexts.ProcSupplierCtx in project hazelcast-jet by hazelcast.

the class ExecutionPlan method initProcSuppliers.

// End implementation of IdentifiedDataSerializable
private void initProcSuppliers() {
    JetService service = nodeEngine.getService(JetService.SERVICE_NAME);
    for (VertexDef vertex : vertices) {
        ProcessorSupplier supplier = vertex.processorSupplier();
        ILogger logger = nodeEngine.getLogger(supplier.getClass().getName() + '.' + vertex.name() + "#ProcessorSupplier");
        supplier.init(new ProcSupplierCtx(service.getJetInstance(), logger, vertex.name(), vertex.localParallelism(), vertex.totalParallelism()));
    }
}
Also used : ProcSupplierCtx(com.hazelcast.jet.impl.execution.init.Contexts.ProcSupplierCtx) JetService(com.hazelcast.jet.impl.JetService) ILogger(com.hazelcast.logging.ILogger) ProcessorSupplier(com.hazelcast.jet.core.ProcessorSupplier)

Example 2 with ProcSupplierCtx

use of com.hazelcast.jet.impl.execution.init.Contexts.ProcSupplierCtx in project hazelcast by hazelcast.

the class ExecutionPlan method initProcSuppliers.

// End implementation of IdentifiedDataSerializable
private void initProcSuppliers(long jobId, ConcurrentHashMap<String, File> tempDirectories, InternalSerializationService jobSerializationService) {
    for (VertexDef vertex : vertices) {
        ClassLoader processorClassLoader = isLightJob ? null : jobClassLoaderService.getProcessorClassLoader(jobId, vertex.name());
        ProcessorSupplier supplier = vertex.processorSupplier();
        String prefix = prefix(jobConfig.getName(), jobId, vertex.name(), "#PS");
        ILogger logger = prefixedLogger(nodeEngine.getLogger(supplier.getClass()), prefix);
        doWithClassLoader(processorClassLoader, () -> supplier.init(new ProcSupplierCtx(nodeEngine, jobId, executionId, jobConfig, logger, vertex.name(), vertex.localParallelism(), vertex.localParallelism() * memberCount, memberIndex, memberCount, isLightJob, partitionAssignment, tempDirectories, jobSerializationService, subject, processorClassLoader)));
    }
}
Also used : ProcSupplierCtx(com.hazelcast.jet.impl.execution.init.Contexts.ProcSupplierCtx) Util.doWithClassLoader(com.hazelcast.jet.impl.util.Util.doWithClassLoader) ILogger(com.hazelcast.logging.ILogger) ProcessorSupplier(com.hazelcast.jet.core.ProcessorSupplier)

Aggregations

ProcessorSupplier (com.hazelcast.jet.core.ProcessorSupplier)2 ProcSupplierCtx (com.hazelcast.jet.impl.execution.init.Contexts.ProcSupplierCtx)2 ILogger (com.hazelcast.logging.ILogger)2 JetService (com.hazelcast.jet.impl.JetService)1 Util.doWithClassLoader (com.hazelcast.jet.impl.util.Util.doWithClassLoader)1