January 2019
Intermediate to advanced
606 pages
15h 1m
English
The following code sample is a RADOS class which when executed reads the object, calculates the MD5 hash, and then writes it as an attribute to the object without any client involvement. Each time this class is called, it repeats this operation a 1000 times locally to OSD and only notifies the client at the end of this processing. We have the following steps to perform:
mkdir ~/ceph/src/cls/md5
~/ceph/src/cls/md5/cls_md5.cc
#include "objclass/objclass.h" #include <openssl/md5.h> CLS_VER(1,0) CLS_NAME(md5) cls_handle_t h_class; cls_method_handle_t h_calc_md5; static int calc_md5(cls_method_context_t hctx, bufferlist ...
Read now
Unlock full access