X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_sync_module_log.cc;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_sync_module_log.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=93a853f56000c3f21c28def7454b791bd9000ba7;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_sync_module_log.cc b/src/ceph/src/rgw/rgw_sync_module_log.cc deleted file mode 100644 index 93a853f..0000000 --- a/src/ceph/src/rgw/rgw_sync_module_log.cc +++ /dev/null @@ -1,75 +0,0 @@ -#include "rgw_common.h" -#include "rgw_coroutine.h" -#include "rgw_cr_rados.h" -#include "rgw_sync_module.h" -#include "rgw_data_sync.h" -#include "rgw_sync_module_log.h" - -#define dout_subsys ceph_subsys_rgw - -class RGWLogStatRemoteObjCBCR : public RGWStatRemoteObjCBCR { -public: - RGWLogStatRemoteObjCBCR(RGWDataSyncEnv *_sync_env, - RGWBucketInfo& _bucket_info, rgw_obj_key& _key) : RGWStatRemoteObjCBCR(_sync_env, _bucket_info, _key) {} - int operate() override { - ldout(sync_env->cct, 0) << "SYNC_LOG: stat of remote obj: z=" << sync_env->source_zone - << " b=" << bucket_info.bucket << " k=" << key << " size=" << size << " mtime=" << mtime - << " attrs=" << attrs << dendl; - return set_cr_done(); - } - -}; - -class RGWLogStatRemoteObjCR : public RGWCallStatRemoteObjCR { -public: - RGWLogStatRemoteObjCR(RGWDataSyncEnv *_sync_env, - RGWBucketInfo& _bucket_info, rgw_obj_key& _key) : RGWCallStatRemoteObjCR(_sync_env, _bucket_info, _key) { - } - - ~RGWLogStatRemoteObjCR() override {} - - RGWStatRemoteObjCBCR *allocate_callback() override { - return new RGWLogStatRemoteObjCBCR(sync_env, bucket_info, key); - } -}; - -class RGWLogDataSyncModule : public RGWDataSyncModule { - string prefix; -public: - RGWLogDataSyncModule(const string& _prefix) : prefix(_prefix) {} - - RGWCoroutine *sync_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, uint64_t versioned_epoch, rgw_zone_set *zones_trace) override { - ldout(sync_env->cct, 0) << prefix << ": SYNC_LOG: sync_object: b=" << bucket_info.bucket << " k=" << key << " versioned_epoch=" << versioned_epoch << dendl; - return new RGWLogStatRemoteObjCR(sync_env, bucket_info, key); - } - RGWCoroutine *remove_object(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, real_time& mtime, bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace) override { - ldout(sync_env->cct, 0) << prefix << ": SYNC_LOG: rm_object: b=" << bucket_info.bucket << " k=" << key << " mtime=" << mtime << " versioned=" << versioned << " versioned_epoch=" << versioned_epoch << dendl; - return NULL; - } - RGWCoroutine *create_delete_marker(RGWDataSyncEnv *sync_env, RGWBucketInfo& bucket_info, rgw_obj_key& key, real_time& mtime, - rgw_bucket_entry_owner& owner, bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace) override { - ldout(sync_env->cct, 0) << prefix << ": SYNC_LOG: create_delete_marker: b=" << bucket_info.bucket << " k=" << key << " mtime=" << mtime - << " versioned=" << versioned << " versioned_epoch=" << versioned_epoch << dendl; - return NULL; - } -}; - -class RGWLogSyncModuleInstance : public RGWSyncModuleInstance { - RGWLogDataSyncModule data_handler; -public: - RGWLogSyncModuleInstance(const string& prefix) : data_handler(prefix) {} - RGWDataSyncModule *get_data_handler() override { - return &data_handler; - } -}; - -int RGWLogSyncModule::create_instance(CephContext *cct, map& config, RGWSyncModuleInstanceRef *instance) { - string prefix; - auto i = config.find("prefix"); - if (i != config.end()) { - prefix = i->second; - } - instance->reset(new RGWLogSyncModuleInstance(prefix)); - return 0; -} -