Skip to content

Commit

Permalink
Update arrow to latest master (#2100)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmoritz authored and robertnishihara committed May 24, 2018
1 parent 68b11c8 commit 225608e
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 38 deletions.
10 changes: 5 additions & 5 deletions src/local_scheduler/local_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/plasma/plasma_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
22 changes: 11 additions & 11 deletions src/plasma/test/client_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down
18 changes: 8 additions & 10 deletions src/plasma/test/manager_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions src/ray/object_manager/object_store_notification_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/ray/object_manager/test/object_manager_stress_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/ray/object_manager/test/object_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/ray/raylet/object_manager_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions thirdparty/scripts/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 225608e

Please sign in to comment.