Search in sources :

Example 1 with CreateEncryptionZoneRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.EncryptionZonesProtos.CreateEncryptionZoneRequestProto in project hadoop by apache.

the class ClientNamenodeProtocolTranslatorPB method createEncryptionZone.

@Override
public void createEncryptionZone(String src, String keyName) throws IOException {
    final CreateEncryptionZoneRequestProto.Builder builder = CreateEncryptionZoneRequestProto.newBuilder();
    builder.setSrc(src);
    if (keyName != null && !keyName.isEmpty()) {
        builder.setKeyName(keyName);
    }
    CreateEncryptionZoneRequestProto req = builder.build();
    try {
        rpcProxy.createEncryptionZone(null, req);
    } catch (ServiceException e) {
        throw ProtobufHelper.getRemoteException(e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) CreateEncryptionZoneRequestProto(org.apache.hadoop.hdfs.protocol.proto.EncryptionZonesProtos.CreateEncryptionZoneRequestProto)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 CreateEncryptionZoneRequestProto (org.apache.hadoop.hdfs.protocol.proto.EncryptionZonesProtos.CreateEncryptionZoneRequestProto)1