Search in sources :

Example 1 with DescribeJournal

use of org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal in project activemq-artemis by apache.

the class PrintData method printDataJDBC.

public void printDataJDBC(Configuration configuration, PrintStream out) throws Exception {
    initializeJournal(configuration);
    Artemis.printBanner(out);
    printBanner(out, BINDINGS_BANNER);
    DescribeJournal.printSurvivingRecords(storageManager.getBindingsJournal(), out, safe);
    printBanner(out, MESSAGES_BANNER);
    DescribeJournal describeJournal = DescribeJournal.printSurvivingRecords(storageManager.getMessageJournal(), out, safe);
    printPages(describeJournal, storageManager, pagingmanager, out, safe);
    cleanup();
}
Also used : DescribeJournal(org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal)

Example 2 with DescribeJournal

use of org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal in project activemq-artemis by apache.

the class PrintData method printData.

public static void printData(File bindingsDirectory, File messagesDirectory, File pagingDirectory, PrintStream out, boolean safe) throws Exception {
    // Having the version on the data report is an information very useful to understand what happened
    // When debugging stuff
    Artemis.printBanner(out);
    File serverLockFile = new File(messagesDirectory, "server.lock");
    if (serverLockFile.isFile()) {
        try {
            FileLockNodeManager fileLock = new FileLockNodeManager(messagesDirectory, false);
            fileLock.start();
            printBanner(out, "Server's ID=" + fileLock.getNodeId().toString());
            fileLock.stop();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    printBanner(out, BINDINGS_BANNER);
    try {
        DescribeJournal.describeBindingsJournal(bindingsDirectory, out, safe);
    } catch (Exception e) {
        e.printStackTrace();
    }
    printBanner(out, MESSAGES_BANNER);
    DescribeJournal describeJournal = null;
    try {
        describeJournal = DescribeJournal.describeMessagesJournal(messagesDirectory, out, safe);
    } catch (Exception e) {
        e.printStackTrace();
        return;
    }
    try {
        printBanner(out, "P A G I N G");
        printPages(pagingDirectory, describeJournal, out, safe);
    } catch (Exception e) {
        e.printStackTrace();
        return;
    }
}
Also used : FileLockNodeManager(org.apache.activemq.artemis.core.server.impl.FileLockNodeManager) DescribeJournal(org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal) File(java.io.File)

Aggregations

DescribeJournal (org.apache.activemq.artemis.core.persistence.impl.journal.DescribeJournal)2 File (java.io.File)1 FileLockNodeManager (org.apache.activemq.artemis.core.server.impl.FileLockNodeManager)1