mirror of
https://github.com/wassname/ray.git
synced 2026-07-23 13:10:11 +08:00
Update arrow to latest master (#2100)
This commit is contained in:
committed by
Robert Nishihara
parent
68b11c8251
commit
225608ec66
@@ -364,12 +364,12 @@ LocalSchedulerState *LocalSchedulerState_init(
|
||||
/* Connect to Plasma. This method will retry if Plasma hasn't started yet. */
|
||||
state->plasma_conn = new plasma::PlasmaClient();
|
||||
if (plasma_manager_socket_name != NULL) {
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(plasma_store_socket_name,
|
||||
plasma_manager_socket_name,
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(
|
||||
plasma_store_socket_name, plasma_manager_socket_name,
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
} else {
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(plasma_store_socket_name, "",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(
|
||||
plasma_store_socket_name, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
}
|
||||
/* Subscribe to notifications about sealed objects. */
|
||||
int plasma_fd;
|
||||
|
||||
@@ -468,8 +468,8 @@ PlasmaManagerState *PlasmaManagerState_init(const char *store_socket_name,
|
||||
PlasmaManagerState *state = new PlasmaManagerState();
|
||||
state->loop = event_loop_create();
|
||||
state->plasma_conn = new plasma::PlasmaClient();
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(store_socket_name, "",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(state->plasma_conn->Connect(
|
||||
store_socket_name, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
if (redis_primary_addr) {
|
||||
/* Get the manager port as a string. */
|
||||
std::string manager_address_str =
|
||||
|
||||
@@ -16,10 +16,10 @@ SUITE(plasma_client_tests);
|
||||
TEST plasma_status_tests(void) {
|
||||
PlasmaClient client1;
|
||||
ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
PlasmaClient client2;
|
||||
ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid1 = ObjectID::from_random();
|
||||
|
||||
/* Test for object non-existence. */
|
||||
@@ -55,10 +55,10 @@ TEST plasma_status_tests(void) {
|
||||
TEST plasma_fetch_tests(void) {
|
||||
PlasmaClient client1;
|
||||
ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
PlasmaClient client2;
|
||||
ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid1 = ObjectID::from_random();
|
||||
|
||||
/* Test for object non-existence. */
|
||||
@@ -130,7 +130,7 @@ bool is_equal_data_123(const uint8_t *data1,
|
||||
TEST plasma_nonblocking_get_tests(void) {
|
||||
PlasmaClient client;
|
||||
ARROW_CHECK_OK(client.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid = ObjectID::from_random();
|
||||
ObjectID oid_array[1] = {oid};
|
||||
ObjectBuffer obj_buffer;
|
||||
@@ -163,10 +163,10 @@ TEST plasma_nonblocking_get_tests(void) {
|
||||
TEST plasma_wait_for_objects_tests(void) {
|
||||
PlasmaClient client1;
|
||||
ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
PlasmaClient client2;
|
||||
ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid1 = ObjectID::from_random();
|
||||
ObjectID oid2 = ObjectID::from_random();
|
||||
#define NUM_OBJ_REQUEST 2
|
||||
@@ -235,9 +235,9 @@ TEST plasma_wait_for_objects_tests(void) {
|
||||
TEST plasma_get_tests(void) {
|
||||
PlasmaClient client1, client2;
|
||||
ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid1 = ObjectID::from_random();
|
||||
ObjectID oid2 = ObjectID::from_random();
|
||||
ObjectBuffer obj_buffer1;
|
||||
@@ -277,9 +277,9 @@ TEST plasma_get_tests(void) {
|
||||
TEST plasma_get_multiple_tests(void) {
|
||||
PlasmaClient client1, client2;
|
||||
ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2",
|
||||
PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
ObjectID oid1 = ObjectID::from_random();
|
||||
ObjectID oid2 = ObjectID::from_random();
|
||||
ObjectID obj_ids[NUM_OBJ_REQUEST];
|
||||
|
||||
@@ -77,9 +77,9 @@ plasma_mock *init_plasma_mock(plasma_mock *remote_mock) {
|
||||
mock->write_conn =
|
||||
get_manager_connection(remote_mock->state, manager_addr, mock->port);
|
||||
wait_for_pollin(mock->manager_remote_fd);
|
||||
mock->read_conn =
|
||||
ClientConnection_listen(mock->loop, mock->manager_remote_fd,
|
||||
mock->state, PLASMA_DEFAULT_RELEASE_DELAY);
|
||||
mock->read_conn = ClientConnection_listen(
|
||||
mock->loop, mock->manager_remote_fd, mock->state,
|
||||
plasma::kPlasmaDefaultReleaseDelay);
|
||||
} else {
|
||||
mock->write_conn = NULL;
|
||||
mock->read_conn = NULL;
|
||||
@@ -269,24 +269,22 @@ TEST object_notifications_test(void) {
|
||||
ASSERT(!is_local);
|
||||
|
||||
/* Check that the object is local after receiving an object notification. */
|
||||
uint8_t *notification = plasma::create_object_info_buffer(&info);
|
||||
int64_t size = *((int64_t *) notification);
|
||||
send(fd[1], notification, sizeof(int64_t) + size, 0);
|
||||
auto notification = plasma::create_object_info_buffer(&info);
|
||||
int64_t size = *((int64_t *) notification.get());
|
||||
send(fd[1], notification.get(), sizeof(int64_t) + size, 0);
|
||||
process_object_notification(local_mock->loop, fd[0], local_mock->state, 0);
|
||||
is_local = is_object_local(local_mock->state, object_id);
|
||||
ASSERT(is_local);
|
||||
delete[] notification;
|
||||
|
||||
/* Check that the object is not local after receiving a notification about
|
||||
* the object deletion. */
|
||||
info.is_deletion = true;
|
||||
notification = plasma::create_object_info_buffer(&info);
|
||||
size = *((int64_t *) notification);
|
||||
send(fd[1], notification, sizeof(int64_t) + size, 0);
|
||||
size = *((int64_t *) notification.get());
|
||||
send(fd[1], notification.get(), sizeof(int64_t) + size, 0);
|
||||
process_object_notification(local_mock->loop, fd[0], local_mock->state, 0);
|
||||
is_local = is_object_local(local_mock->state, object_id);
|
||||
ASSERT(!is_local);
|
||||
delete[] notification;
|
||||
|
||||
/* Clean up. */
|
||||
close(fd[0]);
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace ray {
|
||||
ObjectStoreNotificationManager::ObjectStoreNotificationManager(
|
||||
boost::asio::io_service &io_service, const std::string &store_socket_name)
|
||||
: store_client_(), socket_(io_service) {
|
||||
ARROW_CHECK_OK(
|
||||
store_client_.Connect(store_socket_name.c_str(), "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(store_client_.Connect(store_socket_name.c_str(), "",
|
||||
plasma::kPlasmaDefaultReleaseDelay));
|
||||
|
||||
ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_));
|
||||
boost::system::error_code ec;
|
||||
|
||||
@@ -146,8 +146,8 @@ class TestObjectManagerBase : public ::testing::Test {
|
||||
server2.reset(new MockServer(main_service, om_config_2, gcs_client_2));
|
||||
|
||||
// connect to stores.
|
||||
ARROW_CHECK_OK(client1.Connect(store_id_1, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client2.Connect(store_id_2, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client1.Connect(store_id_1, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
ARROW_CHECK_OK(client2.Connect(store_id_2, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
|
||||
@@ -136,8 +136,8 @@ class TestObjectManager : public ::testing::Test {
|
||||
server2.reset(new MockServer(main_service, om_config_2, gcs_client_2));
|
||||
|
||||
// connect to stores.
|
||||
ARROW_CHECK_OK(client1.Connect(store_id_1, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client2.Connect(store_id_2, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client1.Connect(store_id_1, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
ARROW_CHECK_OK(client2.Connect(store_id_2, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
|
||||
@@ -68,8 +68,8 @@ class TestObjectManagerBase : public ::testing::Test {
|
||||
GetNodeManagerConfig("raylet_2", store_sock_2), om_config_2, gcs_client_2));
|
||||
|
||||
// connect to stores.
|
||||
ARROW_CHECK_OK(client1.Connect(store_sock_1, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client2.Connect(store_sock_2, "", PLASMA_DEFAULT_RELEASE_DELAY));
|
||||
ARROW_CHECK_OK(client1.Connect(store_sock_1, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
ARROW_CHECK_OK(client2.Connect(store_sock_2, "", plasma::kPlasmaDefaultReleaseDelay));
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
|
||||
Vendored
+2
-2
@@ -44,10 +44,10 @@ if [[ ! -d $TP_DIR/../python/ray/pyarrow_files/pyarrow ]]; then
|
||||
|
||||
pushd $TP_DIR/build/arrow
|
||||
git fetch origin master
|
||||
# The PR for this commit is https://github.com/apache/arrow/pull/1939. We
|
||||
# The PR for this commit is https://github.com/apache/arrow/pull/2073. We
|
||||
# include the link here to make it easier to find the right commit because
|
||||
# Arrow often rewrites git history and invalidates certain commits.
|
||||
git checkout 5f9cf9c96709f92e9ac4828cf3e106a165576ce7
|
||||
git checkout 1d9d8939efe54a640b46fcbe8e14e5b347c7a422
|
||||
|
||||
cd cpp
|
||||
if [ ! -d "build" ]; then
|
||||
|
||||
Reference in New Issue
Block a user