26 #ifndef Hypertable_RangeServer_RangeServer_h
27 #define Hypertable_RangeServer_RangeServer_h
102 const char *row, int32_t flags);
111 bool needs_compaction);
113 const vector<QualifiedRangeSpec> &specs);
122 void batch_update(std::vector<UpdateRecTable *> &updates,
136 const char *pseudo_table,
const char *outfile);
138 const std::vector<SystemVariable::Spec> &specs,
139 uint64_t generation);
148 void metadata_sync(
ResponseCallback *,
const char *, uint32_t flags, std::vector<const char *> columns);
151 const String &location, int32_t plan_generation, int32_t type,
152 const vector<int32_t> &fragments,
156 int32_t plan_generation,
157 const vector<int32_t> &fragments,
158 const vector<QualifiedRangeSpec> &specs,
159 const vector<RangeState> &states);
166 const String &location, int32_t plan_generation,
167 const vector<QualifiedRangeSpec> &ranges);
170 const String &location, int32_t plan_generation,
171 const vector<QualifiedRangeSpec> &ranges);
174 const std::vector<SystemVariable::Spec> &specs,
202 void do_maintenance();
208 void master_change();
211 return m_log_replay_barrier->user_complete();
219 if (m_profile_query) {
220 std::lock_guard<std::mutex> lock(m_profile_mutex);
221 m_profile_query_out << line <<
"\n";
228 void local_recover();
229 void decode_table_id(
const uint8_t **bufp,
size_t *remainp,
TableIdentifier *tid);
231 void get_table_schemas(TableSchemaMap &table_schemas);
232 static void map_table_schemas(
const String &parent,
const std::vector<DirEntryAttr> &listing,
233 TableSchemaMap &table_schemas);
238 void verify_schema(
TableInfoPtr &, uint32_t generation,
const TableSchemaMap *table_schemas=0);
240 bool live(
const vector<QualifiedRangeSpec> &ranges);
243 void group_commit_add(
EventPtr &event, uint64_t cluster_id,
252 std::lock_guard<std::mutex> lock(m_mutex);
253 bool old_value = m_get_statistics_outstanding;
254 m_get_statistics_outstanding = value;
286 bool m_startup {
true};
313 int64_t m_stats_last_timestamp {};
316 bool m_get_statistics_outstanding {};
330 int64_t m_scanner_buffer_size {};
331 time_t m_last_metrics_update {};
332 time_t m_next_metrics_update {};
333 double m_loadavg_accum {};
334 uint64_t m_page_in_accum {};
335 uint64_t m_page_out_accum {};
337 size_t m_metric_samples {};
342 int32_t m_control_file_check_interval {};
344 bool m_profile_query {};
361 #endif // Hypertable_RangeServer_RangeServer_h
uint64_t m_existence_file_handle
A memory buffer of static size.
Declarations for Status response callback.
void initialize(const String &name)
Public initialization function - creates a singleton instance of LogWriter.
Declarations for LogReplayBarrier.
Abstract base class for a filesystem.
std::shared_ptr< StatsRangeServer > StatsRangeServerPtr
Smart pointer to StatsRangeServer.
UpdatePipelinePtr m_update_pipeline_metadata
Update pipeline for METADTA table.
std::chrono::steady_clock::time_point m_last_control_file_check
std::string String
A String is simply a typedef to std::string.
bool test_and_set_get_statistics_outstanding(bool value)
Performs a "test and set" operation on m_get_statistics_outstanding.
std::map< String, SchemaPtr > TableSchemaMap
chrono::time_point< fast_clock > time_point
std::shared_ptr< UpdatePipeline > UpdatePipelinePtr
Smart pointer to UpdatePipeline.
Declarations for MetricsCollectorGanglia.
Declarations for TableIdentifier and TableIdentifierManaged.
Holds updates destined for a specific table.
Flags
Enumeration type for append flags.
Program options handling.
std::mutex m_pending_metrics_mutex
std::mutex m_failover_mutex
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
std::mutex m_profile_mutex
uint64_t m_log_roll_limit
std::ofstream m_profile_query_out
Hyperspace::SessionPtr m_hyperspace
Declarations for ConnectionInitializer.
MaintenanceSchedulerPtr & get_scheduler()
Declarations for GroupCommitInterface.
Declarations for Context.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
std::shared_ptr< CommitLogReader > CommitLogReaderPtr
Smart pointer to CommitLogReader.
std::shared_ptr< Client > ClientPtr
std::shared_ptr< LoadStatistics > LoadStatisticsPtr
Shared smart pointer to LoadStatistics.
Scan predicate and control specification.
Declarations for TableInfoMap.
Response callback for status function.
ScannerMap m_scanner_map
Outstanding scanner map.
Declarations for QualifiedRangeSpec and QualifiedRangeSpecManaged.
PropertiesPtr m_props
Configuration properties.
Declarations for RangeState.
StatsRangeServerPtr m_stats
std::shared_ptr< Session > SessionPtr
void write_profile_data(const String &line)
Declarations for MetricsProcess.
bool status(ContextPtr &context, Timer &timer, Status &status)
Runs a status check on the master.
Declarations for MaintenanceScheduler.
TimerHandlerPtr m_timer_handler
Smart pointer to timer handler.
LockSequencer m_existence_file_sequencer
UpdatePipelinePtr m_update_pipeline_system
Update pipeline for other (non-METADATA) system tables.
std::shared_ptr< Properties > PropertiesPtr
Logging routines and macros.
GroupCommitInterfacePtr m_group_commit
ConnectionManagerPtr m_conn_manager
std::shared_ptr< ConnectionHandler > m_master_connection_handler
std::shared_ptr< TimerHandler > TimerHandlerPtr
Smart pointer to TimerHandler.
ApplicationQueuePtr get_application_queue()
std::shared_ptr< LogReplayBarrier > LogReplayBarrierPtr
Smart pointer to LogReplayBarrier.
Declarations for TimerHandler.
Map to hold outstanding scanners.
std::shared_ptr< QueryCache > QueryCachePtr
Smart pointer to QueryCache.
NameIdMapperPtr m_namemap
Table name-to-ID mapper
QueryCachePtr m_query_cache
Lib::Master::ClientPtr m_master_client
std::shared_ptr< MetricsCollectorGanglia > MetricsCollectorGangliaPtr
Smart pointer to MetricsCollectorGanglia.
Declarations for RangeSpec and RangeSpecManaged.
This class is used to generate and deliver standard responses back to a client.
UpdatePipelinePtr m_update_pipeline_user
Update pipeline for USER tables.
Declarations for TableInfo.
std::shared_ptr< MetaLogEntityRange > MetaLogEntityRangePtr
Smart pointer to MetaLogEntityRange.
std::shared_ptr< TableInfo > TableInfoPtr
Smart pointer to TableInfo.
Declarations for UpdatePipeline.
ApplicationQueuePtr m_app_queue
MetricsCollectorGangliaPtr m_ganglia_collector
Ganglia metrics collector.
Computes and publishes general process metrics.
std::shared_ptr< GroupCommitTimerHandler > GroupCommitTimerHandlerPtr
Shared smart pointer to GroupCommitTimerHandler.
FailoverPhantomRangeMap m_failover_map
LoadStatisticsPtr m_load_statistics
LoadFactors m_load_factors
Declarations for MasterClient This file contains declarations for MasterClient, a client interface cl...
Handles incoming Master requests.
MaintenanceSchedulerPtr m_maintenance_scheduler
Smart pointer to maintenance scheduler.
Qualified (with table identifier) range specification.
std::shared_ptr< RangeServer > RangeServerPtr
Shared smart pointer to RangeServer.
std::shared_ptr< Schema > SchemaPtr
Smart pointer to Schema.
map< String, PhantomRangeMapPtr > FailoverPhantomRangeMap
Declarations for ApplicationQueue.
std::shared_ptr< MaintenanceScheduler > MaintenanceSchedulerPtr
Smart pointer to MaintenanceScheduler.
std::shared_ptr< ConnectionManager > ConnectionManagerPtr
Smart pointer to ConnectionManager.
Declarations for ResponseCallback.
std::shared_ptr< ApplicationQueue > ApplicationQueuePtr
Shared smart pointer to ApplicationQueue object.
Declarations for LoadStatistics.
std::shared_ptr< GroupCommitInterface > GroupCommitInterfacePtr
Smart pointer to GroupCommitInterface.
std::shared_ptr< NameIdMapper > NameIdMapperPtr
Smart pointer to NameIdMapper.
Manages live range map and set of log names that can be safely removed.
GroupCommitTimerHandlerPtr m_group_commit_timer_handler
MetricsProcess m_metrics_process
Process metrics.
Declarations for ScannerMap.
LogReplayBarrierPtr m_log_replay_barrier
RangeServer recovery receiver plan.