public static void Setup() { // start a cluster with single datanode cluster = new MiniDFSCluster.Builder(Conf).Build(); cluster.WaitActive(); fs = cluster.GetFileSystem(); string str = "hftp://" + Conf.Get(DFSConfigKeys.DfsNamenodeHttpAddressKey); hftpURI = new URI(str); hftpFs = cluster.GetHftpFileSystem(0); }
public static void TestSetUp() { conf = new HdfsConfiguration(); conf.SetInt(DFSConfigKeys.DfsListLimit, 2); cluster = new MiniDFSCluster.Builder(conf).Build(); fs = cluster.GetFileSystem(); fc = FileContext.GetFileContext(cluster.GetURI(0), conf); hftpfs = cluster.GetHftpFileSystem(0); dfsClient = new DFSClient(NameNode.GetAddress(conf), conf); file1 = new Path("filestatus.dat"); WriteFile(fs, file1, 1, fileSize, blockSize); }