Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
mobject-store
Commits
407271a7
Commit
407271a7
authored
Mar 05, 2018
by
Matthieu Dorier
Browse files
done testing distributed mobject
parent
d2b92151
Changes
3
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
407271a7
...
...
@@ -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],
[],
...
...
src/client/cluster.c
View file @
407271a7
...
...
@@ -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
;
...
...
tests/mobject-client-test.c
View file @
407271a7
...
...
@@ -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
,
object
s
[
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
,
object
s
[
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment