Examples of writeVersionAndOpCode()


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

          AppendBlockHeader headerToSend = new AppendBlockHeader(
              versionAndOpcode.getDataTransferVersion(), namespaceid,
              block.getBlockId(), block.getNumBytes(), block.getGenerationStamp(), pipelineSize,
              hasSrcDataNode, srcDataNode, targets.length - 1, targets,
              client);
          headerToSend.writeVersionAndOpCode(mirrorOut);
          headerToSend.write(mirrorOut);
          blockReceiver.writeChecksumHeader(mirrorOut);
          mirrorOut.flush();

          // read connect ack (only for clients, not for replication req)
View Full Code Here

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

          AppendBlockHeader header = new AppendBlockHeader(version,
              dfsClient.namespaceId, block.getBlockId(), block.getNumBytes(),
              block.getGenerationStamp(),
              pipelineDepth, false, null, pipelineDepth - 1,
              nodes, client);
          header.writeVersionAndOpCode(out);
          header.write(out);
        }
        checksum.writeHeader(out);
        out.flush();
View Full Code Here

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

         
          /* Write the header */
          BlockChecksumHeader blockChecksumHeader = new BlockChecksumHeader(
              dataTransferVersion, namespaceId, block.getBlockId(),
              block.getGenerationStamp());
          blockChecksumHeader.writeVersionAndOpCode(out);
          blockChecksumHeader.write(out);
          out.flush();

          final short reply = in.readShort();
          if (reply != DataTransferProtocol.OP_STATUS_SUCCESS) {
View Full Code Here

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

         
          /* Write the header */
          BlockChecksumHeader blockChecksumHeader = new BlockChecksumHeader(
              dataTransferVersion, namespaceId, block.getBlockId(),
              block.getGenerationStamp());
          blockChecksumHeader.writeVersionAndOpCode(out);
          blockChecksumHeader.write(out);
          out.flush();

          final short reply = in.readShort();
          if (reply != DataTransferProtocol.OP_STATUS_SUCCESS) {
View Full Code Here

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

         
          /* Write the header */
          BlockCrcHeader blockCrcHeader = new BlockCrcHeader(
              dataTransferVersion, namespaceId, block.getBlockId(),
              block.getGenerationStamp());
          blockCrcHeader.writeVersionAndOpCode(out);
          blockCrcHeader.write(out);
          out.flush();

          final short reply = in.readShort();
          if (reply != DataTransferProtocol.OP_STATUS_SUCCESS) {
View Full Code Here

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

      /* send request to the proxy */
      CopyBlockHeader copyBlockHeader = new CopyBlockHeader(
          DataTransferProtocol.DATA_TRANSFER_VERSION, namespaceId,
          block.getBlockId(), block.getGenerationStamp());
      copyBlockHeader.writeVersionAndOpCode(proxyOut);
      copyBlockHeader.write(proxyOut);
      proxyOut.flush();

      // receive the response from the proxy
      proxyReply = new DataInputStream(new BufferedInputStream(
View Full Code Here

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

      /* send request to the proxy */
      CopyBlockHeader copyBlockHeader = new CopyBlockHeader(
          DataTransferProtocol.DATA_TRANSFER_VERSION, namespaceId,
          block.getBlockId(), block.getGenerationStamp());
      copyBlockHeader.writeVersionAndOpCode(proxyOut);
      copyBlockHeader.write(proxyOut);
      proxyOut.flush();

      // receive the response from the proxy
      proxyReply = new DataInputStream(new BufferedInputStream(
View Full Code Here

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

    //write the header.
    ReadBlockHeader readBlockHeader = new ReadBlockHeader(
        dataTransferVersion, namespaceId, blockId, genStamp, startOffset, len,
        clientName);
    readBlockHeader.writeVersionAndOpCode(out);
    readBlockHeader.write(out);
    out.flush();

    //
    // Get bytes in block, set streams
View Full Code Here

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

      //write the header.
      ReadBlockHeader readBlockHeader = new ReadBlockHeader(
          dataTransferVersion, namespaceId, blockId, genStamp, startOffset, len,
          clientName);
      readBlockHeader.writeVersionAndOpCode(out);
      readBlockHeader.write(out);
      out.flush();

      //
      // Get bytes in block, set streams
View Full Code Here

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

    //write the header.
    ReadBlockHeader readBlockHeader = new ReadBlockHeader(
        dataTransferVersion, namespaceId, blockId, genStamp, startOffset, len,
        clientName, reuseConnection, cliData != null);
    readBlockHeader.setReadOptions(options);
    readBlockHeader.writeVersionAndOpCode(out);
    readBlockHeader.write(out);
    out.flush();

    //
    // Get bytes in block, set streams
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.