/// <exception cref="System.Exception"/> public virtual void TestTruncate() { FileSystem fs = cluster.GetFileSystem(); bench.CreateControlFile(fs, DefaultNrBytes / 2, DefaultNrFiles); long tStart = Runtime.CurrentTimeMillis(); bench.TruncateTest(fs); long execTime = Runtime.CurrentTimeMillis() - tStart; bench.AnalyzeResult(fs, TestDFSIO.TestType.TestTypeTruncate, execTime); }
public static void BeforeClass() { bench = new TestDFSIO(); bench.GetConf().SetBoolean(DFSConfigKeys.DfsSupportAppendKey, true); bench.GetConf().SetInt(DFSConfigKeys.DfsHeartbeatIntervalKey, 1); cluster = new MiniDFSCluster.Builder(bench.GetConf()).NumDataNodes(2).Format(true ).Build(); FileSystem fs = cluster.GetFileSystem(); bench.CreateControlFile(fs, DefaultNrBytes, DefaultNrFiles); TestWrite(); }