Commit 3c9b64ae authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6f1023e6
......@@ -35,15 +35,13 @@ import (
const masterSummary = "run master node"
// TODO options:
// cluster, masterv ...
// masterv ...
func masterUsage(w io.Writer) {
fmt.Fprintf(w,
`Usage: neo master [options]
Run NEO master node.
`)
// FIXME use w (see flags.SetOutput)
}
func masterMain(argv []string) {
......@@ -55,7 +53,6 @@ func masterMain(argv []string) {
flags.Parse(argv[1:])
if *cluster == "" {
// XXX vvv -> die or log.Fatalf ?
zt.Fatal("cluster name must be provided")
}
......
......@@ -38,11 +38,13 @@ const storageSummary = "run storage node"
func storageUsage(w io.Writer) {
fmt.Fprintf(w,
`Usage: neo storage [options] zstor XXX
`Usage: neo storage [options] <data.fs>
Run NEO storage node.
`)
// FIXME use w (see flags.SetOutput)
<data.fs> is a path to FileStorage v1 file.
XXX currently storage is read-only.
`)
}
// TODO set GOMAXPROCS *= N (a lot of file IO) + link
......@@ -58,18 +60,15 @@ func storageMain(argv []string) {
flags.Parse(argv[1:])
if *cluster == "" {
// XXX vvv -> die or Fatalf ?
zt.Fatal(os.Stderr, "cluster name must be provided")
zt.Fatal("cluster name must be provided")
}
masterv := strings.Split(*masters, ",")
if len(masterv) == 0 {
fmt.Fprintf(os.Stderr, "master list must be provided")
zt.Exit(2)
zt.Fatal("master list must be provided")
}
if len(masterv) > 1 {
fmt.Fprintf(os.Stderr, "BUG neo/go POC currently supports only 1 master")
zt.Exit(2)
zt.Fatal("BUG neo/go POC currently supports only 1 master")
}
master := masterv[0]
......@@ -81,7 +80,7 @@ func storageMain(argv []string) {
}
// XXX hack to use existing zodb storage for data
zstor, err := fs1.Open(context.Background(), argv[0]) // XXX context.Background -> ?
zstor, err := fs1.Open(context.Background(), argv[0])
if err != nil {
zt.Fatal(err)
}
......
#!/bin/bash -e
# run 1 mixed py/go NEO cluster
# Mpy <cluster> <bind>
# spawn py master
Mpy() {
# XXX --masters=?
neomaster --cluster=$1 --bind=$2 -r 1 -p 1 --autostart=1 --logfile=`pwd`/master.log
}
# Sgo <cluster> <bind> <masters> <data>
# spwan go storage
Sgo() {
neo storage -cluster=$1 -bind=$2 -masters=$3 -logdir=`pwd` $4
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment