60 HT_INFOF(
"Entering Initialize-%lld state=%s",
99 m_context->mml_writer->record_state(shared_from_this());
116 m_context->mml_writer->record_state(shared_from_this());
139 m_context->mml_writer->record_state(shared_from_this());
159 m_context->mml_writer->record_state(shared_from_this());
167 m_context->hyperspace->attr_set(tablefile,
"x",
"", 0);
174 m_context->mml_writer->record_state(shared_from_this());
204 HT_FATALF(
"Unrecognized state %d", state);
270 return "OperationInitialize";
274 return String(
"Initialize");
Retrieves system information (hardware, installation directory, etc)
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
bool next_available_server(ContextPtr &context, String &location, bool urgent)
Gets name of next available server.
uint8_t encoding_version_state() const override
Returns version of encoding format of state.
The FailureInducer simulates errors.
ContextPtr m_context
Pointer to Master context.
void encode_state(uint8_t **bufp) const override
Encode operation state.
void decode_state(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Decode operation state.
std::string String
A String is simply a typedef to std::string.
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
bool validate_subops()
Handles the results of sub operations.
virtual size_t encoded_length() const
Returns serialized object length.
static const char * METADATA_NAME
virtual void decode_result(const uint8_t **bufp, size_t *remainp)
Decode operation result.
Declarations for OperationCreateTable.
String m_metadata_secondlevel_location
void create_table_load_range(ContextPtr &context, const String &location, TableIdentifier &table, RangeSpec &range, bool needs_compaction)
Loads a table's initial range.
void create_table_acknowledge_range(ContextPtr &context, const String &location, TableIdentifier &table, RangeSpec &range)
Calls RangeServer::acknowledge_load for a range.
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
#define HT_ON_SCOPE_EXIT(...)
const char * get_text(int32_t state)
Represents a set of table parts (sub-tables).
OperationInitialize(ContextPtr &context)
const String label() override
Human readable label for operation.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
String m_metadata_root_location
void execute() override
Executes (carries out) the operation.
virtual void encode(uint8_t **bufp) const
Writes serialized representation of object to a buffer.
void set_state(int32_t state)
void close_handle_ptr(SessionPtr hyperspace, uint64_t *handlep)
Compatibility Macros for C/C++.
String m_metadata_range_name
void stage_subop(std::shared_ptr< Operation > operation)
Stages a sub operation for execution.
void set_remove_approval_mask(uint16_t mask)
Sets the remove approvals bit mask.
Functions to serialize/deserialize primitives to/from a memory buffer.
void record_state()
Records operation state to the MML.
const String name() override
Name of operation used for exclusivity.
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
void encode_vstr(uint8_t **bufp, const void *buf, size_t len)
Encode a buffer as variable length string (vint64, data, null)
#define HT_FATALF(msg,...)
long long int Lld
Shortcut for printf formats.
DependencySet m_obstructions
Set of obstructions.
Declarations for general-purpose utility functions.
void legacy_decode(const uint8_t **bufp, size_t *remainp, BalancePlan *plan)
size_t encoded_length_state() const override
Encoded length of operation state.
void create_table_in_hyperspace(ContextPtr &context, const String &name, const String &schema_str, TableIdentifierManaged *table)
Creates a table in Hyperspace.
DependencySet m_dependencies
Set of dependencies.
#define HT_INFOF(msg,...)
void create_table_write_metadata(ContextPtr &context, TableIdentifier *table)
Creates initial METADATA table entry for table.
Abstract base class for master operations.
void decode_result(const uint8_t **bufp, size_t *remainp) override
Decode operation result.
static String install_dir
The installation directory.
This is a generic exception class for Hypertable.
void decode_state_old(uint8_t version, const uint8_t **bufp, size_t *remainp) override
static const char * END_ROOT_ROW
void display_state(std::ostream &os) override
Write human readable operation state to output stream.
Create file if it does not exist.
TableIdentifierManaged m_table
#define HT_MAYBE_FAIL(_label_)
void complete_ok(std::vector< MetaLog::EntityPtr > &additional)
Error codes, Exception handling, error logging.
static const char * END_ROW_MARKER
static String file_to_string(const String &fname)
Reads a full file into a String.
Executes user-defined functions when leaving the current scope.