public virtual void SetupCluster()
        {
            conf = new Configuration();
            conf.SetInt(DFSConfigKeys.DfsHaTaileditsPeriodKey, 1);
            HAUtil.SetAllowStandbyReads(conf, true);
            fsHelper = new FileSystemTestHelper();
            string testRoot = fsHelper.GetTestRootDir();

            testRootDir = new FilePath(testRoot).GetAbsoluteFile();
            conf.Set(DFSConfigKeys.DfsEncryptionKeyProviderUri, JavaKeyStoreProvider.SchemeName
                     + "://file" + new Path(testRootDir.ToString(), "test.jks").ToUri());
            cluster = new MiniDFSCluster.Builder(conf).NnTopology(MiniDFSNNTopology.SimpleHATopology
                                                                      ()).NumDataNodes(1).Build();
            cluster.WaitActive();
            cluster.TransitionToActive(0);
            fs = (DistributedFileSystem)HATestUtil.ConfigureFailoverFs(cluster, conf);
            DFSTestUtil.CreateKey(TestKey, cluster, 0, conf);
            DFSTestUtil.CreateKey(TestKey, cluster, 1, conf);
            nn0       = cluster.GetNameNode(0);
            nn1       = cluster.GetNameNode(1);
            dfsAdmin0 = new HdfsAdmin(cluster.GetURI(0), conf);
            dfsAdmin1 = new HdfsAdmin(cluster.GetURI(1), conf);
            KeyProviderCryptoExtension nn0Provider = cluster.GetNameNode(0).GetNamesystem().GetProvider
                                                         ();

            fs.GetClient().SetKeyProvider(nn0Provider);
        }
 public virtual void SetUpCluster()
 {
     cluster = new MiniDFSCluster.Builder(conf).NnTopology(MiniDFSNNTopology.SimpleHATopology
                                                               ()).Build();
     cluster.TransitionToActive(0);
     cluster.WaitActive();
 }