@Override public void write(@Nonnull Block block, @Nonnull ProvidedStorageLocation providedStorageLocation) throws IOException { if (block == null || providedStorageLocation == null) { throw new IOException("Provided block and location cannot be null"); } WriteRequestProto request = WriteRequestProto .newBuilder() .setKeyValuePair(KeyValueProto.newBuilder() .setKey(PBHelperClient.convert(block)) .setValue(PBHelperClient.convert(providedStorageLocation)) .build()) .build(); try { rpcProxy.write(null, request); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }