Skip to content

Commit

Permalink
Merge pull request #251 from vasayxtx/export-client-name
Browse files Browse the repository at this point in the history
Export method to get an unique name of the client
  • Loading branch information
colinmarc authored Dec 28, 2020
2 parents cd06e0f + c670274 commit fb9e39e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ func (c *Client) User() string {
return c.namenode.User
}

// Name returns the unique name that the Client uses in communication
// with namenodes and datanodes.
func (c *Client) Name() string {
return c.namenode.ClientName
}

// ReadFile reads the file named by filename and returns the contents.
func (c *Client) ReadFile(filename string) ([]byte, error) {
f, err := c.Open(filename)
Expand Down

0 comments on commit fb9e39e

Please sign in to comment.