From 03a0c9d734c36117aa3b6e7ed52d88c143795904 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 8 Apr 2021 02:00:11 +0200 Subject: skate cdx lookup stub --- skate/cmd/skate-cdx-lookup/main.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 skate/cmd/skate-cdx-lookup/main.go (limited to 'skate/cmd') 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) +} -- cgit v1.2.3