|
|
| TransferServer (int port, std::shared_ptr< nativefs::NativeFS > &fs, std::shared_ptr< zkclient::ZkClientDn > &dn, int max_xmits=10) |
| |
|
| TransferServer (const TransferServer &other) |
| |
|
void | serve (asio::io_service &io_service) |
| |
|
bool | sendStats () |
| |
| bool | replicate (uint64_t len, std::string ip, std::string xferport, ExtendedBlockProto blockToTarget) |
| |
| bool | remote_read (uint64_t len, std::string ip, std::string xferport, ExtendedBlockProto blockToTarget, std::string data, int &read_len) |
| |
|
bool | rmBlock (uint64_t block_id) |
| |
| bool | writeBlock (uint64_t block_id, std::string data) |
| |
|
bool | poll_replicate () |
| |
|
bool | poll_delete () |
| |
|
bool | poll_reconstruct () |
| |
| bool TransferServer::remote_read |
( |
uint64_t |
len, |
|
|
std::string |
ip, |
|
|
std::string |
xferport, |
|
|
ExtendedBlockProto |
blockToTarget, |
|
|
std::string |
data, |
|
|
int & |
read_len |
|
) |
| |
- Parameters
-
| len | the length of the block |
| ip | the ip of the datanode we are sending the read request to |
| xferport | the xfer port of the datandoe we are sending the read request to |
| blockToTarget | the block info of the block to replicate |
| data | the string to store the read data into |
| read_len | the length of data read |
Reads data from a remote block
| bool TransferServer::replicate |
( |
uint64_t |
len, |
|
|
std::string |
ip, |
|
|
std::string |
xferport, |
|
|
ExtendedBlockProto |
blockToTarget |
|
) |
| |
- Parameters
-
| len | the length of the block |
| ip | the ip of the datanode we are sending the read request to |
| xferport | the xfer port of the datandoe we are sending the read request to |
| blockToTarget | the block info of the block to replicate |
Send a read request to anotehr datanode for a certain block, stream in the packets and write them to our disk
| bool TransferServer::writeBlock |
( |
uint64_t |
block_id, |
|
|
std::string |
data |
|
) |
| |
- Parameters
-
| block_id | the id of the block to write |
| data | to write |
writes a block to the local DN
The documentation for this class was generated from the following files: