GitLab maintenance scheduled for Today, 2019-12-05, from 17:00 to 18:00 CT - Services will be unavailable during this time.

Commit 407271a7 authored by Matthieu Dorier's avatar Matthieu Dorier

done testing distributed mobject

parent d2b92151
......@@ -106,6 +106,11 @@ SERVER_LIBS="$BAKECLIENT_LIBS $SERVER_LIBS"
SERVER_CPPFLAGS="$BAKECLIENT_CFLAGS $SERVER_CPPFLAGS"
SERVER_CFLAGS="$BAKECLIENT_CFLAGS $SERVER_CFLAGS"
PKG_CHECK_MODULES([CHPLACEMENT], [ch-placement], [],
AC_MSG_ERROR([Could not find ch-placement]) )
CLIENT_CFLAGS="$CHPLACEMENT_CFLAGS $CLIENT_CFLAGS"
CLIENT_LIBS="$CHPLACEMENT_LIBS $CLIENT_LIBS"
# check that SSG was compiled with MPI support
AC_CHECK_LIB([ssg], [ssg_group_create_mpi],
[],
......
......@@ -340,6 +340,8 @@ int mobject_store_write_op_operate(mobject_store_write_op_t write_op,
// XXX multiple providers may be in the same node (with distinct mplex ids)
hg_addr_t svr_addr = ssg_get_addr(io->cluster->gid, server_idx);
fprintf(stderr,"Object oid=%s will go to server %ld\n", oid, server_idx);
// TODO for now multiplex id is hard-coded as 1
int r = mobject_provider_handle_create(io->cluster->mobject_clt, svr_addr, 1, &mph);
if(r != 0) return r;
......@@ -416,6 +418,7 @@ int mobject_store_read_op_operate(mobject_store_read_op_t read_op,
ch_placement_find_closest(ioctx->cluster->ch_instance, oid_hash, 1, &server_idx);
// XXX multiple providers may be in the same node (with distinct mplex ids)
hg_addr_t svr_addr = ssg_get_addr(ioctx->cluster->gid, server_idx);
fprintf(stderr,"Object oid=%s is read from server %ld\n", oid, server_idx);
// TODO for now multiplex id is hard-coded as 1
int r = mobject_provider_handle_create(ioctx->cluster->mobject_clt, svr_addr, 1, &mph);
if(r != 0) return r;
......
......@@ -14,6 +14,11 @@ int main(int argc, char** argv)
mobject_store_ioctx_t ioctx;
mobject_store_ioctx_create(cluster, "my-object-pool", &ioctx);
char* objects[] = { "object1_abcd", "object2_efgh", "object3_ijkl" };
int i;
for(i=0; i<3; i++) {
fprintf(stderr, "********** WRITE PHASE **********\n");
{ // WRITE OP TEST
......@@ -54,7 +59,7 @@ int main(int argc, char** argv)
// Add a omap_rm_keys" operation
// mobject_store_write_op_omap_rm_keys(write_op, keys, 5);
mobject_store_write_op_operate(write_op, ioctx, "test-object", NULL, LIBMOBJECT_OPERATION_NOFLAG);
mobject_store_write_op_operate(write_op, ioctx, objects[i], NULL, LIBMOBJECT_OPERATION_NOFLAG);
mobject_store_release_write_op(write_op);
......@@ -94,7 +99,7 @@ int main(int argc, char** argv)
int prval5;
mobject_store_read_op_omap_get_vals_by_keys(read_op, keys, 2, &iter5, &prval5);
mobject_store_read_op_operate(read_op, ioctx, "test-object",LIBMOBJECT_OPERATION_NOFLAG);
mobject_store_read_op_operate(read_op, ioctx, objects[i],LIBMOBJECT_OPERATION_NOFLAG);
mobject_store_release_read_op(read_op);
......@@ -140,6 +145,8 @@ int main(int argc, char** argv)
} while(key);
}
}
}
mobject_store_ioctx_destroy(ioctx);
mobject_store_shutdown(cluster);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment