Remove arrow macros in plasma store (#9115)

This commit is contained in:
Siyuan (Ryans) Zhuang 2020-06-23 23:34:44 -07:00 committed by GitHub
parent 98d68b31c3
commit 613abdf1b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 16 deletions

View file

@ -123,7 +123,7 @@ std::shared_ptr<Buffer> MakeBufferFromGpuProcessHandle(GpuProcessHandle* handle)
/// A Buffer class that automatically releases the backing plasma object
/// when it goes out of scope. This is returned by Get.
class ARROW_NO_EXPORT PlasmaBuffer : public Buffer {
class RAY_NO_EXPORT PlasmaBuffer : public Buffer {
public:
~PlasmaBuffer();
@ -143,7 +143,7 @@ class ARROW_NO_EXPORT PlasmaBuffer : public Buffer {
/// A mutable Buffer class that keeps the backing data alive by keeping a
/// PlasmaClient shared pointer. This is returned by Create. Release will
/// be called in the associated Seal call.
class ARROW_NO_EXPORT PlasmaMutableBuffer : public MutableBuffer {
class RAY_NO_EXPORT PlasmaMutableBuffer : public MutableBuffer {
public:
PlasmaMutableBuffer(std::shared_ptr<PlasmaClient::Impl> client, uint8_t* mutable_data,
int64_t data_size)
@ -352,7 +352,7 @@ class PlasmaClient::Impl : public std::enable_shared_from_this<PlasmaClient::Imp
#endif
};
PlasmaBuffer::~PlasmaBuffer() { ARROW_UNUSED(client_->Release(object_id_)); }
PlasmaBuffer::~PlasmaBuffer() { RAY_UNUSED(client_->Release(object_id_)); }
PlasmaClient::Impl::Impl() : store_conn_(0), store_capacity_(0) {
#ifdef PLASMA_CUDA

View file

@ -24,9 +24,9 @@
#include "arrow/buffer.h"
#include "arrow/status.h"
#include "arrow/util/macros.h"
#include "arrow/util/visibility.h"
#include "ray/object_manager/plasma/common.h"
#include "ray/util/visibility.h"
using arrow::Buffer;
using arrow::Status;
@ -43,7 +43,8 @@ struct ObjectBuffer {
int device_num;
};
class ARROW_EXPORT PlasmaClient {
// TODO(suquark): Maybe we should not export plasma later?
class RAY_EXPORT PlasmaClient {
public:
PlasmaClient();
~PlasmaClient();
@ -287,7 +288,7 @@ class ARROW_EXPORT PlasmaClient {
bool IsInUse(const ObjectID& object_id);
class ARROW_NO_EXPORT Impl;
class RAY_NO_EXPORT Impl;
std::shared_ptr<Impl> impl_;
};

View file

@ -44,15 +44,15 @@ enum class PlasmaErrorCode : int8_t {
PlasmaObjectAlreadySealed = 4,
};
ARROW_EXPORT arrow::Status MakePlasmaError(PlasmaErrorCode code, std::string message);
RAY_EXPORT arrow::Status MakePlasmaError(PlasmaErrorCode code, std::string message);
/// Return true iff the status indicates an already existing Plasma object.
ARROW_EXPORT bool IsPlasmaObjectExists(const arrow::Status& status);
RAY_EXPORT bool IsPlasmaObjectExists(const arrow::Status& status);
/// Return true iff the status indicates a non-existent Plasma object.
ARROW_EXPORT bool IsPlasmaObjectNonexistent(const arrow::Status& status);
RAY_EXPORT bool IsPlasmaObjectNonexistent(const arrow::Status& status);
/// Return true iff the status indicates an already sealed Plasma object.
ARROW_EXPORT bool IsPlasmaObjectAlreadySealed(const arrow::Status& status);
RAY_EXPORT bool IsPlasmaObjectAlreadySealed(const arrow::Status& status);
/// Return true iff the status indicates the Plasma store reached its capacity limit.
ARROW_EXPORT bool IsPlasmaStoreFull(const arrow::Status& status);
RAY_EXPORT bool IsPlasmaStoreFull(const arrow::Status& status);
/// Size of object hash digests.
constexpr int64_t kDigestSize = sizeof(uint64_t);

View file

@ -22,7 +22,6 @@
#include <sstream>
#include "arrow/status.h"
#include "arrow/util/logging.h"
#include "ray/object_manager/plasma/common.h"
#include "ray/object_manager/plasma/plasma_generated.h"

View file

@ -28,8 +28,6 @@
#include <string>
#include <vector>
#include "arrow/util/logging.h"
#include "ray/object_manager/plasma/client.h"
constexpr jsize OBJECT_ID_SIZE = sizeof(plasma::ObjectID) / sizeof(jbyte);

View file

@ -35,7 +35,6 @@
#include "ray/object_manager/plasma/compat.h"
#include "arrow/status.h"
#include "arrow/util/macros.h"
#include "ray/object_manager/plasma/common.h"
#include "ray/util/logging.h"