当前位置: 首页>>代码示例>>Java>>正文


Java DataTransferEncryptorMessageProto.Builder方法代码示例

本文整理汇总了Java中org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java DataTransferEncryptorMessageProto.Builder方法的具体用法?Java DataTransferEncryptorMessageProto.Builder怎么用?Java DataTransferEncryptorMessageProto.Builder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto的用法示例。


在下文中一共展示了DataTransferEncryptorMessageProto.Builder方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendSaslMessageAndNegotiatedCipherOption

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Send SASL message and negotiated cipher option to client.
 * 
 * @param out stream to receive message
 * @param payload to send
 * @param option negotiated cipher option
 * @throws IOException for any error
 */
public static void sendSaslMessageAndNegotiatedCipherOption(
    OutputStream out, byte[] payload, CipherOption option) 
        throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  
  builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (option != null) {
    builder.addCipherOption(PBHelper.convert(option));
  }
  
  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:DataTransferSaslUtil.java

示例2: sendSaslMessageAndNegotiationCipherOptions

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Send a SASL negotiation message and negotiation cipher options to server.
 * 
 * @param out stream to receive message
 * @param payload to send
 * @param options cipher options to negotiate
 * @throws IOException for any error
 */
public static void sendSaslMessageAndNegotiationCipherOptions(
    OutputStream out, byte[] payload, List<CipherOption> options)
        throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  
  builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (options != null) {
    builder.addAllCipherOption(PBHelper.convertCipherOptions(options));
  }
  
  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:DataTransferSaslUtil.java

示例3: sendSaslMessage

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Sends a SASL negotiation message.
 *
 * @param out stream to receive message
 * @param status negotiation status
 * @param payload to send
 * @param message to send
 * @throws IOException for any error
 */
public static void sendSaslMessage(OutputStream out,
    DataTransferEncryptorStatus status, byte[] payload, String message)
        throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  
  builder.setStatus(status);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (message != null) {
    builder.setMessage(message);
  }
  
  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:DataTransferSaslUtil.java

示例4: sendSaslMessageAndNegotiatedCipherOption

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Send SASL message and negotiated cipher option to client.
 *
 * @param out stream to receive message
 * @param payload to send
 * @param option negotiated cipher option
 * @throws IOException for any error
 */
public static void sendSaslMessageAndNegotiatedCipherOption(
    OutputStream out, byte[] payload, CipherOption option)
    throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();

  builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (option != null) {
    builder.addCipherOption(PBHelperClient.convert(option));
  }

  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:27,代码来源:DataTransferSaslUtil.java

示例5: sendSaslMessageAndNegotiationCipherOptions

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Send a SASL negotiation message and negotiation cipher options to server.
 *
 * @param out stream to receive message
 * @param payload to send
 * @param options cipher options to negotiate
 * @throws IOException for any error
 */
public static void sendSaslMessageAndNegotiationCipherOptions(
    OutputStream out, byte[] payload, List<CipherOption> options)
    throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();

  builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (options != null) {
    builder.addAllCipherOption(PBHelperClient.convertCipherOptions(options));
  }

  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:27,代码来源:DataTransferSaslUtil.java

示例6: sendSaslMessage

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
/**
 * Sends a SASL negotiation message.
 *
 * @param out stream to receive message
 * @param status negotiation status
 * @param payload to send
 * @param message to send
 * @throws IOException for any error
 */
public static void sendSaslMessage(OutputStream out,
    DataTransferEncryptorStatus status, byte[] payload, String message)
    throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();

  builder.setStatus(status);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (message != null) {
    builder.setMessage(message);
  }

  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:28,代码来源:DataTransferSaslUtil.java

示例7: sendSaslMessage

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
private static void sendSaslMessage(OutputStream out,
    DataTransferEncryptorStatus status, byte[] payload, String message)
        throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  
  builder.setStatus(status);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (message != null) {
    builder.setMessage(message);
  }
  
  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:19,代码来源:DataTransferEncryptor.java

示例8: sendSaslMessage

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
private static void sendSaslMessage(OutputStream out,
    DataTransferEncryptorStatus status, byte[] payload, String message)
    throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  
  builder.setStatus(status);
  if (payload != null) {
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (message != null) {
    builder.setMessage(message);
  }
  
  DataTransferEncryptorMessageProto proto = builder.build();
  proto.writeDelimitedTo(out);
  out.flush();
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:19,代码来源:DataTransferEncryptor.java

示例9: sendSaslMessage

import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto; //导入方法依赖的package包/类
private void sendSaslMessage(ChannelHandlerContext ctx, byte[] payload,
    List<CipherOption> options) throws IOException {
  DataTransferEncryptorMessageProto.Builder builder =
      DataTransferEncryptorMessageProto.newBuilder();
  builder.setStatus(DataTransferEncryptorStatus.SUCCESS);
  if (payload != null) {
    // Was ByteStringer; fix w/o using ByteStringer. Its in hbase-protocol
    // and we want to keep that out of hbase-server.
    builder.setPayload(ByteString.copyFrom(payload));
  }
  if (options != null) {
    builder.addAllCipherOption(PB_HELPER.convertCipherOptions(options));
  }
  DataTransferEncryptorMessageProto proto = builder.build();
  int size = proto.getSerializedSize();
  size += CodedOutputStream.computeRawVarint32Size(size);
  ByteBuf buf = ctx.alloc().buffer(size);
  proto.writeDelimitedTo(new ByteBufOutputStream(buf));
  ctx.write(buf);
}
 
开发者ID:apache,项目名称:hbase,代码行数:21,代码来源:FanOutOneBlockAsyncDFSOutputSaslHelper.java


注:本文中的org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.DataTransferEncryptorMessageProto.Builder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。