If you look at the rados api (e.g
http://docs.ceph.com/docs/master/rados/api/python/), there is no
explicit call for the object id - the closest is the 'key', which is
actually the object's name.
If you are using the python bindings you can see this by calling dir()
on a rados object and looking at the exposed methods and attributes.
Python adds an internal __hash__() method which I guess you could use,
but the intent is clearly to use the 'key' attribute.
regards
Mark
On 05/10/15 03:49, niejunwei@xxxxxxxxxxx wrote:
HI, Wheat
Thanks for your reply!
I do not have any special purposes for getting the object id. Each
object comprises metadata、data and object id. I think for the
"object1", the object id is also same with the metadata, all i want is
to get it. By the way, i think the "object1" is just an object name not
object id.
If i try to use rbd command instead of rados command to put something in
ceph, then we can get object id easily. But why can't we get the
meatdata or object id through rados command?
All i want is to study object storage more deeply.
Thanks a million!
Best Wishes
Conan
*From:* Haomai Wang <mailto:haomaiwang@xxxxxxxxx>
*Date:* 2015-10-04 22:21
*To:* niejunwei <mailto:niejunwei@xxxxxxxxxxx>
*CC:* ceph-users <mailto:ceph-users@xxxxxxxxxxxxxx>
*Subject:* Re: A tiny quesion about the object id
On Sun, Oct 4, 2015 at 6:06 PM, niejunwei <niejunwei@xxxxxxxxxxx> wrote:
> HI, All:
>
> I am new and this is my first time to write an email here, i am very
> appreciate that i can get your help.
>
> I create 3 virtual machines on my personal computer and build a
simple test
> ceph storage platform based on these 3 VMs. The host names are
ceph-14(the
> leader node)、ceph-15 and ceph-16. Each host with 2 data
disks(osds) and each
> data disk with 20 GB. The status of ceph is HEALTH_OK, everything
works
> well.
>
> Then i create a test file with name of helloceph, the content is
"Hello
> Ceph, You are Awesome like NJW". I put this file in the data pool
through
> the command of "rados -p data put object1 helloceph", you can
check my steps
> as below:
>
>
> [root@ceph-14 ~]# rados -p data put object1 helloceph
> [root@ceph-14 ~]#
> [root@ceph-14 ~]# rados -p data ls
> object1
> [root@ceph-14 ~]#
> [root@ceph-14 ~]# cd /var/lib/ceph/osd/ceph-1/current/0.3c_head/
> [root@ceph-14 0.3c_head]# ls
> object1__head_BAC5DEBC__0
> [root@ceph-14 0.3c_head]# cat object1__head_BAC5DEBC__0
> Hello Ceph, You are Awesome like NJW
> [root@ceph-14 0.3c_head]#
>
> I am very confused that how can i get the object id of object1 above?
>
> There are 3 parts of an object: metadata、data and object id. I
think i can
> get data part of object1 from above outputs, but how can i get
object id of
> object1?
What's your purpose of object id. It's just object1 I think. You can
via "rados -h" find the related ops get retrieval data, xattr and
omaps
>
> I searched so much and so long on google, but never get what i
want. So i am
> very appreciate that you can give me a guide here!!!
>
>
> Best Wishes
>
> Conan
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
--
Best Regards,
Wheat
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com