Package org.voltdb.messaging

Examples of org.voltdb.messaging.RejoinMessage


        synchronized (m_lock) {
            for (long HSId : HSIds) {
                m_nonces.put(HSId, nonce);
            }
        }
        RejoinMessage msg = new RejoinMessage(getHSId(),
                                              m_liveRejoin ? RejoinMessage.Type.INITIATION :
                                              RejoinMessage.Type.INITIATION_COMMUNITY,
                                              nonce,
                                              1, // 1 source per rejoining site
                                              m_snapshotBufPool,
View Full Code Here


            VoltDB.crashLocalVoltDB("Unknown message type " +
                    message.getClass().toString() + " sent to the rejoin coordinator",
                    false, null);
        }

        RejoinMessage rm = (RejoinMessage) message;
        Type type = rm.getType();
        if (type == RejoinMessage.Type.SNAPSHOT_FINISHED) {
            REJOINLOG.info("Finished streaming snapshot to site: " +
                           CoreUtils.hsIdToString(rm.m_sourceHSId));
        } else if (type == RejoinMessage.Type.REPLAY_FINISHED) {
            assert(m_catalog != null);
            boolean schemaHasNoTables = m_catalog.getTables().isEmpty();
            initiateNextSite(schemaHasNoTables);
            onReplayFinished(rm.m_sourceHSId);
        } else if (type == RejoinMessage.Type.INITIATION_RESPONSE) {
            onSiteInitialized(rm.m_sourceHSId, rm.getMasterHSId(), rm.getSnapshotSinkHSId(),
                              rm.schemaHasNoTables());
        } else {
            VoltDB.crashLocalVoltDB("Wrong rejoin message of type " + type +
                                    " sent to the rejoin coordinator", false, null);
        }
    }
View Full Code Here

                + " and snapshot nonce is: "
                + message.getSnapshotNonce());

        registerSnapshotMonitor(message.getSnapshotNonce());
        // Tell the RejoinCoordinator everything it will need to know to get us our snapshot stream.
        RejoinMessage initResp = new RejoinMessage(m_mailbox.getHSId(), sourceSite, hsId);
        m_mailbox.send(m_coordinatorHsId, initResp);

        // Start waiting for snapshot data
        m_taskQueue.offer(this);
    }
View Full Code Here

                        exportSequenceNumbers = event.exportSequenceNumbers;
                        m_completionAction.setSnapshotTxnId(event.multipartTxnId);
                    }
                    REJOINLOG.debug(m_whoami + " monitor completed. Sending SNAPSHOT_FINISHED "
                            + "and handing off to site.");
                    RejoinMessage snap_complete = new RejoinMessage(
                            m_mailbox.getHSId(), Type.SNAPSHOT_FINISHED);
                    m_mailbox.send(m_coordinatorHsId, snap_complete);
                } catch (InterruptedException crashme) {
                    VoltDB.crashLocalVoltDB(
                            "Interrupted awaiting snapshot completion.", true, crashme);
View Full Code Here

        public void run()
        {
            REJOINLOG.debug(m_whoami + "informing rejoinCoordinator "
                    + CoreUtils.hsIdToString(m_coordinatorHsId)
                    + " of REPLAY_FINISHED");
            RejoinMessage replay_complete = new RejoinMessage(
                    m_mailbox.getHSId(), RejoinMessage.Type.REPLAY_FINISHED);
            m_mailbox.send(m_coordinatorHsId, replay_complete);
            m_currentlyRejoining.set(false);

            SnapshotSaveAPI.recoveringSiteCount.decrementAndGet();
View Full Code Here

        long sinkHSId = m_dataSink.initialize(message.getSnapshotSourceCount(),
                                              message.getSnapshotBufferPool());

        // respond to the coordinator with the sink HSID
        RejoinMessage msg = new RejoinMessage(m_mailbox.getHSId(), -1, sinkHSId);
        m_mailbox.send(m_coordinatorHsId, msg);

        m_taskQueue.offer(this);
        JOINLOG.info("P" + m_partitionId + " received initiation");
    }
View Full Code Here

    {
        if (JOINLOG.isDebugEnabled()) {
            JOINLOG.debug("P" + m_partitionId + " sending first fragment response to coordinator " +
                    CoreUtils.hsIdToString(m_coordinatorHsId));
        }
        RejoinMessage msg = new RejoinMessage(m_mailbox.getHSId(),
                RejoinMessage.Type.FIRST_FRAGMENT_RECEIVED);
        m_mailbox.send(m_coordinatorHsId, msg);
        m_firstFragResponseSent = true;
    }
View Full Code Here

    private class CompletionAction extends JoinCompletionAction {
        @Override
        public void run()
        {
            RejoinMessage rm = new RejoinMessage(m_mailbox.getHSId(),
                                                 RejoinMessage.Type.REPLAY_FINISHED);
            m_mailbox.send(m_coordinatorHsId, rm);
        }
View Full Code Here

                    }

                    m_rejoinLog.debug("Received rejoin snapshot txnId " + txnId);

                    // Send a message to self to avoid synchronization
                    RejoinMessage msg = new RejoinMessage(txnId);
                    m_mailbox.send(getSiteId(), msg);
                } else {
                    VoltDB.crashLocalVoltDB("Snapshot request for rejoin failed",
                                            false, null);
                }
View Full Code Here

                    "Recovery initiate received at site " + CoreUtils.hsIdToString(m_siteId) +
                    " from site " + CoreUtils.hsIdToString(rm.sourceSite()) + " requesting recovery start before txnid " +
                    recoveringPartitionTxnId);
        }
        else if (message instanceof RejoinMessage) {
            RejoinMessage rm = (RejoinMessage) message;
            handleRejoinMessage(rm);
        }
        else if (message instanceof CheckTxnStateCompletionMessage) {
            long txn_id = ((CheckTxnStateCompletionMessage)message).m_txnId;
            TransactionState txnState = m_transactionsById.get(txn_id);
View Full Code Here

TOP

Related Classes of org.voltdb.messaging.RejoinMessage

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.