Package com.hazelcast.mapreduce.impl

Examples of com.hazelcast.mapreduce.impl.MapReduceService$JobSupervisorKey


        registerService(AtomicLongService.SERVICE_NAME, new AtomicLongService());
        registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
        registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
        registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
        registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
        registerService(MapReduceService.SERVICE_NAME, new MapReduceService(nodeEngine));
        registerService(ReplicatedMapService.SERVICE_NAME, new ReplicatedMapService(nodeEngine));
    }
View Full Code Here


    @Override
    protected void invoke() {
        try {
            final ClientEndpoint endpoint = getEndpoint();

            MapReduceService mapReduceService = getService();
            NodeEngine nodeEngine = mapReduceService.getNodeEngine();
            AbstractJobTracker jobTracker = (AbstractJobTracker) mapReduceService.createDistributedObject(name);
            TrackableJobFuture jobFuture = new TrackableJobFuture(name, jobId, jobTracker, nodeEngine, null);
            if (jobTracker.registerTrackableJob(jobFuture)) {
                ICompletableFuture<Object> future = startSupervisionTask(jobFuture, mapReduceService, nodeEngine, jobTracker);
                future.andThen(new ExecutionCallback<Object>() {
                    @Override
View Full Code Here

        if (cancelled.get()) {
            return;
        }
        reducerQueue.offer(new ReducerChunk<Key, Chunk>(chunk, partitionId, sender));
        if (active.compareAndSet(false, true)) {
            MapReduceService mapReduceService = supervisor.getMapReduceService();
            ExecutorService es = mapReduceService.getExecutorService(name);
            es.submit(this);
        }
    }
View Full Code Here

    }

    private void processProcessedState(ReducerChunk<Key, Chunk> reducerChunk) {
        // If partitionId is set this was the last chunk for this partition
        if (reducerChunk.partitionId != -1) {
            MapReduceService mapReduceService = supervisor.getMapReduceService();
            ReducingFinishedNotification notification = new ReducingFinishedNotification(mapReduceService.getLocalAddress(), name,
                    jobId, reducerChunk.partitionId);

            mapReduceService.sendNotification(reducerChunk.sender, notification);
        }
    }
View Full Code Here

    @Override
    protected void invoke() {
        final ClientEndpoint endpoint = getEndpoint();

        MapReduceService mapReduceService = getService();
        JobSupervisor supervisor = mapReduceService.getJobSupervisor(name, jobId);

        JobProcessInformation processInformation = null;
        if (supervisor != null && supervisor.getJobProcessInformation() != null) {
            JobProcessInformation current = supervisor.getJobProcessInformation();
            processInformation = new TransferableJobProcessInformation(current.getPartitionStates(),
View Full Code Here

    }

    @Override
    public void run()
            throws Exception {
        MapReduceService mapReduceService = getService();
        JobSupervisor supervisor = mapReduceService.getJobSupervisor(name, jobId);
        if (supervisor == null) {
            if (mapReduceService.unregisterJobSupervisorCancellation(name, jobId)) {
                // Supervisor was cancelled prior to creation
                AbstractJobTracker jobTracker = (AbstractJobTracker) mapReduceService.getJobTracker(name);
                TrackableJobFuture future = jobTracker.unregisterTrackableJob(jobId);
                if (future != null) {
                    Exception exception = new CancellationException("Operation was cancelled by the user");
                    future.setResult(exception);
                }
View Full Code Here

    @Override
    protected void invoke() {
        try {
            final ClientEndpoint endpoint = getEndpoint();

            MapReduceService mapReduceService = getService();
            NodeEngine nodeEngine = mapReduceService.getNodeEngine();
            AbstractJobTracker jobTracker = (AbstractJobTracker) mapReduceService.createDistributedObject(name);
            TrackableJobFuture jobFuture = new TrackableJobFuture(name, jobId, jobTracker, nodeEngine, null);
            if (jobTracker.registerTrackableJob(jobFuture)) {
                ICompletableFuture<Object> future = startSupervisionTask(jobFuture, mapReduceService, nodeEngine, jobTracker);
                future.andThen(new ExecutionCallback<Object>() {
                    @Override
View Full Code Here

    @Override
    protected void invoke() {
        final ClientEndpoint endpoint = getEndpoint();

        MapReduceService mapReduceService = getService();
        Address jobOwner = mapReduceService.getLocalAddress();
        mapReduceService.registerJobSupervisorCancellation(name, jobId, jobOwner);

        JobSupervisor supervisor = mapReduceService.getJobSupervisor(name, jobId);
        if (supervisor != null && supervisor.isOwnerNode()) {
            Exception exception = new CancellationException("Operation was cancelled by the user");
            supervisor.cancelAndNotify(exception);
        }
        endpoint.sendResponse(Boolean.TRUE, getCallId());
View Full Code Here

        registerService(AtomicLongService.SERVICE_NAME, new AtomicLongService());
        registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
        registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
        registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
        registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
        registerService(MapReduceService.SERVICE_NAME, new MapReduceService(nodeEngine));
        registerService(ReplicatedMapService.SERVICE_NAME, new ReplicatedMapService(nodeEngine));
        registerCacheServiceIfAvailable();
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.mapreduce.impl.MapReduceService$JobSupervisorKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.