47 static void init_options() {
49 (
"dryrun,n",
"Dryrun, don't modify (delete files etc.)")
50 (
"full",
"Do a full scan of DFS files and compare with METADATA.")
65 init_with_policy<AppPolicy>(ac, av);
68 context->conn_manager = make_shared<ConnectionManager>(context->comm);
70 context->toplevel_dir =
properties->get_str(
"Hypertable.Directory");
71 boost::trim_if(context->toplevel_dir, boost::is_any_of(
"/"));
72 context->toplevel_dir =
String(
"/") + context->toplevel_dir;
73 context->dfs = std::make_shared<FsBroker::Lib::Client>(context->conn_manager, context->props);
75 ClientPtr client = make_shared<Hypertable::Client>(
"htgc");
76 ns = client->open_namespace(
"sys");
77 context->metadata_table = ns->open_table(
"METADATA");
86 quick_exit(EXIT_FAILURE);
88 quick_exit(EXIT_SUCCESS);
static Comm * instance()
Creates/returns singleton instance of the Comm class.
Retrieves system information (hardware, installation directory, etc)
Interface and base of config policy.
PropertiesPtr properties
This singleton map stores all options.
std::string String
A String is simply a typedef to std::string.
Desc & cmdline_desc(const char *usage)
A macro which definds global functions like get_bool(), get_str(), get_i16() etc. ...
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
std::shared_ptr< Namespace > NamespacePtr
Shared smart pointer to Namespace.
std::shared_ptr< Client > ClientPtr
Helpers to compose init policies; allow to combine two policies into one.
Logging routines and macros.
Compatibility Macros for C/C++.
Initialization helper for applications.
Importing boost::thread and boost::thread_group into the Hypertable namespace.
int main(int ac, char *av[])
This is a generic exception class for Hypertable.
Error codes, Exception handling, error logging.