0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Global.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef HYPERTABLE_RANGESERVER_GLOBAL_H
23 #define HYPERTABLE_RANGESERVER_GLOBAL_H
24 
25 #include <string>
26 
27 #include <boost/thread/thread.hpp>
28 
29 #include "Common/Properties.h"
30 #include "Common/Filesystem.h"
31 #include "Common/TimeWindow.h"
32 
33 #include "AsyncComm/Comm.h"
35 #include "Hyperspace/Session.h"
40 #include "Hypertable/Lib/Schema.h"
41 #include "Hypertable/Lib/Client.h"
44 
45 #include "FileBlockCache.h"
46 #include "LoadStatistics.h"
47 #include "LocationInitializer.h"
48 #include "MaintenanceQueue.h"
49 #include "MemoryTracker.h"
50 #include "MetaLogEntityTask.h"
52 #include "TableInfo.h"
53 
54 #include <mutex>
55 
56 namespace Hypertable {
57 
58  using namespace Lib;
59 
60  class Global {
61  public:
62  static std::mutex mutex;
73  static RangesPtr ranges;
74  static bool verbose;
75  static bool row_size_unlimited;
82  static std::string log_dir;
84  static int64_t range_split_size;
85  static int64_t range_maximum_size;
86  static int32_t failover_timeout;
88  static int32_t access_group_max_mem;
93  static int64_t range_metadata_split_size;
95  static int64_t log_prune_threshold_min;
96  static int64_t log_prune_threshold_max;
97  static int64_t cellstore_target_size_min;
98  static int64_t cellstore_target_size_max;
99  static int64_t memory_limit;
100  // amount of unused physical memory to achieve according
101  // to the configuration
103  // amount of unused physical memory to achieve according
104  // to the current memory situation
106  static uint64_t access_counter;
107  static bool enable_shadow_cache;
108  static std::string toplevel_dir;
109  static int32_t metrics_interval;
114  static std::vector<MetaLog::EntityTaskPtr> work_queue;
117  static void add_to_work_queue(MetaLog::EntityTaskPtr entity);
118  static void immovable_range_set_add(const TableIdentifier &table, const RangeSpec &spec);
119  static void immovable_range_set_remove(const TableIdentifier &table, const RangeSpec &spec);
120  static bool immovable_range_set_contains(const TableIdentifier &table, const RangeSpec &spec);
121  static void set_ranges(RangesPtr &r);
122  static RangesPtr get_ranges();
123  };
124 
125 } // namespace Hypertable
126 
127 #endif // HYPERTABLE_RANGESERVER_GLOBAL_H
static bool enable_shadow_cache
Definition: Global.h:107
static LocationInitializerPtr location_initializer
Definition: Global.h:83
std::set< String > StringSet
STL Set managing Strings.
Definition: StringExt.h:42
static std::mutex mutex
Definition: Logger.cc:43
static int32_t merge_cellstore_run_length_threshold
Definition: Global.h:110
Range specification.
Definition: RangeSpec.h:40
static int32_t access_group_garbage_compaction_threshold
Definition: Global.h:87
static TablePtr metadata_table
Definition: Global.h:91
Type declarations for PseudoTables class.
std::shared_ptr< LocationInitializer > LocationInitializerPtr
Shared smart pointer to LocationInitializer.
Abstract base class for a filesystem.
static ConnectionManagerPtr conn_manager
Definition: Global.h:113
Declarations for TimeWindow.
std::shared_ptr< RangeLocator > RangeLocatorPtr
Smart pointer to RangeLocator.
Definition: RangeLocator.h:198
Defines a time window.
Definition: TimeWindow.h:61
Declarations for TableIdentifier and TableIdentifierManaged.
Program options handling.
static int64_t memory_limit_ensure_unused_current
Definition: Global.h:105
static int64_t memory_limit
Definition: Global.h:99
Singleton class holding Schema objects for pseudo tables.
Definition: PseudoTables.h:43
std::shared_ptr< EntityTask > EntityTaskPtr
Declarations for MetaLogEntityRemoveOkLogs.
static MetaLogEntityRemoveOkLogsPtr remove_ok_logs
Definition: Global.h:71
Tracks range server memory used.
Definition: MemoryTracker.h:42
Declarations for Schema.
std::shared_ptr< LoadStatistics > LoadStatisticsPtr
Shared smart pointer to LoadStatistics.
std::shared_ptr< MaintenanceQueue > MaintenanceQueuePtr
Smart pointer to MaintenanceQueue.
static int64_t memory_limit_ensure_unused
Definition: Global.h:102
static StringSet immovable_range_set
Definition: Global.h:115
static int64_t log_prune_threshold_max
Definition: Global.h:96
static Hypertable::MemoryTracker * memory_tracker
Definition: Global.h:94
static Hyperspace::SessionPtr hyperspace
Definition: Global.h:63
std::shared_ptr< Session > SessionPtr
Definition: Session.h:734
static RangesPtr ranges
Definition: Global.h:73
static std::vector< MetaLog::EntityTaskPtr > work_queue
Definition: Global.h:114
static std::string toplevel_dir
Definition: Global.h:108
static uint64_t access_counter
Definition: Global.h:106
static Hypertable::Lib::Master::ClientPtr master_client
Definition: Global.h:68
static CommitLogPtr root_log
Definition: Global.h:80
static TablePtr rs_metrics_table
Definition: Global.h:92
static MetaLog::WriterPtr rsml_writer
Definition: Global.h:81
static int64_t log_prune_threshold_min
Definition: Global.h:95
static Hypertable::FilesystemPtr dfs
Definition: Global.h:64
static Hypertable::RangeLocatorPtr range_locator
Definition: Global.h:69
static int64_t cellstore_target_size_min
Definition: Global.h:97
static bool verbose
Definition: Global.h:74
static int64_t range_split_size
Definition: Global.h:84
Declarations for RangeSpec and RangeSpecManaged.
Hypertable definitions
static Hypertable::MaintenanceQueuePtr maintenance_queue
Definition: Global.h:67
Declarations for MetaLog::Writer.
static bool ignore_clock_skew_errors
Definition: Global.h:111
static std::string log_dir
Definition: Global.h:82
Declarations for TableInfo.
static CommitLogPtr system_log
Definition: Global.h:78
std::shared_ptr< Writer > WriterPtr
Smart pointer to Writer.
std::shared_ptr< Filesystem > FilesystemPtr
Smart pointer to Filesystem.
Definition: Filesystem.h:572
static int32_t metrics_interval
Definition: Global.h:109
std::shared_ptr< Client > ClientPtr
Smart pointer to Client.
Definition: Client.h:201
Declarations for MaintenanceQueue This file contains the type declarations for the MaintenanceQueue...
Declarations for Comm.
static int32_t failover_timeout
Definition: Global.h:86
static int64_t range_metadata_split_size
Definition: Global.h:93
std::shared_ptr< CommitLog > CommitLogPtr
Smart pointer to CommitLog.
Definition: CommitLog.h:223
static int64_t cellstore_target_size_max
Definition: Global.h:98
static int32_t access_group_max_mem
Definition: Global.h:88
Declarations for MemoryTracker.
std::shared_ptr< MetaLogEntityRemoveOkLogs > MetaLogEntityRemoveOkLogsPtr
Smart pointer to MetaLogEntityRemoveOkLogs.
static std::mutex mutex
Definition: Global.h:62
static int32_t cell_cache_scanner_cache_size
Definition: Global.h:89
Declarations for MasterClient This file contains declarations for MasterClient, a client interface cl...
static bool range_initialization_complete
Definition: Global.h:112
static CommitLogPtr user_log
Definition: Global.h:77
static LoadStatisticsPtr load_statistics
Definition: Global.h:72
static Hypertable::FilesystemPtr log_dfs
Definition: Global.h:65
Declarations for CommitLog.
static Hypertable::PseudoTables * pseudo_tables
Definition: Global.h:70
static bool ignore_cells_with_clock_skew
Definition: Global.h:76
Declarations for ApplicationQueue.
static TimeWindow low_activity_time
Definition: Global.h:116
Declarations for LocationInitializer.
std::shared_ptr< ConnectionManager > ConnectionManagerPtr
Smart pointer to ConnectionManager.
std::shared_ptr< ApplicationQueue > ApplicationQueuePtr
Shared smart pointer to ApplicationQueue object.
static Hypertable::ApplicationQueuePtr app_queue
Definition: Global.h:66
Declarations for LoadStatistics.
static Hypertable::FileBlockCache * block_cache
Definition: Global.h:90
static bool row_size_unlimited
Definition: Global.h:75
std::shared_ptr< Table > TablePtr
Definition: Table.h:53
static int64_t range_maximum_size
Definition: Global.h:85
static CommitLogPtr metadata_log
Definition: Global.h:79
std::shared_ptr< Ranges > RangesPtr
Smart pointer to Ranges.
Definition: TableInfo.h:91