RE: Document about ceph object class APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Sage.

Yes, I am looking at the example code. " cls_register_cxx_method" seems pretty clear. Especially, there is a good blog (http://ceph.com/rados/dynamic-object-interfaces-with-lua/) which explains it well.

I am interested in function "cls_register_cxx_filter". What is exactly the function, and what is a PGLS filter? I will look into more code, but I will appreciate if you can give it an introduction.

Actually, I am looking for something like this: (data comes from CephFS), before OSD writes file data to underlying storage, my filter code get a chance to modify the data content, and then write to the current object in current pool, or write to another object in another pool.
I guess this somehow can be achieved using  "cls_register_cxx_method" related methods, but I don't want to change anything on client side (because it's difficult to modify/incorporate/distribute modify code to all clients).

Is "cls_register_cxx_filter" what I am looking for?


Thanks
Mike


-----Original Message-----
From: Sage Weil [mailto:sage@xxxxxxxxxxxx] 
Sent: Thursday, March 2, 2017 11:28 PM
To: Wang, Zhiye <Zhiye.Wang@xxxxxxxxxxxx>
Cc: ceph-devel@xxxxxxxxxxxxxxx
Subject: Re: Document about ceph object class APIs

On Thu, 2 Mar 2017, Wang, Zhiye wrote:
> Dear all,
> 
> Where can I find document about how to extend ceph?
> 
> The only doc I can see is here:
> http://docs.ceph.com/docs/master/architecture/#extending-ceph
> 
> And some examples in https://github.com/ceph/ceph/tree/master/src/cls
>
> Where can I get document for those APIs? And are those APIs kept 
> stable from release to release?

The example classes are the best documentation currently.  The APIs are quite stable, although in principle they could change.  The class plugins need to be compiled against a specific build of ceph anyway, so you would discover any future change at build time.  The storage calls (reads and
writes) roughly correspond to the RADOS operations defined in include/rados.h (they map to the operations interpreted by do_osd_ops() in PrimaryLogPG.cc), and those rados operations maintain compatibility across many Ceph releases as they are normally originating from clients connecting to the system that could be running other versions.

Hope that helps!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux