28 #ifndef Hypertable_Master_Context_h
29 #define Hypertable_Master_Context_h
56 #include <boost/multi_index_container.hpp>
57 #include <boost/multi_index/hashed_index.hpp>
58 #include <boost/multi_index/mem_fun.hpp>
59 #include <boost/multi_index/sequenced_index.hpp>
60 #include <boost/multi_index/member.hpp>
61 #include <boost/thread/condition.hpp>
63 #include <condition_variable>
67 #include <unordered_map>
85 class Context :
public std::enable_shared_from_this<Context> {
104 typedef std::map<int64_t, RecoveryStepFuturePtr>
FutureMap;
174 std::unique_ptr<OperationProcessor>
op;
271 #endif // Hypertable_Master_Context_h
std::set< String > StringSet
STL Set managing Strings.
String cluster_name
Name of cluster.
StringSet available_servers
ApplicationQueuePtr app_queue
Context(PropertiesPtr &p)
std::shared_ptr< MetricsHandler > MetricsHandlerPtr
Smart pointer to MetricsHandler.
void install_prepare_future(int64_t id, RecoveryStepFuturePtr &future)
bool add_move_operation(std::shared_ptr< Operation > operation)
Adds operation to active move range operation map.
Abstract base class for a filesystem.
TablePtr rs_metrics_table
std::string String
A String is simply a typedef to std::string.
std::shared_ptr< Entity > EntityPtr
Smart pointer to Entity.
RecoveryStepFuturePtr get_commit_future(int64_t id)
std::mutex m_outstanding_move_ops_mutex
Mutex for serializing access to m_outstanding_move_ops
void status(ResponseCallbackStatus *cb)
std::shared_ptr< RangeLocator > RangeLocatorPtr
Smart pointer to RangeLocator.
Declarations for RecoveredServers.
ConnectionManagerPtr conn_manager
Program options handling.
int32_t max_allowable_skew
void remove_move_operation(std::shared_ptr< Operation > operation)
Removes operation from active move range operation map.
bool set_startup_status(bool status)
Set startup flag to false.
TablePtr new_table(const std::string &name)
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
SystemStatePtr system_state
System state entity.
std::shared_ptr< SystemState > SystemStatePtr
Shared smart pointer to SystemState.
std::unique_ptr< ResponseManager > response_manager
RecoveryState m_recovery_state
Holds references to operations that are to be manually removed.
std::unique_ptr< Thread > response_manager_thread
void start_shutdown()
Start shutdown sequence.
void erase_prepare_future(int64_t id)
bool can_accept_ranges(const RangeServerStatistics &stats)
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
int32_t disk_threshold
Disk use threshold percentage.
RecoveryState & recovery_state()
PropertiesPtr props
Configuration properties.
Declarations for SystemState.
uint32_t monitoring_interval
std::shared_ptr< RecoveryStepFuture > RecoveryStepFuturePtr
std::shared_ptr< Monitoring > MonitoringPtr
RangeLocatorPtr range_locator
void erase_replay_future(int64_t id)
std::shared_ptr< Session > SessionPtr
std::unique_ptr< OperationProcessor > op
Hyperspace::SessionPtr hyperspace
void prepare_complete(EventPtr &event)
MetaLog::DefinitionPtr mml_definition
std::shared_ptr< Properties > PropertiesPtr
std::shared_ptr< RecoveredServers > RecoveredServersPtr
Smart pointer to RecoveredServers.
void remove_available_server(const String &location)
RecoveredServersPtr recovered_servers
void replay_status(EventPtr &event)
Declarations for HyperspaceMasterFile.
Importing boost::thread and boost::thread_group into the Hypertable namespace.
void install_replay_future(int64_t id, RecoveryStepFuturePtr &future)
std::unique_ptr< HyperspaceMasterFile > master_file
Hyperspace master file handle
Manages the sending of operation results back to clients.
bool shutdown_in_progress()
Gets flag indicating if server is shutting down.
Context(PropertiesPtr &p, Hyperspace::SessionPtr hs)
Context.
RecoveryStepFuturePtr get_prepare_future(int64_t id)
std::shared_ptr< OperationTimedBarrier > recovery_barrier_op
std::unordered_map< int64_t, int64_t > m_outstanding_move_ops
Map of outstanding move range operations.
Central authority for balance plans.
MetaLog::WriterPtr mml_writer
Entry point to AsyncComm service.
std::shared_ptr< Writer > WriterPtr
Smart pointer to Writer.
Declarations for ConnectionManager.
std::shared_ptr< Filesystem > FilesystemPtr
Smart pointer to Filesystem.
void set_balance_plan_authority(MetaLog::EntityPtr bpa)
Sets the BalancePlanAuthority.
void install_commit_future(int64_t id, RecoveryStepFuturePtr &future)
Abstract base class for master operations.
std::shared_ptr< RangeServerConnectionManager > RangeServerConnectionManagerPtr
Execution context for the Master.
Runs a set of operaions with dependency relationships.
MetaLog::EntityPtr m_balance_plan_authority
BalancePlanAuthority entity.
bool m_startup
Flag indicating that server is starting up.
bool startup_in_progress()
Gets flag indicating if server is starting up.
std::unique_ptr< ReferenceManager > reference_manager
std::map< int64_t, RecoveryStepFuturePtr > FutureMap
void erase_commit_future(int64_t id)
RecoveryStepFuturePtr get_replay_future(int64_t id)
void commit_complete(EventPtr &event)
Declarations for ApplicationQueue.
std::shared_ptr< ConnectionManager > ConnectionManagerPtr
Smart pointer to ConnectionManager.
Declarations for MetricsHandler.
std::condition_variable cond
time_t next_monitoring_time
std::shared_ptr< ApplicationQueue > ApplicationQueuePtr
Shared smart pointer to ApplicationQueue object.
size_t available_server_count()
String extensions and helpers: sets, maps, append operators etc.
void replay_complete(EventPtr &event)
void get_available_servers(StringSet &servers)
std::shared_ptr< Operation > get_move_operation(int64_t hash_code)
Gets operation from active move range operation map.
std::shared_ptr< NameIdMapper > NameIdMapperPtr
Smart pointer to NameIdMapper.
BalancePlanAuthority * get_balance_plan_authority()
void notification_hook(const String &subject, const String &message)
Invoke notification hook.
MetricsHandlerPtr metrics_handler
void add_available_server(const String &location)
std::shared_ptr< Table > TablePtr
RangeServerConnectionManagerPtr rsc_manager
std::shared_ptr< Definition > DefinitionPtr
Smart pointer to Definition.
bool m_shutdown
Flag indicating that server is shutting down.