0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Private Member Functions | Friends | List of all members
Hypertable::Lib::RangeServerRecovery::ReplayPlan Class Reference

Holds a fragment replay plan for the recovery of a RangeServer. More...

#include <ReplayPlan.h>

Inheritance diagram for Hypertable::Lib::RangeServerRecovery::ReplayPlan:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::Lib::RangeServerRecovery::ReplayPlan:
Collaboration graph
[legend]

Public Member Functions

void insert (int32_t fragment, const string &location)
 Modifies the recovery replay plan by inserting a fragment and associated location (range server) responsible for replaying that fragment. More...
 
void remove_location (const string &location)
 
void get_fragments (vector< int32_t > &fragments) const
 Fills a vector with all of the fragment numbers that are part of this replay plan. More...
 
void get_fragments (const string &location, vector< int32_t > &fragments) const
 Fills a vector with fragment numbers assigned to a specific location in this replay plan. More...
 
void get_locations (StringSet &locations) const
 Fills a set of location strings that represent all of the locations (range servers) that are part of this plan. More...
 
bool get_location (int32_t fragment, string &location) const
 Given a fragment number, return location it is assigned to. More...
 
void clear ()
 Clears the plan. More...
 
- Public Member Functions inherited from Hypertable::Serializable
virtual size_t encoded_length () const
 Returns serialized object length. More...
 
virtual void encode (uint8_t **bufp) const
 Writes serialized representation of object to a buffer. More...
 
virtual void decode (const uint8_t **bufp, size_t *remainp)
 Reads serialized representation of object from a buffer. More...
 

Public Attributes

FragmentReplayPlanContainer container
 Container holding fragment replay plans. More...
 

Private Member Functions

uint8_t encoding_version () const override
 Returns encoding version. More...
 
size_t encoded_length_internal () const override
 Returns internal serialized length. More...
 
void encode_internal (uint8_t **bufp) const override
 Writes serialized representation of object to a buffer. More...
 
void decode_internal (uint8_t version, const uint8_t **bufp, size_t *remainp) override
 Reads serialized representation of object from a buffer. More...
 

Friends

ostream & operator<< (ostream &os, const ReplayPlan &plan)
 

Additional Inherited Members

Detailed Description

Holds a fragment replay plan for the recovery of a RangeServer.

This plan consists of a set of fragments and associated range servers that are responsible for replaying the fragment as part of the recovery operation.

Definition at line 53 of file ReplayPlan.h.

Member Function Documentation

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::clear ( )
inline

Clears the plan.

Definition at line 109 of file ReplayPlan.h.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::decode_internal ( uint8_t  version,
const uint8_t **  bufp,
size_t *  remainp 
)
overrideprivatevirtual

Reads serialized representation of object from a buffer.

Parameters
versionEncoding version
bufpAddress of destination buffer pointer (advanced by call)
remainpAddress of integer holding amount of serialized object remaining
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 133 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::encode_internal ( uint8_t **  bufp) const
overrideprivatevirtual

Writes serialized representation of object to a buffer.

Parameters
bufpAddress of destination buffer pointer (advanced by call)

Encoding is as follows:

Encoding Description
i32 Entry count
For each entry:
FragmentReplayPlan Fragment replay information

Implements Hypertable::Serializable.

Definition at line 126 of file ReplayPlan.cc.

size_t Hypertable::Lib::RangeServerRecovery::ReplayPlan::encoded_length_internal ( ) const
overrideprivatevirtual

Returns internal serialized length.

Returns
Internal serialized length
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 99 of file ReplayPlan.cc.

uint8_t Hypertable::Lib::RangeServerRecovery::ReplayPlan::encoding_version ( ) const
overrideprivatevirtual

Returns encoding version.

Returns
Encoding version

Implements Hypertable::Serializable.

Definition at line 95 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::get_fragments ( vector< int32_t > &  fragments) const

Fills a vector with all of the fragment numbers that are part of this replay plan.

Parameters
fragmentsreference to vector to hold fragment numbers

Definition at line 58 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::get_fragments ( const string &  location,
vector< int32_t > &  fragments 
) const

Fills a vector with fragment numbers assigned to a specific location in this replay plan.

Parameters
locationlocation (range server) for which to get fragment numbers
fragmentsreference to vector to hold fragment numbers

Definition at line 64 of file ReplayPlan.cc.

bool Hypertable::Lib::RangeServerRecovery::ReplayPlan::get_location ( int32_t  fragment,
string &  location 
) const

Given a fragment number, return location it is assigned to.

Parameters
fragmentfragment number to look up
locationreference to string to hold returned location
Returns
true if found, false otherwise

Definition at line 84 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::get_locations ( StringSet locations) const

Fills a set of location strings that represent all of the locations (range servers) that are part of this plan.

Parameters
locationsreference to string set to be filled with locations

Definition at line 73 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::insert ( int32_t  fragment,
const string &  location 
)

Modifies the recovery replay plan by inserting a fragment and associated location (range server) responsible for replaying that fragment.

If the fragment already exists in the plan, then the associated location information is updated with the new location.

Parameters
fragmentfragment to replay
locationproxy name of range server responsble for replaying fragment

Definition at line 40 of file ReplayPlan.cc.

void Hypertable::Lib::RangeServerRecovery::ReplayPlan::remove_location ( const string &  location)
Parameters
locationproxy name of range server to remove

Definition at line 49 of file ReplayPlan.cc.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const ReplayPlan plan 
)
friend

Definition at line 139 of file ReplayPlan.h.

Member Data Documentation

FragmentReplayPlanContainer Hypertable::Lib::RangeServerRecovery::ReplayPlan::container

Container holding fragment replay plans.

Definition at line 112 of file ReplayPlan.h.


The documentation for this class was generated from the following files: