Package org.apache.hadoop.hdfs

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


      // the block will be replicated
      DFSTestUtil.waitReplication(fs, FILE_PATH, REPLICATION_FACTOR);

      LOG.info("Restarting first datanode");
      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive(false);

      LOG.info("Waiting for excess replicas to be detected");
     
      // check if excessive replica is detected
View Full Code Here


       }
      } while (num.liveReplicas() != REPLICATION_FACTOR);
     
      LOG.info("Restarting first DN");
      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive(false);
      // check if excessive replica is detected
      LOG.info("Waiting for excess replicas to be detected");
      waitForExcessReplicasToChange(namesystem, block, 2);
    } finally {
View Full Code Here

      assertEquals(rsCodec.numStripeBlocks, namesystem.getRaidMissingBlocksCount());
      assertEquals(0, namesystem.getMissingBlocksCount()); // zero non-raid missing block
      assertEquals(0, namesystem.getNonCorruptUnderReplicatedBlocks());
     
      // bring up the datanode
      cluster.restartDataNode(dnprop);
     
      // Wait for block report
      LOG.info("wait for its block report to come in");
      NumberReplicas num;
      FileStatus stat = dfs.getFileStatus(new Path(filePath));
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.