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);
}
Aggregations