@Override public GetPreferredBlockSizeResponseProto getPreferredBlockSize( RpcController controller, GetPreferredBlockSizeRequestProto req) throws ServiceException { try { long result = server.getPreferredBlockSize(req.getFilename()); return GetPreferredBlockSizeResponseProto.newBuilder().setBsize(result) .build(); } catch (IOException e) { throw new ServiceException(e); } }