diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-04-08 02:00:11 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-04-19 20:29:17 +0200 |
commit | 03a0c9d734c36117aa3b6e7ed52d88c143795904 (patch) | |
tree | b5f9b441b07fdc0e1bba33394b40f9f72de967e5 /skate/cmd | |
parent | bb70c38b045d204ed28f41d51083f73d23067f24 (diff) | |
download | refcat-03a0c9d734c36117aa3b6e7ed52d88c143795904.tar.gz refcat-03a0c9d734c36117aa3b6e7ed52d88c143795904.zip |
skate cdx lookup stub
Diffstat (limited to 'skate/cmd')
-rw-r--r-- | skate/cmd/skate-cdx-lookup/main.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/skate/cmd/skate-cdx-lookup/main.go b/skate/cmd/skate-cdx-lookup/main.go new file mode 100644 index 0000000..1989536 --- /dev/null +++ b/skate/cmd/skate-cdx-lookup/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "flag" + "fmt" + "log" + + "github.com/colinmarc/hdfs" +) + +var nameNode = flag.String("nn", "", "namenode, leave empty when env is set up") + +func main() { + flag.Usage = func() { + fmt.Println(` +Make sure HADOOP env is set up. + +$ git clone https://git.archive.org/webgroup/hadoop-env.git +$ source hadoop-env/prod/setup-env.sh +$ echo $HADOOP_CONF_DIR # should not be empty + +`) + } + flag.Parse() + client, err := hdfs.New(*nameNode) + if err != nil { + log.Fatal(err) + } + log.Println(client) +} |