#include "osd/ECUtil.h"
+using namespace std::chrono_literals;
using namespace librados;
using ceph::util::generate_random_number;
+using std::cerr;
+using std::cout;
+using std::dec;
+using std::hex;
+using std::less;
+using std::list;
+using std::map;
+using std::multiset;
+using std::ofstream;
+using std::ostream;
+using std::pair;
+using std::set;
+using std::string;
+using std::unique_ptr;
+using std::vector;
// two steps seem to be necessary to do this right
#define STR(x) _STR(x)
" append <obj-name> <infile> append object\n"
" truncate <obj-name> length truncate object\n"
" create <obj-name> create object\n"
-" rm <obj-name> ...[--force-full] [force no matter full or not]remove object(s)\n"
+" rm <obj-name> ... [--force-full] remove object(s), --force-full forces remove when cluster is full\n"
" cp <obj-name> [target-obj] copy object\n"
-" listxattr <obj-name>\n"
-" getxattr <obj-name> attr\n"
+" listxattr <obj-name> list attrs of this object\n"
+" getxattr <obj-name> <attr> get the <attr> attribute of this object\n"
" setxattr <obj-name> attr val\n"
" rmxattr <obj-name> attr\n"
" stat <obj-name> stat the named object\n"
" getomapval <obj-name> <key> [file] show the value for the specified key\n"
" in the object's object map\n"
" setomapval <obj-name> <key> <val | --input-file file>\n"
-" rmomapkey <obj-name> <key>\n"
+" rmomapkey <obj-name> <key> Remove key from the object map of <obj-name>\n"
" clearomap <obj-name> [obj-name2 obj-name3...] clear all the omap keys for the specified objects\n"
-" getomapheader <obj-name> [file]\n"
-" setomapheader <obj-name> <val>\n"
+" getomapheader <obj-name> [file] Dump the hexadecimal value of the object map header of <obj-name>\n"
+" setomapheader <obj-name> <val> Set the value of the object map header of <obj-name>\n"
" watch <obj-name> add watcher on this object\n"
" notify <obj-name> <message> notify watcher of this object with message\n"
" listwatchers <obj-name> list the watchers of this object\n"
++total_sec;
std::streamsize original_precision = cout.precision();
cout.precision(3);
- cout << setw(5) << total_sec << ": throughput=" << rate << "MB/sec" << " pending data=" << sent - completed << std::endl;
+ cout << std::setw(5) << total_sec << ": throughput=" << rate << "MB/sec" << " pending data=" << sent - completed << std::endl;
cout.precision(original_precision);
stamp_time = now;
}
usage_exit();
if (cmd.compare("break") == 0) {
- string locker(nargs[4]);
+ const char* locker = nargs[4];
rados::cls::lock::Lock l(lock_name);
l.set_cookie(lock_cookie);
l.set_tag(lock_tag);
int main(int argc, const char **argv)
{
- vector<const char*> args;
- argv_to_vec(argc, argv, args);
+ auto args = argv_to_vec(argc, argv);
if (args.empty()) {
cerr << argv[0] << ": -h or --help for usage" << std::endl;
exit(1);