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();
}
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;
}
}
Aggregations