diff options
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) +} |