Package org.apache.hadoop.hdfs.protocol

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


                          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

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.