Code Monkey home page Code Monkey logo

hdfs's People

Contributors

adamfaulkner avatar advincze avatar ashishgandhi avatar bjk-soundcloud avatar colinmarc avatar crozzy avatar dajobe avatar ebartels avatar elebore avatar emcfarlane avatar hollow avatar itszootime avatar junjieqian avatar sakserv avatar shastick avatar smcquay avatar snoble avatar staticmukesh avatar tyler-sommer avatar vlivan-microsoft avatar yjh0502 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hdfs's Issues

More specific log output when command fails

For example executing a command on a file without the correct permission returns the following (cryptic) error message:

./hdfs cat /tmp/donothavepermissions
getBlockLocations call failed with ERROR_APPLICATION (org.apache.hadoop.security.AccessControlException)

It would be nice to have more indicative error messages like:

cat: Permission denied: user=myuser, access=READ, inode="/tmp/donothavepermissions":otheruser:othergroup:-rwxrwx---

more polite error handling

log.Fatal might be a bit rough in some cases.

Ok as long as this is only used from CLI, but can be improved.

Nameservice support

HDFS HA uses what they call nameservice, i.e. a logical name resolving in multiple Namenodes inside the configuration. As of today the library supports HA by providing manually the Namenodes, but this could be handled directly within the configuration

JSON formatted output for ls command

The ls command outputs plain text, which has to be parsed if used as part as another script. This could be avoided (or eased) if the command would, optionally, return a formatted output, such as in JSON.

enable credential caching

Cache TGT's and service tickets in a credential cache.

Note: not sure if gokrb5 supports writing such files, but should not be hard to implement.

getFileInfo call failed with FATAL_INVALID_RPC_HEADER (org.apache.hadoop.ipc.RpcServerException)

When I use this library to operate hdfs, the program is always error, the error is
2018/06/20 10:16:09 create /user/tnt/abc.txt: getFileInfo call failed with FATAL_INVALID_RPC_HEADER (org.apache.hadoop.ipc.RpcServerException)

the code is as follow

func main() {
        os.Setenv("HADOOP_NAMENODE","10.202.45.82:8020")
	os.Setenv("HADOOP_KRB_CONF","krb5.conf")
	os.Setenv("HADOOP_KEYTAB","xue.keytab")
	os.Setenv("HADOOP_SNAME","ds")
	client :=getClient()
	fw,err:=client.Create("/user/tnt/abc.txt")
	if err != nil{
		log.Fatal(err.Error())
	}
	fw.Write([]byte("hehehe"))
	fw.Close()
}
func getClient() *Client {
	nn := os.Getenv("HADOOP_NAMENODE")
	if nn == "" {
		log.Fatal("HADOOP_NAMENODE not set")
	}

	hadoopCfg := LoadHadoopConf("")
	krbClient := GetKrbClientIfRequired(hadoopCfg)

	options := ClientOptions{}

	options.Addresses = []string{nn}
	options.KerberosClient = krbClient
	options.ServicePrincipalName = GetServiceName()

	c, err := NewClient(options)
	if err != nil {
		log.Fatal(err)
	}

	return c
}

enable autocomplete

Not sure of what it would take, but there is a hidden complete method that might be usable for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.