Documentation
¶
Overview ¶
Package rpc implements some of the lower-level functionality required to communicate with the namenode and datanodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatanodeError ¶
type DatanodeError struct{}
type NamenodeConnection ¶
type NamenodeConnection struct { ClientID []byte ClientName string User string // contains filtered or unexported fields }
NamenodeConnection represents an open connection to a namenode.
func NewNamenodeConnection ¶
func NewNamenodeConnection(options NamenodeConnectionOptions) (*NamenodeConnection, error)
NewNamenodeConnectionWithOptions creates a new connection to a namenode with the given options and performs an initial handshake.
func (*NamenodeConnection) Close ¶
func (c *NamenodeConnection) Close() error
Close terminates all underlying socket connections to remote server.
type NamenodeConnectionOptions ¶
type NamenodeConnectionOptions struct { // Addresses specifies the namenode(s) to connect to. Addresses []string // User specifies which HDFS user the client will act as. It is required // unless kerberos authentication is enabled, in which case it is overridden // by the username set in KerberosClient. User string // DialFunc is used to connect to the namenodes. If nil, then // (&net.Dialer{}).DialContext is used. DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // KerberosClient is used to connect to kerberized HDFS clusters. If provided, // the NamenodeConnection will always mutually athenticate when connecting // to the namenode(s). KerberosClient *krb.Client // KerberosServicePrincipleName specifiesthe Service Principle Name // (<SERVICE>/<FQDN>) for the namenode(s). Like in the // dfs.namenode.kerberos.principal property of core-site.xml, the special // string '_HOST' can be substituted for the hostname in a multi-namenode // setup (for example: 'nn/_HOST@EXAMPLE.COM'). It is required if // KerberosClient is provided. KerberosServicePrincipleName string }
NamenodeConnectionOptions represents the configurable options available for a NamenodeConnection.
type NamenodeError ¶
type NamenodeError struct {
// contains filtered or unexported fields
}
NamenodeError represents an interepreted error from the Namenode, including the error code and the java backtrace. It implements hdfs.Error.
func (*NamenodeError) Desc ¶
func (err *NamenodeError) Desc() string
func (*NamenodeError) Error ¶
func (err *NamenodeError) Error() string
func (*NamenodeError) Exception ¶
func (err *NamenodeError) Exception() string
func (*NamenodeError) Message ¶
func (err *NamenodeError) Message() string
func (*NamenodeError) Method ¶
func (err *NamenodeError) Method() string
Click to show internal directories.
Click to hide internal directories.