hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/storage/ContainerProtocolCalls.java
public static void putKey(XceiverClientSpi xceiverClient,
      KeyData containerKeyData, String traceID) throws IOException {
    PutKeyRequestProto.Builder createKeyRequest = PutKeyRequestProto
        .newBuilder()
        .setPipeline(xceiverClient.getPipeline().getProtobufMessage())
        .setKeyData(containerKeyData);
    String id = xceiverClient.getPipeline().getLeader().getUuidString();
    ContainerCommandRequestProto request = ContainerCommandRequestProto
        .newBuilder()
        .setCmdType(Type.PutKey)
        .setTraceID(traceID)
        .setDatanodeUuid(id)
        .setPutKey(createKeyRequest)
        .build();
    ContainerCommandResponseProto response = xceiverClient.sendCommand(request);
    validateContainerResponse(response);
  }
/**
   * Calls the container protocol to put a container key.
   *
   * @param xceiverClient client to perform call
   * @param containerKeyData key data to identify container
   * @param traceID container protocol call args
   * @throws IOException if there is an I/O error while performing the call
   */
Calls the container protocol to put a container key.
@param xceiverClient client to perform call
@param containerKeyData key data to identify container
@param traceID container protocol call args
@throws IOException if there is an I/O error while performing the call
Calls the container protocol to put a container key . @param xceiverClient client to perform call @param containerKeyData key data to identify container @param traceID container protocol call args @throws IOException if there is an I / O error while performing the call
public static void putKey(XceiverClientSpi xceiverClient,
      KeyData containerKeyData, String traceID) throws IOException {
    PutKeyRequestProto.Builder createKeyRequest = PutKeyRequestProto
        .newBuilder()
        .setPipeline(xceiverClient.getPipeline().getProtobufMessage())
        .setKeyData(containerKeyData);
    String id = xceiverClient.getPipeline().getLeader().getUuidString();
    ContainerCommandRequestProto request = ContainerCommandRequestProto
        .newBuilder()
        .setCmdType(Type.PutKey)
        .setTraceID(traceID)
        .setDatanodeUuid(id)
        .setPutKey(createKeyRequest)
        .build();
    ContainerCommandResponseProto response = xceiverClient.sendCommand(request);
    validateContainerResponse(response);
  }
public static void putKey ( XceiverClientSpi xceiverClient , KeyData containerKeyData , String traceID ) throws IOException { PutKeyRequestProto . Builder createKeyRequest = PutKeyRequestProto . newBuilder ( ) . setPipeline ( xceiverClient . getPipeline ( ) . getProtobufMessage ( ) ) . setKeyData ( containerKeyData ) ; String id = xceiverClient . getPipeline ( ) . getLeader ( ) . getUuidString ( ) ; ContainerCommandRequestProto request = ContainerCommandRequestProto . newBuilder ( ) . setCmdType ( Type . PutKey ) . setTraceID ( traceID ) . setDatanodeUuid ( id ) . setPutKey ( createKeyRequest ) . build ( ) ; ContainerCommandResponseProto response = xceiverClient . sendCommand ( request ) ; validateContainerResponse ( response ) ; }
Calls the container protocol to put a container key.
Calls the container protocol to put a container key .