Examples of datanodeReport()


Examples of org.apache.hadoop.hdfs.DFSClient.datanodeReport()

  }
 
  private String decommissionOneNode() throws IOException {
   
    DFSClient client = ((DistributedFileSystem)fileSys).getClient();
    DatanodeInfo[] info = client.datanodeReport(DatanodeReportType.LIVE);

    int index = 0;
    boolean found = false;
    while (!found) {
      index = rand.nextInt(info.length);
View Full Code Here

Examples of org.apache.hadoop.hdfs.DFSClient.datanodeReport()

  @Test
  public void testDecommissionStatus() throws IOException, InterruptedException {
    InetSocketAddress addr = new InetSocketAddress("localhost", cluster
        .getNameNodePort());
    DFSClient client = new DFSClient(addr, conf);
    DatanodeInfo[] info = client.datanodeReport(DatanodeReportType.LIVE);
    assertEquals("Number of Datanodes ", 2, info.length);
    FileSystem fileSys = cluster.getFileSystem();

    short replicas = 2;
    //
View Full Code Here

Examples of org.apache.hadoop.hdfs.DFSClient.datanodeReport()

      // create test files
      int numFiles = 4;
      long blockSize = 1024L;
      String parentDir = "/dir/";
      DFSClient client = getDfsClient(cluster.getNameNode(), conf);
      DatanodeInfo[] infos = client.datanodeReport(DatanodeReportType.LIVE);
      ArrayList<String> rack2nodes = new ArrayList<String>();
      ArrayList<DatanodeInfo> rack2di = new ArrayList<DatanodeInfo>();
      for (DatanodeInfo di: infos) {
        if (di.getHostName().contains("rack2")) {
          rack2nodes.add(di.getName());
View Full Code Here

Examples of org.apache.hadoop.hdfs.DFSClient.datanodeReport()

      cluster.waitActive();
      for (DataNode dn: cluster.getDataNodes()) {
        dn.useInlineChecksum = false;
      }
     
      DatanodeInfo[] datanodes = client.datanodeReport(DatanodeReportType.ALL);

      // find out the new node
      DatanodeInfo newNode=null;
      for(DatanodeInfo node:datanodes) {
        Boolean isNewNode = true;
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.FSNamesystem.datanodeReport()

    long start = System.currentTimeMillis();
    // Wait for atleast 3 full block reports from the datanode.
    while (System.currentTimeMillis() - start <= MAX_WAIT_TIME) {

      // This makes sure we trigger, redudant addStoredBlocks() on the NameNode.
      for (DatanodeInfo dn : ns.datanodeReport(DatanodeReportType.ALL)) {
        ns.unprotectedRemoveDatanode(ns.getDatanode(dn));
      }
      Thread.sleep(200);
    }
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.