From a20856fe2f3bd3fb88679e58a4bd7ca0a46281ab Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Sun, 27 Jan 2013 20:37:50 -0500 Subject: [PATCH 1/3] initial pass at some POD documentation for supported query commands --- lib/MogileFS/Worker/Query.pm | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/lib/MogileFS/Worker/Query.pm b/lib/MogileFS/Worker/Query.pm index 4593139d..a22f1c59 100644 --- a/lib/MogileFS/Worker/Query.pm +++ b/lib/MogileFS/Worker/Query.pm @@ -1828,6 +1828,66 @@ __END__ MogileFS::Worker::Query -- implements the MogileFS client protocol +=head1 SUPPORTED COMMANDS + +This is a list of supported commands that can be sent to the tracker. + +=head2 create_open + +This command is used to create a new file in MogileFS with the specified domain and key. + +=head3 Parameters + +=over + +=item B = I + +The id of domain the new file is being stored in + +=item B = I + +The key for the new file + +=item B = I + +The class to use for the new file + +=item B = I + +a boolean indicating that multiple target mogstored devices should be returned + +=item B = I + +This is the estimated number of bytes for the new file, it is used to ensure returned devices have enough free space. + +=back + +=head3 Response + +=over + +=item B = I + +The id of the new file. + +=item B = I + +The id of the device this file will be stored on. (Only returned when B is false) + +=item B = I + +The url of the mogstored devices to store the file on. (Only returned when B is false) + +=item B = I + +=item B = I + +=item B = I + +When B is true, B indicates the number of potential mogstored devices that are being returned, with a B and B for each potential device, # is a value between 1 and B, inclusive. + +=back + =head1 SEE ALSO L From 1cf248aa3a9d54aac230b834edcf6c8fa5f30e21 Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Mon, 28 Jan 2013 18:30:40 -0500 Subject: [PATCH 2/3] mark attributes as required --- lib/MogileFS/Worker/Query.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MogileFS/Worker/Query.pm b/lib/MogileFS/Worker/Query.pm index a22f1c59..dd9d70be 100644 --- a/lib/MogileFS/Worker/Query.pm +++ b/lib/MogileFS/Worker/Query.pm @@ -1842,11 +1842,11 @@ This command is used to create a new file in MogileFS with the specified domain =item B = I -The id of domain the new file is being stored in +B<(required)> The id of domain the new file is being stored in =item B = I -The key for the new file +B<(required)> The key for the new file =item B = I From d89b7a9321a297b20e7ab75e3816f61feecb33e8 Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Mon, 1 Apr 2013 00:28:16 -0400 Subject: [PATCH 3/3] create_open takes a domain string and converts it to a dmid internally --- lib/MogileFS/Worker/Query.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MogileFS/Worker/Query.pm b/lib/MogileFS/Worker/Query.pm index dd9d70be..14720baa 100644 --- a/lib/MogileFS/Worker/Query.pm +++ b/lib/MogileFS/Worker/Query.pm @@ -1840,9 +1840,9 @@ This command is used to create a new file in MogileFS with the specified domain =over -=item B = I +=item B = I -B<(required)> The id of domain the new file is being stored in +B<(required)> The name of domain the new file is being stored in =item B = I