22 #ifndef Hypertable_Lib_RangeLocator_h
23 #define Hypertable_Lib_RangeLocator_h
119 return m_cache->invalidate(table->
id, row_key);
123 std::lock_guard<std::mutex> lock(
m_mutex);
128 m_cache->invalidate_host(hostname);
147 std::lock_guard<std::mutex> lock(
m_mutex);
155 std::lock_guard<std::mutex> lock(
m_mutex);
158 m_last_errors.clear();
202 #endif // Hypertable_Lib_RangeLocator_h
RangeLocationInfo m_root_range_info
int process_metadata_scanblocks(std::vector< ScanBlock > &scan_blocks, Timer &timer)
A callback object derived from this class gets passed into the constructor of Hyperspace.
uint32_t m_metadata_retry_interval
std::shared_ptr< RangeLocator > RangeLocatorPtr
Smart pointer to RangeLocator.
Declarations for TableIdentifier and TableIdentifierManaged.
int connect(CommAddress &addr, Timer &timer)
Program options handling.
Holds range start and end row plus location.
uint32_t m_max_error_queue_length
void dump_error_history()
Displays the error history.
bool invalidate(const TableIdentifier *table, const char *row_key)
Invalidates the cached entry for the given row key.
Declarations for RangeServerClient.
RangeLocator * m_rangelocator
std::shared_ptr< LocationCache > LocationCachePtr
Smart pointer to LocationCache.
Lib::RangeServer::Client m_range_server
LocationCachePtr location_cache()
Returns the location cache.
TableIdentifier m_metadata_table
RangeLocator(PropertiesPtr &cfg, ConnectionManagerPtr &conn_mgr, Hyperspace::SessionPtr &hyperspace, uint32_t timeout_ms)
Constructor.
void hyperspace_disconnected()
std::shared_ptr< Session > SessionPtr
uint64_t m_root_file_handle
uint32_t m_metadata_readahead_count
void invalidate_host(const std::string &hostname)
std::shared_ptr< Properties > PropertiesPtr
A timer class to keep timeout states across AsyncComm related calls.
void set_proxy(const String &str)
Sets address type to CommAddress::PROXY and proxy name to p.
~RangeLocatorHyperspaceSessionCallback()
std::deque< Exception > m_last_errors
Hyperspace::HandleCallbackPtr m_root_handler
std::string m_toplevel_dir
std::shared_ptr< HandleCallback > HandleCallbackPtr
Hyperspace::SessionPtr m_hyperspace
bool m_hyperspace_connected
void initialize()
Assumes access is serialized via m_hyperspace_mutex.
Declarations for ConnectionManager.
int read_root_location(Timer &timer)
Client interface to RangeServer.
uint32_t m_root_metadata_retry_interval
Locates containing range given a key.
ConnectionManagerPtr m_conn_manager
int find(const TableIdentifier *table, const char *row_key, RangeLocationInfo *range_loc_infop, Timer &timer, bool hard)
Locates the range that contains the given row key.
A timer class to keep timeout states across AsyncComm related calls.
~RangeLocator()
Destructor.
void set_root_stale()
Sets the "root stale" flag.
Declarations for ScanBlock.
static const char * END_ROOT_ROW
std::mutex m_hyperspace_mutex
RangeLocatorHyperspaceSessionCallback()
std::shared_ptr< ConnectionManager > ConnectionManagerPtr
Smart pointer to ConnectionManager.
void find_loop(const TableIdentifier *table, const char *row_key, RangeLocationInfo *range_loc_infop, Timer &timer, bool hard)
Locates the range that contains the given row key.
Error codes, Exception handling, error logging.
void hyperspace_reconnected()
void clear_error_history()
Clears the error history.
Address abstraction to hold either proxy name or IPv4:port address.
RangeLocatorHyperspaceSessionCallback m_hyperspace_session_callback