27 #ifndef Hypertable_Lib_Master_Client_h
28 #define Hypertable_Lib_Master_Client_h
48 #include <condition_variable>
85 const String &toplevel_dir, uint32_t timeout_ms,
97 bool wait_for_connection(
Timer &timer);
104 int32_t range_types,
Timer *timer = 0);
108 bool force,
Timer *timer = 0);
117 uint64_t soft_limit,
bool split,
Timer *timer=0);
142 void set_state(
const std::vector<SystemVariable::Spec> &specs,
151 void replay_status(int64_t op_id,
const String &location,
152 int32_t plan_generation);
154 void replay_complete(int64_t op_id,
const String &location,
155 int32_t plan_generation, int32_t error,
const String message);
157 void phantom_prepare_complete(int64_t op_id,
const String &location,
158 int plan_generation, int32_t error,
const String message);
160 void phantom_commit_complete(int64_t op_id,
const String &location,
161 int plan_generation, int32_t error,
const String message);
163 void system_status(
Status &status,
Timer *timer=0);
207 #endif // Hypertable_Lib_Master_Client_h
Hyperspace::HandleCallbackPtr m_master_file_callback
void drop_namespace(const std::string &name, Namespace *base=NULL, bool if_exists=false)
Removes a namespace.
Hyperspace::SessionPtr m_hyperspace
DispatchHandlerPtr m_dispatcher_handler
A callback object derived from this class gets passed into the constructor of Hyperspace.
Holds Nagios-style program status information.
void alter_table(const String &tablename, const String &schema, bool force, Timer *timer=0)
void hyperspace_reconnected()
uint32_t m_retry_interval
std::string String
A String is simply a typedef to std::string.
ConnectionManagerPtr m_conn_manager
Abstract base class for application dispatch handlers registered with AsyncComm.
Declarations for SystemVariable.
void init(int argc, char *argv[], const Desc *desc=NULL)
Initialize with default policy.
Declarations for TableIdentifier and TableIdentifierManaged.
std::mutex m_hyperspace_mutex
bool send_message(CommBufPtr &cbp, Timer *timer, EventPtr &event, const String &label)
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
void hyperspace_disconnected()
bool m_hyperspace_connected
ClientHyperspaceSessionCallback()
Collecting and (de)serializing system-wide statistics.
Client(const std::string &install_dir, const std::string &config_file, uint32_t default_timeout_ms=0)
Constructs the object using the specified config file.
String m_master_addr_string
void fetch_result(int64_t id, Timer *timer, EventPtr &event, const String &label)
Represents a set of table parts (sub-tables).
bool wait_for_connection(uint32_t max_wait_ms)
void stop(const String &rsname, Timer *timer=0)
void create_table(String &ns, String &tablename, String &rs_metrics_file)
void rename_table(const String &from, const String &to, Timer *timer=0)
void compact(const String &tablename, const String &row, int32_t range_types, Timer *timer=0)
std::shared_ptr< Session > SessionPtr
ApplicationQueueInterfacePtr m_app_queue
bool status(ContextPtr &context, Timer &timer, Status &status)
Runs a status check on the master.
void send_message_async(CommBufPtr &cbp, DispatchHandler *handler, Timer *timer, const String &label)
Encapsulate an internet address.
void set_state(const std::vector< SystemVariable::Spec > &specs, Timer *timer=0)
Set system state variables synchronously.
std::shared_ptr< CommBuf > CommBufPtr
Smart pointer to CommBuf.
A timer class to keep timeout states across AsyncComm related calls.
ConnectionInitializerPtr m_connection_initializer
std::shared_ptr< ApplicationQueueInterface > ApplicationQueueInterfacePtr
Smart pointer to ApplicationQueueInterface.
void drop_table(const String &name, bool if_exists, Timer *timer=0)
void recreate_index_tables(const std::string &name, TableParts parts, Timer *timer=0)
Carries out a recreate index tables Master operation.
void initialize_hyperspace()
Assumes access is serialized via m_hyperspace_mutex.
~ClientHyperspaceSessionCallback()
Declarations for RangeSpec and RangeSpecManaged.
void relinquish_acknowledge(const String &source, int64_t range_id, TableIdentifier &table, RangeSpec &range, Timer *timer=0)
std::shared_ptr< HandleCallback > HandleCallbackPtr
Entry point to AsyncComm service.
void set_verbose_flag(bool verbose)
Declarations for CommBuf.
Declarations for ConnectionManager.
uint64_t m_master_file_handle
std::shared_ptr< Client > ClientPtr
Smart pointer to Client.
std::condition_variable m_cond
void create_namespace(const std::string &name, Namespace *base=NULL, bool create_intermediate=false, bool if_not_exists=false)
Creates a namespace.
bool split(int flags)
Tests the SPLIT bit of flags
void balance(BalancePlan &plan, Timer *timer=0)
A timer class to keep timeout states across AsyncComm related calls.
std::shared_ptr< DispatchHandler > DispatchHandlerPtr
Smart pointer to DispatchHandler.
void move_range(const String &source, int64_t range_id, TableIdentifier &table, RangeSpec &range, const String &transfer_log, uint64_t soft_limit, bool split, Timer *timer=0)
Declarations for ApplicationQueueInterface.
ClientHyperspaceSessionCallback m_hyperspace_session_callback
std::shared_ptr< ConnectionManager > ConnectionManagerPtr
Smart pointer to ConnectionManager.
std::shared_ptr< ConnectionInitializer > ConnectionInitializerPtr
Smart pointer to ConnectionInitializer.
Declarations for TableParts.