]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: port the LoadGen frontend to the new RGWStreamIOEngine infrastructure.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 4 Aug 2016 14:32:16 +0000 (16:32 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 21 Oct 2016 20:57:19 +0000 (22:57 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_loadgen.h
src/rgw/rgw_loadgen_process.cc

index 01b2161606ffbd5eaec467b51c90e708ea05e1ec..134c222357423f10dd1ad648b025f5fe970619df 100644 (file)
@@ -26,10 +26,11 @@ struct RGWLoadGenRequestEnv {
 
 /* XXX does RGWLoadGenIO actually want to perform stream/HTTP I/O,
  * or (e.g) are these NOOPs? */
-class RGWLoadGenIO : public RGWStreamIO
+class RGWLoadGenIO : public RGWStreamIOEngine
 {
   uint64_t left_to_read;
   RGWLoadGenRequestEnv *req;
+  RGWEnv env;
 public:
   void init_env(CephContext *cct);
 
@@ -44,6 +45,10 @@ public:
 
   explicit RGWLoadGenIO(RGWLoadGenRequestEnv *_re) : left_to_read(0), req(_re) {}
   void flush();
+
+  RGWEnv& get_env() override {
+    return env;
+  }
 };
 
 #endif
index 0e4aeb256a392c341d5fd678029dc86d2c818362..8303237d0da19826f839c468ca610eb2b55b7650 100644 (file)
@@ -128,7 +128,8 @@ void RGWLoadGenProcess::handle_request(RGWRequest* r)
   env.set_date(tm);
   env.sign(access_key);
 
-  RGWLoadGenIO client_io(&env);
+  RGWLoadGenIO real_client_io(&env);
+  RGWStreamIOLegacyWrapper client_io(&real_client_io);
 
   int ret = process_request(store, rest, req, &client_io, olog);
   if (ret < 0) {