Package com.mapr.storm

Examples of com.mapr.storm.PendingMessage


                }

                if (r != null) {
                    if (replayFailedMessages.get()) {
                        collector.emit(r, messageId);
                        ackBuffer.put(messageId, new PendingMessage(scanner.getLiveFile(), position, r));
                        messageId++;
                    } else {
                        collector.emit(r);
                    }
View Full Code Here


            throw new RuntimeException(e);
        }
    }

    private FileInputStream openNextInput() {
        PendingMessage next = pendingReplays.poll();
        while (next != null) {
            if (next.getFile().exists()) {
                return scanner.forceInput(next.getFile(), next.getOffset());
            } else {
                log.error("Replay file {} has disappeared", next.getFile());
            }
            next = pendingReplays.poll();
        }

        // look for a new file
View Full Code Here

    }

    @Override
    public void fail(Object messageId) {
        if (messageId instanceof Long) {
            final PendingMessage message = ackBuffer.get(messageId);
            if (message != null) {
                collector.emit(message.getTuple(), messageId);
            } else {
                log.error("Unknown message id {}", messageId);
            }
        } else {
            log.error("Incorrect message id {}", messageId);
View Full Code Here

            return tuple;
        }
    }

    private FileInputStream openNextInput() {
        PendingMessage next = pendingReplays.poll();
        while (next != null) {
            if (next.getFile().exists()) {
                return scanner.forceInput(next.getFile(), next.getOffset());
            } else {
                log.error("Replay file {} has disappeared", next.getFile());
            }
            next = pendingReplays.poll();
        }

        // look for a new file
View Full Code Here

TOP

Related Classes of com.mapr.storm.PendingMessage

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.