#include <zk_dn_client.h>
|
| | ZkClientDn (const std::string &ip, const std::string &zkIpAndAddress, uint64_t total_disk_space, const uint32_t ipcPort=50020, const uint32_t xferPort=50010) |
| |
|
| ZkClientDn (const std::string &ip, std::shared_ptr< ZKWrapper >, uint64_t total_disk_space, const uint32_t ipcPort=50020, const uint32_t xferPort=50010) |
| |
| void | registerDataNode (const std::string &ip, uint64_t total_disk_space, const uint32_t ipcPort, const uint32_t xferPort) |
| |
| bool | blockReceived (uint64_t uuid, uint64_t size_bytes) |
| |
|
bool | blockSizeUpdated (uint64_t uuid, uint64_t size_bytes) |
| |
|
bool | sendStats (uint64_t free_space, uint32_t xmits) |
| |
| void | setTransferServer (std::shared_ptr< TransferServer > &server) |
| |
| bool | push_dn_on_repq (std::string dn_name, uint64_t blockid) |
| |
|
bool | poll_replication_queue () |
| |
|
bool | poll_delete_queue () |
| |
| bool | poll_reconstruct_queue () |
| |
|
std::string | get_datanode_id () |
| |
|
| ZkClientCommon (std::string hostAndIp) |
| |
|
| ZkClientCommon (std::shared_ptr< ZKWrapper > zk) |
| |
|
void | init () |
| |
| std::string | get_block_metadata_path (u_int64_t block_or_block_group_id) |
| |
| u_int64_t | get_block_group_id (u_int64_t storage_block_id) |
| |
| u_int64_t | get_index_within_block_group (u_int64_t storage_block_id) |
| |
|
| static bool | is_ec_block (u_int64_t block_id) |
| |
|
std::shared_ptr< ZKWrapper > | zk |
| |
|
static const char | NAMESPACE_PATH [] = "/fileSystem" |
| |
|
static const char | BLOCKS_TREE [] = "/blocks" |
| |
|
static const char | HEALTH [] = "/health" |
| |
|
static const char | HEALTH_BACKSLASH [] = "/health/" |
| |
|
static const char | STATS [] = "/stats" |
| |
|
static const char | HEARTBEAT [] = "/heartbeat" |
| |
|
static const char | WORK_QUEUES [] = "/work_queues/" |
| |
|
static const char | REPLICATE_QUEUES [] = "/work_queues/replicate/" |
| |
|
static const char | REPLICATE_QUEUES_NO_BACKSLASH [] |
| |
|
static const char | DELETE_QUEUES [] = "/work_queues/delete/" |
| |
|
static const char | DELETE_QUEUES_NO_BACKSLASH [] = "/work_queues/delete" |
| |
|
static const char | WAIT_FOR_ACK [] = "wait_for_acks" |
| |
|
static const char | WAIT_FOR_ACK_BACKSLASH [] = "wait_for_acks/" |
| |
|
static const char | REPLICATE_BACKSLASH [] = "replicate/" |
| |
|
static const char | BLOCK_LOCATIONS [] = "/block_locations/" |
| |
|
static const char | BLOCK_GROUP_LOCATIONS [] = "/block_group_locations/" |
| |
|
static const char | BLOCKS [] = "/blocks" |
| |
|
static const char | EC_RECOVER_QUEUES [] = "/work_queues/ec_recover/" |
| |
|
static const char | EC_RECOVER_QUEUES_NO_BACKSLASH [] |
| |
|
static const char | LEASES [] = "/leases" |
| |
|
static const char | CLIENTS [] = "/clients" |
| |
Class representing a Zookeeper-DataNode client. Allows a DataNode to update the state of ZK.
| zkclient::ZkClientDn::ZkClientDn |
( |
const std::string & |
ip, |
|
|
const std::string & |
zkIpAndAddress, |
|
|
uint64_t |
total_disk_space, |
|
|
const uint32_t |
ipcPort = 50020, |
|
|
const uint32_t |
xferPort = 50010 |
|
) |
| |
Initializes the Zookeeper-Datanode client.
- Parameters
-
| ip | The DataNode IP |
| hostname | The DataNode hostname |
| zkIpAndAddress | The IP and hostname of ZK |
| ipcPort | TODO |
| xferPort | TODO |
| bool zkclient::ZkClientDn::blockReceived |
( |
uint64_t |
uuid, |
|
|
uint64_t |
size_bytes |
|
) |
| |
Informs Zookeeper when the DataNode has received a block. Adds an acknowledgment and creates a node for the DN in the block's block_locations.
- Parameters
-
| uuid | The UUID of the block received by the DataNode. |
| size_bytes | The number of bytes in the block |
- Returns
- True on success, false on error.
| bool zkclient::ZkClientDn::poll_reconstruct_queue |
( |
| ) |
|
Checks the ec_recovery queue for jobs
| bool zkclient::ZkClientDn::push_dn_on_repq |
( |
std::string |
dn_name, |
|
|
uint64_t |
blockid |
|
) |
| |
Push the blockid onto the replication queue belonging to dn_name
- Parameters
-
| dn_name | the queue to add onto |
| blockid | the id of the block to be replicated |
- Returns
- true if success
| void zkclient::ZkClientDn::registerDataNode |
( |
const std::string & |
ip, |
|
|
uint64_t |
total_disk_space, |
|
|
const uint32_t |
ipcPort, |
|
|
const uint32_t |
xferPort |
|
) |
| |
Registers this DataNode with Zookeeper.
| void zkclient::ZkClientDn::setTransferServer |
( |
std::shared_ptr< TransferServer > & |
server | ) |
|
Set the transfer server that this dn uses for read/writes
The documentation for this class was generated from the following files: