Examples of restartDataNode()


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

      TestDatanodeBlockScanner.corruptReplica(block.getBlockName(), 0);
      File scanLog = new File(System.getProperty("test.build.data"),
          "dfs/data/data1/current/dncp_block_verification.log.curr");
      assertTrue(scanLog.delete());
      // restart the datanode so the corrupt replica will be detected
      cluster.restartDataNode(0);
      DFSTestUtil.waitReplication(fs, fileName, (short)2);
     
      final DatanodeID corruptDataNode =
        cluster.getDataNodes().get(2).dnRegistration;
      final FSNamesystem namesystem = FSNamesystem.getFSNamesystem();
View Full Code Here

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

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

      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive();
     
      // check if excessive replica is detected
      NumberReplicas num = null;
      do {
View Full Code Here

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

      do {
        num = namesystem.countNodes(block);
      } while (num.liveReplicas() != REPLICATION_FACTOR);
     
      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive();
     
      // check if excessive replica is detected
      do {
       num = namesystem.countNodes(block);
View Full Code Here

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

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

        num = namesystem.countNodes(block);
      } while (num.liveReplicas() != REPLICATION_FACTOR);

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

      Thread.sleep(3000);

      LOG.info("Waiting for excess replicas to be detected");
View Full Code Here

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

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

      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive();
     
      // check if excessive replica is detected
      NumberReplicas num = null;
      do {
View Full Code Here

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

      do {
        num = namesystem.countNodes(block);
      } while (num.liveReplicas() != REPLICATION_FACTOR);
     
      // restart the first datanode
      cluster.restartDataNode(dnprop);
      cluster.waitActive();
     
      // check if excessive replica is detected
      do {
       num = namesystem.countNodes(block);
View Full Code Here

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

      DataNodeProperties dnProps = cluster.stopDataNode(0);
     
      // Restart the namenode so that when the DN comes up it will see an initial
      // block report.
      cluster.restartNameNode(1, false);
      assertTrue(cluster.restartDataNode(dnProps, true));
     
      // Wait until the standby NN queues up the corrupt block in the pending DN
      // message queue.
      while (cluster.getNamesystem(1).getBlockManager()
          .getPendingDataNodeMessageCount() < 1) {
View Full Code Here

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

      StaticMapping.addNodeToRack(hosts[invalidIdx], racks[validIdx]);
      LOG.info("datanode " + validIdx + " came up with network location " +
        info[0].getNetworkLocation());

      // Restart the DN with the invalid topology and wait for it to register.
      cluster.restartDataNode(invalidIdx);
      Thread.sleep(5000);
      while (true) {
        info = nn.getDatanodeReport(DatanodeReportType.LIVE);
        if (info.length == 2) {
          break;
View Full Code Here

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

          Thread.sleep(1000);
        } catch (InterruptedException ignored) {}
      }
     
      // restart the datanode so the corrupt replica will be detected
      cluster.restartDataNode(dnProps);
      DFSTestUtil.waitReplication(fs, fileName, (short)2);
     
      String blockPoolId = cluster.getNamesystem().getBlockPoolId();
      final DatanodeID corruptDataNode =
        DataNodeTestUtils.getDNRegistrationForBP(
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.