Examples of recoverBlock()


Examples of org.apache.hadoop.hdfs.BlockRecoveryCoordinator.recoverBlock()

    try {
      BlockRecoveryCoordinator brc = new BlockRecoveryCoordinator(LOG,
          getConf(), socketTimeout, this, namespaceManager.get(namespaceId),
          getDNRegistrationForNS(namespaceId));
     
      return brc.recoverBlock(namespaceId, block, keepLength, datanodeids, closeFile,
          deadline);
    } finally {
      synchronized (ongoingRecovery) {
        ongoingRecovery.remove(block);
      }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol.recoverBlock()

    ClientDatanodeProtocol proxy = null;
    try {
      proxy = (ClientDatanodeProtocol) RPC.getProxy(
          ClientDatanodeProtocol.class, ClientDatanodeProtocol.versionID, addr,
          ticket, conf, NetUtils.getDefaultSocketFactory(conf));
      LocatedBlock lb = proxy.recoverBlock(block3, true, null);
      assertEquals(block3.getBlockId(), lb.getBlock().getBlockId());
    } finally {
      server.stop();
      if (proxy != null) {
        RPC.stopProxy(proxy);
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol.recoverBlock()

                          getPort(targets.get(i).name)));
      }
      // make RPC to datanode
      try {
        ClientDatanodeProtocol remote = getOrCreate(datanode.name);
        Block nblk = remote.recoverBlock(namespaceId.id, blk,
                              keepLength, targs, deadline).getBlock();
        return new ThdfsBlock(nblk.getBlockId(), nblk.getNumBytes(),
                              nblk.getGenerationStamp());
      } catch (IOException e) {
        String msg = "Error recoverBlock datanode " + datanode.name +
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock()

      int nsId = cluster.getNameNode().getNamespaceID();

      for (DatanodeInfo datanodeinfo : locatedblock.getLocations()) {
        DataNode datanode = cluster.getDataNode(datanodeinfo.ipcPort);
        try {
          datanode.recoverBlock(nsId, locatedblock.getBlock(), true,
              locatedblock.getLocations(), System.currentTimeMillis());
          TestCase.fail("recoverBlock didn't throw timeout exception");
        } catch (DataNode.BlockRecoveryTimeoutException e) {

        }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.datanode.DataNode.recoverBlock()

      int nsId = cluster.getNameNode().getNamespaceID();

      for (DatanodeInfo datanodeinfo : locatedblock.getLocations()) {
        DataNode datanode = cluster.getDataNode(datanodeinfo.ipcPort);
        try {
          datanode.recoverBlock(nsId, locatedblock.getBlock(), true,
              locatedblock.getLocations(), System.currentTimeMillis());
          TestCase.fail("recoverBlock didn't throw timeout exception");
        } catch (DataNode.BlockRecoveryTimeoutException e) {

        }
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.