Search in sources :

Example 1 with GetBlockKeysResponseProto

use of org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysResponseProto in project hadoop by apache.

the class NamenodeProtocolServerSideTranslatorPB method getBlockKeys.

@Override
public GetBlockKeysResponseProto getBlockKeys(RpcController unused, GetBlockKeysRequestProto request) throws ServiceException {
    ExportedBlockKeys keys;
    try {
        keys = impl.getBlockKeys();
    } catch (IOException e) {
        throw new ServiceException(e);
    }
    GetBlockKeysResponseProto.Builder builder = GetBlockKeysResponseProto.newBuilder();
    if (keys != null) {
        builder.setKeys(PBHelper.convert(keys));
    }
    return builder.build();
}
Also used : ServiceException(com.google.protobuf.ServiceException) GetBlockKeysResponseProto(org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysResponseProto) IOException(java.io.IOException) ExportedBlockKeys(org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 IOException (java.io.IOException)1 GetBlockKeysResponseProto (org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysResponseProto)1 ExportedBlockKeys (org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys)1