Search in sources :

Example 1 with SetS3SecretResponse

use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetS3SecretResponse in project ozone by apache.

the class OzoneManagerProtocolClientSideTranslatorPB method setS3Secret.

@Override
public S3SecretValue setS3Secret(String accessId, String secretKey) throws IOException {
    final SetS3SecretRequest request = SetS3SecretRequest.newBuilder().setAccessId(accessId).setSecretKey(secretKey).build();
    OMRequest omRequest = createOMRequest(Type.SetS3Secret).setSetS3SecretRequest(request).build();
    final SetS3SecretResponse resp = handleError(submitRequest(omRequest)).getSetS3SecretResponse();
    final S3Secret accessIdSecretKeyPair = S3Secret.newBuilder().setKerberosID(resp.getAccessId()).setAwsSecret(resp.getSecretKey()).build();
    return S3SecretValue.fromProtobuf(accessIdSecretKeyPair);
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) SetS3SecretResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetS3SecretResponse) SetS3SecretRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetS3SecretRequest) S3Secret(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3Secret)

Aggregations

OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1 S3Secret (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.S3Secret)1 SetS3SecretRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetS3SecretRequest)1 SetS3SecretResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetS3SecretResponse)1