Examples of VoltLogger


Examples of org.voltcore.logging.VoltLogger

    {
        if (fragmentId == SysProcFragmentId.PF_shutdownSync) {
            VoltDB.instance().getHostMessenger().prepareForShutdown();
            if (!m_failsafeArmed.getAndSet(true)) {
                m_failsafe.start();
                new VoltLogger("HOST").warn("VoltDB shutdown operation requested and in progress.  Cluster will terminate shortly.");
            }
            return new DependencyPair(DEP_shutdownSync,
                    new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) } ));
        }
        else if (fragmentId == SysProcFragmentId.PF_shutdownSyncDone) {
            return new DependencyPair(DEP_shutdownSyncDone,
                    new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) } ));
        }
        else if (fragmentId == SysProcFragmentId.PF_shutdownCommand) {
            Thread shutdownThread = new Thread() {
                @Override
                public void run() {
                    boolean die = false;
                    try {
                        die = VoltDB.instance().shutdown(this);
                    } catch (InterruptedException e) {
                        new VoltLogger("HOST").error(
                                "Exception while attempting to shutdown VoltDB from shutdown sysproc",
                                e);
                    }
                    if (die) {
                        new VoltLogger("HOST").warn("VoltDB shutting down as requested by @Shutdown command.");
                        System.exit(0);
                    }
                    else {
                        try {
                            Thread.sleep(10000);
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

        m_clock = clock;

        // warn if running with a simulated clock skew
        // this should only be used for testing
        if (m_timestampTestingSalt != 0) {
            VoltLogger log = new VoltLogger("HOST");
            log.warn(String.format("Initiator (id=%d) running in test mode with non-zero timestamp testing value: %d",
                     initiatorId, timestampTestingSalt));
        }


        // if the cluster has one node, allow clocks to be changed up to one week
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

            }
        }
        else {
            // reset the counter and lastUsedTime for the new millisecond
            if (currentTime < lastUsedTime) {
                VoltLogger log = new VoltLogger("HOST");
                double diffSeconds = (lastUsedTime - currentTime) / 1000.0;
                String msg = String.format("Initiator time moved backwards from: %d to %d, a difference of %.2f seconds.",
                        lastUsedTime, currentTime, diffSeconds);
                log.error(msg);
                System.err.println(msg);
                // if the diff is less than some specified amount of time, wait a bit
                if ((lastUsedTime - currentTime) < BACKWARD_TIME_FORGIVENESS_WINDOW_MS) {
                    log.info("This node will delay any stored procedures sent to it.");
                    log.info(String.format("This node will resume full operation in  %.2f seconds.", diffSeconds));

                    long count = BACKWARD_TIME_FORGIVENESS_WINDOW_MS;
                    // note, the loop should stop once lastUsedTime is PASSED, not current
                    while ((currentTime <= lastUsedTime) && (count-- > 0)) {
                        try {
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

        m_timestampTestingSalt = timestampTestingSalt;

        // warn if running with a simulated clock skew
        // this should only be used for testing
        if (m_timestampTestingSalt != 0) {
            VoltLogger log = new VoltLogger("HOST");
            log.warn(String.format("Initiator (id=%d) running in test mode with non-zero timestamp testing value: %d",
                     initiatorId, timestampTestingSalt));
        }


        BACKWARD_TIME_FORGIVENESS_WINDOW_MS = backwareTimeForgivenessWindow;
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

            }
        }
        else {
            // reset the counter and lastUsedTime for the new millisecond
            if (currentTime < lastUsedTime) {
                VoltLogger log = new VoltLogger("HOST");
                double diffSeconds = (lastUsedTime - currentTime) / 1000.0;
                String msg = String.format("Initiator time moved backwards from: %d to %d, a difference of %.2f seconds.",
                        lastUsedTime, currentTime, diffSeconds);
                log.error(msg);
                System.err.println(msg);
                // if the diff is less than some specified amount of time, wait a bit
                if ((lastUsedTime - currentTime) < BACKWARD_TIME_FORGIVENESS_WINDOW_MS) {
                    log.info("This node will delay any stored procedures sent to it.");
                    log.info(String.format("This node will resume full operation in  %.2f seconds.", diffSeconds));

                    long count = BACKWARD_TIME_FORGIVENESS_WINDOW_MS;
                    // note, the loop should stop once lastUsedTime is PASSED, not current
                    while ((currentTime <= lastUsedTime) && (count-- > 0)) {
                        try {
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

                try {
                    m_listenerSockets.get(0).close();
                    m_listenerSockets.clear();
                }
                catch (IOException ex) {
                    new VoltLogger(SocketJoiner.class.getName()).l7dlog(Level.FATAL, null, ex);
                }
            }
        }

        if (!m_listenerSockets.isEmpty()) {
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

                Encoder.decodeBase64AndDecompressToBytes(frag.getPlannodetree()),
                sqlText);
        ParameterSet params = ParameterSet.emptyParameterSet();

        // Replace the normal logger with a mocked one, so we can verify the message
        VoltLogger mockedLogger = Mockito.mock(VoltLogger.class);
        ExecutionEngine.setVoltLoggerForTest(mockedLogger);

        m_ee.setTimeoutLatency(timeout);

        try {
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

                        //I think it will always be that there was an existing snapshot request
                        //It should eventually terminate and then we can submit one.
                        try {
                            Thread.sleep(5000);
                        } catch (InterruptedException e1) {}
                        new VoltLogger("SNAPSHOT").warn("Partition detection was unable to submit a snapshot request" +
                                "because one already existed. Retrying.");
                        continue;
                    } catch (InterruptedException ignore) {}
                }
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

    /**
     * Call VoltDB.crashVoltDB on behalf of the EE
     * @param reason Reason the EE crashed
     */
    public static void crashVoltDB(String reason, String traces[], String filename, int lineno) {
        VoltLogger hostLog = new VoltLogger("HOST");
        String fn = (filename == null) ? "unknown" : filename;
        String re = (reason == null) ? "Fatal EE error." : reason;
        hostLog.fatal(re + " In " + fn + ":" + lineno);
        if (traces != null) {
            for ( String trace : traces) {
                hostLog.fatal(trace);
            }
        }
        VoltDB.crashLocalVoltDB(re + " In " + fn + ":" + lineno, true, null);
    }
View Full Code Here

Examples of org.voltcore.logging.VoltLogger

    private final Queue<Message> m_recvQ = new ConcurrentLinkedQueue<Message>();
    AtomicBoolean m_shouldContinue = new AtomicBoolean(true);

    MiniNode(long HSId, Set<Long> HSIds, FakeMesh mesh)
    {
        m_nodeLog = new VoltLogger("MININODE-" + CoreUtils.hsIdToString(HSId));
        m_nodeLog.info("Constructing MiniNode for HSID: " + CoreUtils.hsIdToString(HSId));
        m_HSId = HSId;
        m_HSIds.addAll(HSIds);
        m_mesh = mesh;
        m_deadTracker = new DeadHostTracker(TIMEOUT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.