Search in sources :

Example 1 with JournalType

use of alluxio.master.journal.JournalType in project alluxio by Alluxio.

the class JournalTool method dumpJournal.

@SuppressFBWarnings(value = "DB_DUPLICATE_SWITCH_CLAUSES")
private static void dumpJournal() throws Throwable {
    JournalType journalType = ServerConfiguration.getEnum(PropertyKey.MASTER_JOURNAL_TYPE, JournalType.class);
    AbstractJournalDumper journalDumper;
    switch(journalType) {
        case UFS:
            journalDumper = new UfsJournalDumper(sMaster, sStart, sEnd, sOutputDir, sInputDir);
            break;
        case EMBEDDED:
            journalDumper = new RaftJournalDumper(sMaster, sStart, sEnd, sOutputDir, sInputDir);
            break;
        default:
            System.err.println(String.format("Unsupported journal type: %s", journalType.name()));
            return;
    }
    System.out.println(String.format("Dumping journal of type %s to %s", journalType.name(), sOutputDir));
    journalDumper.dumpJournal();
}
Also used : JournalType(alluxio.master.journal.JournalType) SuppressFBWarnings(alluxio.annotation.SuppressFBWarnings)

Aggregations

SuppressFBWarnings (alluxio.annotation.SuppressFBWarnings)1 JournalType (alluxio.master.journal.JournalType)1