Search in sources :

Example 1 with Journal

use of org.apache.hadoop.hdfs.qjournal.server.Journal in project hadoop by apache.

the class TestDFSUpgradeWithHA method getCommittedTxnIdValue.

private long getCommittedTxnIdValue(MiniQJMHACluster qjCluster) throws IOException {
    Journal journal1 = qjCluster.getJournalCluster().getJournalNode(0).getOrCreateJournal(MiniQJMHACluster.NAMESERVICE);
    BestEffortLongFile committedTxnId = (BestEffortLongFile) Whitebox.getInternalState(journal1, "committedTxnId");
    return committedTxnId != null ? committedTxnId.get() : HdfsServerConstants.INVALID_TXID;
}
Also used : Journal(org.apache.hadoop.hdfs.qjournal.server.Journal) BestEffortLongFile(org.apache.hadoop.hdfs.util.BestEffortLongFile)

Aggregations

Journal (org.apache.hadoop.hdfs.qjournal.server.Journal)1 BestEffortLongFile (org.apache.hadoop.hdfs.util.BestEffortLongFile)1