Exemple #1
0
        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();
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            TestDFSIO bench = new TestDFSIO();
            int       res   = -1;

            try
            {
                res = ToolRunner.Run(bench, args);
            }
            catch (Exception e)
            {
                System.Console.Error.Write(StringUtils.StringifyException(e));
                res = -2;
            }
            if (res == -1)
            {
                System.Console.Error.Write(Usage);
            }
            System.Environment.Exit(res);
        }