Examples of waitActive()


Examples of org.apache.hadoop.hdfs.MiniDFSCluster.waitActive()

    FileSystem fs = null;

    MiniDFSCluster cluster = null;
    try {
      cluster = new MiniDFSCluster.Builder(conf).build();
      cluster.waitActive();
      fs = cluster.getFileSystem();
      DFSTestUtil util = new DFSTestUtil.Builder().
          setName("testGetCorruptFiles").setNumFiles(3).setMaxLevels(1).
          setMaxSize(1024).build();
      util.createFiles(fs, "/corruptData", (short) 1);
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.waitActive()

    FileSystem fs = null;

    try {
      cluster = new MiniDFSCluster.Builder(conf).numDataNodes(numDatanodes)
          .build();
      cluster.waitActive();
      fs = cluster.getFileSystem();
      secondary = startSecondaryNameNode(conf);
      fos = fs.create(new Path("tmpfile0"));
      fos.write(new byte[] { 0, 1, 2, 3 });
      secondary.doCheckpoint();
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSClusterWithNodeGroup.waitActive()

      MiniDFSClusterWithNodeGroup.setNodeGroups(nodeGroup1);
      // start the dfs cluster with datanode1 only.
      dfs = new MiniDFSClusterWithNodeGroup(0, conf, 1,
                true, true, null, rack1, hosts1, null);

      dfs.waitActive();
      fileSys = dfs.getFileSystem();
      if (!fileSys.mkdirs(inDir)) {
        throw new IOException("Mkdirs failed to create " + inDir.toString());
      }
      // write file1 on datanode1 with 1 replica
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.