Holds a fragment replay plan for the recovery of a RangeServer. More...
#include <ReplayPlan.h>
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 |
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.
|
inline |
Clears the plan.
Definition at line 109 of file ReplayPlan.h.
|
overrideprivatevirtual |
Reads serialized representation of object from a buffer.
version | Encoding version |
bufp | Address of destination buffer pointer (advanced by call) |
remainp | Address of integer holding amount of serialized object remaining |
Implements Hypertable::Serializable.
Definition at line 133 of file ReplayPlan.cc.
|
overrideprivatevirtual |
Writes serialized representation of object to a buffer.
bufp | Address 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.
|
overrideprivatevirtual |
Returns internal serialized length.
Implements Hypertable::Serializable.
Definition at line 99 of file ReplayPlan.cc.
|
overrideprivatevirtual |
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.
fragments | reference 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.
location | location (range server) for which to get fragment numbers |
fragments | reference 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.
fragment | fragment number to look up |
location | reference to string to hold returned location |
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.
locations | reference 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.
fragment | fragment to replay |
location | proxy 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 | ) |
location | proxy name of range server to remove |
Definition at line 49 of file ReplayPlan.cc.
|
friend |
Definition at line 139 of file ReplayPlan.h.
FragmentReplayPlanContainer Hypertable::Lib::RangeServerRecovery::ReplayPlan::container |
Container holding fragment replay plans.
Definition at line 112 of file ReplayPlan.h.