public virtual void TestFormat()
        {
            QuorumJournalManager qjm = CloseLater(new QuorumJournalManager(conf, cluster.GetQuorumJournalURI
                                                                               ("testFormat-jid"), QJMTestUtil.FakeNsinfo));

            NUnit.Framework.Assert.IsFalse(qjm.HasSomeData());
            qjm.Format(QJMTestUtil.FakeNsinfo);
            NUnit.Framework.Assert.IsTrue(qjm.HasSomeData());
        }
Ejemplo n.º 2
0
 /// <exception cref="System.IO.IOException"/>
 /// <exception cref="Sharpen.URISyntaxException"/>
 private static QuorumJournalManager CreateRandomFaultyQJM(MiniJournalCluster cluster
                                                           , Random seedGenerator)
 {
     AsyncLogger.Factory spyFactory = new _Factory_502(seedGenerator);
     return(new QuorumJournalManager(conf, cluster.GetQuorumJournalURI(QJMTestUtil.Jid
                                                                       ), QJMTestUtil.FakeNsinfo, spyFactory));
 }
Ejemplo n.º 3
0
 /// <exception cref="System.IO.IOException"/>
 /// <exception cref="Sharpen.URISyntaxException"/>
 private static QuorumJournalManager CreateInjectableQJM(MiniJournalCluster cluster
                                                         )
 {
     AsyncLogger.Factory spyFactory = new _Factory_487();
     return(new QuorumJournalManager(conf, cluster.GetQuorumJournalURI(QJMTestUtil.Jid
                                                                       ), QJMTestUtil.FakeNsinfo, spyFactory));
 }
Ejemplo n.º 4
0
 private static Configuration SetConf(Configuration conf, FilePath dir, MiniJournalCluster
                                      mjc)
 {
     conf.Set(DFSConfigKeys.DfsNamenodeNameDirKey, dir.GetAbsolutePath());
     conf.Set(DFSConfigKeys.DfsNamenodeEditsDirKey, mjc.GetQuorumJournalURI("myjournal"
                                                                            ).ToString());
     conf.SetLong(DFSConfigKeys.DfsNamenodeCheckpointTxnsKey, 0L);
     return(conf);
 }