From 81cf324eaebba410eaa9619bda95b6ed9b5bf1b8 Mon Sep 17 00:00:00 2001 From: Daniel Mai Date: Wed, 7 Nov 2018 16:56:31 -0800 Subject: [PATCH 1/2] Print the Dgraph version when running live or bulk loader. Related to e2783d6ef1997a7af1be98b3145398b823759e54. --- dgraph/cmd/bulk/run.go | 4 ++-- dgraph/cmd/live/run.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dgraph/cmd/bulk/run.go b/dgraph/cmd/bulk/run.go index 2798776087a..2d78391eedd 100644 --- a/dgraph/cmd/bulk/run.go +++ b/dgraph/cmd/bulk/run.go @@ -70,7 +70,7 @@ func init() { flag.Int("shufflers", 1, "Number of shufflers to run concurrently. Increasing this can improve performance, and "+ "must be less than or equal to the number of reduce shards.") - flag.Bool("version", false, "Prints the version of dgraph-bulk-loader.") + flag.Bool("version", false, "Prints the version of Dgraph.") flag.BoolP("store_xids", "x", false, "Generate an xid edge for each node.") flag.StringP("zero", "z", "localhost:5080", "gRPC address for Dgraph zero") // TODO: Potentially move http server to main. @@ -108,8 +108,8 @@ func run() { ReduceShards: Bulk.Conf.GetInt("reduce_shards"), } + x.PrintVersion() if opt.Version { - x.PrintVersion() os.Exit(0) } if opt.RDFDir == "" || opt.SchemaFile == "" { diff --git a/dgraph/cmd/live/run.go b/dgraph/cmd/live/run.go index 67ffae11c34..8db0f5c0733 100644 --- a/dgraph/cmd/live/run.go +++ b/dgraph/cmd/live/run.go @@ -317,6 +317,7 @@ func setup(opts batchMutationOptions, dc *dgo.Dgraph) *loader { } func run() error { + x.PrintVersion() opt = options{ files: Live.Conf.GetString("rdfs"), schemaFile: Live.Conf.GetString("schema"), From da0877d2cfab706c553b5ae748fcb6cfbd39d70e Mon Sep 17 00:00:00 2001 From: Daniel Mai Date: Sat, 10 Nov 2018 08:00:19 -0800 Subject: [PATCH 2/2] Refer to Dgraph Bulk Loader in help doc. --- dgraph/cmd/bulk/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgraph/cmd/bulk/run.go b/dgraph/cmd/bulk/run.go index 2d78391eedd..09fc9a82a8b 100644 --- a/dgraph/cmd/bulk/run.go +++ b/dgraph/cmd/bulk/run.go @@ -70,7 +70,7 @@ func init() { flag.Int("shufflers", 1, "Number of shufflers to run concurrently. Increasing this can improve performance, and "+ "must be less than or equal to the number of reduce shards.") - flag.Bool("version", false, "Prints the version of Dgraph.") + flag.Bool("version", false, "Prints the version of Dgraph Bulk Loader.") flag.BoolP("store_xids", "x", false, "Generate an xid edge for each node.") flag.StringP("zero", "z", "localhost:5080", "gRPC address for Dgraph zero") // TODO: Potentially move http server to main.