Kaperstone / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

Function to return the keys with thier sizes #55

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In my application I need to report the size of the file with the listing. This 
means making one call to get the keys and another call for each key to get it's 
size, for my use case this is slow.
The attached patch add a new function that allows for fetching the keys and 
their sizes all in one call.

Original issue reported on code.google.com by ksa...@gmail.com on 16 Jan 2012 at 6:11

Attachments:

GoogleCodeExporter commented 8 years ago
I feel like this would be better served as an option to cmd_list_keys. Less 
copy/pasted code?

Have a similar issue with cmd_get_paths, where you might want more or less 
metadata returned but presently have to fetch all metadata with a separate 
"file_info" request.

Perhaps a "metadata" argument with a comma separated list of other columns to 
add. Requires a careful check to ensure it doesn't ask for any invalid columns!

thoughts?

Original comment by dorma...@rydia.net on 23 Feb 2012 at 8:40

GoogleCodeExporter commented 8 years ago
I agree, here is a patch built off 2.64 that would do that.

Original comment by ksa...@gmail.com on 27 Nov 2013 at 9:54

Attachments: