38 for (
auto ag_spec : schema->get_access_groups())
46 HT_ERRORF(
"Problem opening Hyperspace root file '%s/root' - %s - "
72 std::vector<String> attrs;
82 std::vector<DynamicBufferPtr> values;
86 *nextcsidp = atoi((
const char *)values.back()->base);
87 files = (
const char *)values.front()->base;
92 HT_ERRORF(
"Problem getting attributes %s/%s on Hyperspace file "
93 "'%s/root' - %s", attrs.front().c_str(), attrs.back().c_str(),
104 std::vector<Attribute> attrs;
106 String blockcount_attrname = (
String)
"blockcount." + ag_name;
107 char blockcount_buf[32];
109 sprintf(blockcount_buf,
"%llu", (
Llu)total_blocks);
111 attrs.push_back(
Attribute(files_attrname.c_str(), files.c_str(), files.length()));
112 attrs.push_back(
Attribute(blockcount_attrname.c_str(), blockcount_buf, strlen(blockcount_buf)));
120 +
"/" + blockcount_attrname +
"' on Hyperspace file '/hypertable/root'");
127 String nextcsid_attrname = (
String)
"nextcsid." + ag_name;
128 String blockcount_attrname = (
String)
"blockcount." + ag_name;
129 char nextcsid_buf[32], blockcount_buf[32];
131 sprintf(nextcsid_buf,
"%u", (
unsigned)nextcsid);
132 sprintf(blockcount_buf,
"%llu", (
Llu)total_blocks);
134 std::vector<Attribute> attrs;
135 attrs.push_back(
Attribute(files_attrname.c_str(), files.c_str(), files.length()));
136 attrs.push_back(
Attribute(nextcsid_attrname.c_str(), nextcsid_buf, strlen(nextcsid_buf)));
137 attrs.push_back(
Attribute(blockcount_attrname.c_str(), blockcount_buf, strlen(blockcount_buf)));
145 +
"/" + nextcsid_attrname +
"/" + blockcount_attrname +
146 "' on Hyperspace file '/hypertable/root'");
std::string String
A String is simply a typedef to std::string.
long long unsigned int Llu
Shortcut for printf formats.
static Hyperspace::SessionPtr hyperspace
static std::string toplevel_dir
const char * get_text(int error)
Returns a descriptive error message.
Compatibility Macros for C/C++.
This is a generic exception class for Hypertable.
Holds extended attribute and value.
#define HT_ERRORF(msg,...)
std::shared_ptr< Schema > SchemaPtr
Smart pointer to Schema.
Error codes, Exception handling, error logging.
int code() const
Returns the error code.
#define HT_THROW2(_code_, _ex_, _msg_)