|
RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
|
#include <ClientNamenodeProtocolImpl.h>
Public Member Functions | |
| ClientNamenodeTranslator (int port, zkclient::ZkNnClient *zk_arg) | |
| std::string | getFileInfo (std::string) |
| std::string | mkdir (std::string) |
| std::string | destroy (std::string) |
| std::string | create (std::string) |
| std::string | getBlockLocations (std::string) |
| std::string | getServerDefaults (std::string) |
| std::string | renewLease (std::string) |
| std::string | complete (std::string) |
| std::string | setReplication (std::string) |
| std::string | addBlock (std::string input) |
| std::string | getListing (std::string input) |
| std::string | getEZForPath (std::string input) |
| std::string | setOwner (std::string input) |
| std::string | getContentSummary (std::string input) |
| std::string | modifyAclEntries (std::string input) |
| std::string | setPermission (std::string) |
| std::string | rename (std::string) |
| std::string | rename2 (std::string) |
| std::string | append (std::string) |
| std::string | updateBlockForPipeline (std::string) |
| std::string | updatePipeline (std::string) |
| std::string | recoverLease (std::string) |
| std::string | concat (std::string) |
| std::string | abandonBlock (std::string input) |
| std::string | fsync (std::string input) |
| std::string | finalizeUpgrade (std::string input) |
| std::string | getErasureCodingPolicies (std::string input) |
| std::string | getErasureCodingPolicy (std::string input) |
| std::string | setErasureCodingPolicy (std::string input) |
| int | getPort () |
| RPCServer | getRPCServer () |
The translator receives the rpc parameters from rpcserver. It then processes the message and does whatever is necessary, returing a serializes protobuff.
It communicates with zookeeper to construct the namespace and communicate with datanode
| std::string client_namenode_translator::ClientNamenodeTranslator::abandonBlock | ( | std::string | input | ) |
The client can give up on a block by calling abandonBlock(). The client can then either obtain a new block, or complete or abandon the file. Any partial writes to the block will be discarded.
| int client_namenode_translator::ClientNamenodeTranslator::getPort | ( | ) |
Get the port this namenode listens on
| RPCServer client_namenode_translator::ClientNamenodeTranslator::getRPCServer | ( | ) |
Get the RPCServer this namenode uses to connect with clients
| std::string client_namenode_translator::ClientNamenodeTranslator::rename2 | ( | std::string | input | ) |
When asked to do an unsupported command, we'll be returning a method-not-found proto. The code in question is very similar to GetErrorRPCHeader, but will actually occur further up - see rpcserver.cc's method handle_rpc. Whenever (iter != dispatch_table.end()) is false, it basically means that we couldn't find a corresponding method in this file here.
As such, it will go ahead and create the error header and send it back along, without ever having to call any methods in this file. So there is no need to ever worry about methods we just flat out don't support in this file.
That being said, the following is a short list of some common commands we don't support, and our reasons for not supporting them:
1.8.6