static TestQJMWithFaults() { // Don't retry connections - it just slows down the tests. conf.SetInt(CommonConfigurationKeysPublic.IpcClientConnectMaxRetriesKey, 0); // Make tests run faster by avoiding fsync() EditLogFileOutputStream.SetShouldSkipFsyncForTesting(true); }
public static void SetupTest() { EditLogFileOutputStream.SetShouldSkipFsyncForTesting(true); // Track calls to posix_fadvise. NativeIO.POSIX.SetCacheManipulator(tracker); // Normally, we wait for a few megabytes of data to be read or written // before dropping the cache. This is to avoid an excessive number of // JNI calls to the posix_fadvise function. However, for the purpose // of this test, we want to use small files and see all fadvise calls // happen. BlockSender.CacheDropIntervalBytes = 4096; BlockReceiver.CacheDropLagBytes = 4096; }
/// <exception cref="System.IO.IOException"/> private static void CreateEmptyInProgressEditLog(MiniDFSCluster cluster, NameNode nn, bool writeHeader) { long txid = nn.GetNamesystem().GetEditLog().GetLastWrittenTxId(); URI sharedEditsUri = cluster.GetSharedEditsDir(0, 1); FilePath sharedEditsDir = new FilePath(sharedEditsUri.GetPath()); Storage.StorageDirectory storageDir = new Storage.StorageDirectory(sharedEditsDir ); FilePath inProgressFile = NameNodeAdapter.GetInProgressEditsFile(storageDir, txid + 1); NUnit.Framework.Assert.IsTrue("Failed to create in-progress edits file", inProgressFile .CreateNewFile()); if (writeHeader) { DataOutputStream @out = new DataOutputStream(new FileOutputStream(inProgressFile) ); EditLogFileOutputStream.WriteHeader(NameNodeLayoutVersion.CurrentLayoutVersion, @out ); @out.Close(); } }
static TestDFSZKFailoverController() { // Make tests run faster by avoiding fsync() EditLogFileOutputStream.SetShouldSkipFsyncForTesting(true); }
static TestNestedSnapshots() { // These tests generate a large number of edits, and repeated edit log // flushes can be a bottleneck. EditLogFileOutputStream.SetShouldSkipFsyncForTesting(true); }
/// <summary>Create a processor that writes to a given file</summary> /// <param name="outputName">Name of file to write output to</param> /// <exception cref="System.IO.IOException"/> public BinaryEditsVisitor(string outputName) { this.elfos = new EditLogFileOutputStream(new Configuration(), new FilePath(outputName ), 0); elfos.Create(NameNodeLayoutVersion.CurrentLayoutVersion); }
static TestEditLogsDuringFailover() { // No need to fsync for the purposes of tests. This makes // the tests run much faster. EditLogFileOutputStream.SetShouldSkipFsyncForTesting(true); }