Package org.apache.hadoop.hdfs.protocol

Examples of org.apache.hadoop.hdfs.protocol.ReplaceBlockHeader.writeVersionAndOpCode()


      /* Write the header */
      ReplaceBlockHeader replaceBlockHeader = new ReplaceBlockHeader(
          DataTransferProtocol.DATA_TRANSFER_VERSION, namespaceId,
          block.getBlock().getBlockId(), block.getBlock().getGenerationStamp(),
          source.getStorageID(), proxySource.getDatanode());
      replaceBlockHeader.writeVersionAndOpCode(out);
      replaceBlockHeader.write(out);
      out.flush();
    }

    /* Receive a block copy response from the input stream */
 
View Full Code Here


    private void sendRequest(DataOutputStream out) throws IOException {
      ReplaceBlockHeader header = new ReplaceBlockHeader(new VersionAndOpcode(
          dataTransferProtocolVersion, DataTransferProtocol.OP_REPLACE_BLOCK));
      header.set(namespaceId, block.getBlock().getBlockId(), block.getBlock()
          .getGenerationStamp(), source.getStorageID(), proxySource);
      header.writeVersionAndOpCode(out);
      header.write(out);
      out.flush();
    }

    /**
 
View Full Code Here

      /* Write the header */
      ReplaceBlockHeader replaceBlockHeader = new ReplaceBlockHeader(
          DataTransferProtocol.DATA_TRANSFER_VERSION, namespaceId,
          block.getBlock().getBlockId(), block.getBlock().getGenerationStamp(),
          source.getStorageID(), proxySource.getDatanode());
      replaceBlockHeader.writeVersionAndOpCode(out);
      replaceBlockHeader.write(out);
      out.flush();
    }

    /* Receive a block copy response from the input stream */
 
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.