Search in sources :

Example 1 with LoadedProcedureSet

use of org.voltdb.LoadedProcedureSet in project voltdb by VoltDB.

the class BaseInitiator method configureCommon.

protected void configureCommon(BackendTarget backend, CatalogContext catalogContext, String serializedCatalog, CatalogSpecificPlanner csp, int numberOfPartitions, StartAction startAction, StatsAgent agent, MemoryStats memStats, CommandLog cl, String coreBindIds, boolean hasMPDRGateway) throws KeeperException, ExecutionException, InterruptedException {
    int snapshotPriority = 6;
    if (catalogContext.cluster.getDeployment().get("deployment") != null) {
        snapshotPriority = catalogContext.cluster.getDeployment().get("deployment").getSystemsettings().get("systemsettings").getSnapshotpriority();
    }
    // demote rejoin to create for initiators that aren't rejoinable.
    if (startAction.doesJoin() && !isRejoinable()) {
        startAction = StartAction.CREATE;
    }
    TaskLog taskLog = null;
    if (m_initiatorMailbox.getJoinProducer() != null) {
        taskLog = m_initiatorMailbox.getJoinProducer().constructTaskLog(VoltDB.instance().getVoltDBRootPath());
    }
    m_executionSite = new Site(m_scheduler.getQueue(), m_initiatorMailbox.getHSId(), backend, catalogContext, serializedCatalog, m_partitionId, numberOfPartitions, startAction, snapshotPriority, m_initiatorMailbox, agent, memStats, coreBindIds, taskLog, hasMPDRGateway);
    LoadedProcedureSet procSet = new LoadedProcedureSet(m_executionSite);
    procSet.loadProcedures(catalogContext, csp);
    m_executionSite.setLoadedProcedures(procSet);
    m_scheduler.setProcedureSet(procSet);
    m_scheduler.setCommandLog(cl);
    m_siteThread = new Thread(m_executionSite);
    m_siteThread.setDaemon(false);
    m_siteThread.start();
}
Also used : TaskLog(org.voltdb.rejoin.TaskLog) LoadedProcedureSet(org.voltdb.LoadedProcedureSet)

Aggregations

LoadedProcedureSet (org.voltdb.LoadedProcedureSet)1 TaskLog (org.voltdb.rejoin.TaskLog)1