From 60805d7f3e4b53e330ddc6086a29b591cb27045a Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Fri, 17 Mar 2017 14:44:50 -0500 Subject: [PATCH] change port 15000 to 10101 everywhere --- Dockerfile | 2 +- README.md | 26 +++++++++++++------------- cmd/backup.go | 2 +- cmd/bench.go | 2 +- cmd/export.go | 2 +- cmd/import.go | 2 +- cmd/restore.go | 2 +- ctl/config.go | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59b5137bc..f8db1c4b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Pilosa Corp. ARG ldflags='' -EXPOSE 15000 +EXPOSE 10101 VOLUME /data RUN echo 'data-dir = "/data"' > /config diff --git a/README.md b/README.md index 8236798c4..7e40cd84c 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,13 @@ and should look like: ``` data-dir = "/tmp/pil0" -host = "127.0.0.1:15000" +host = "127.0.0.1:10101" [cluster] replicas = 2 [[cluster.node]] -host = "127.0.0.1:15000" +host = "127.0.0.1:10101" [[cluster.node]] host = "127.0.0.1:15001" @@ -79,7 +79,7 @@ docker build -t pilosa:latest . You can run a temporary container using: ``` -docker run -it --rm --name pilosa -p 15000:15000 pilosa:latest +docker run -it --rm --name pilosa -p 10101:10101 pilosa:latest ``` When you click `Ctrl+C` to stop the container, the container and the data in the container will be erased. You can leave out `--rm` flag to keep the data in the container. See [Docker documentation](https://docs.docker.com) for other options. @@ -88,16 +88,16 @@ When you click `Ctrl+C` to stop the container, the container and the data in the You can interact with Pilosa via HTTP requests to the host:port on which you have Pilosa running. The following examples illustrate how to do this using `curl` with a Pilosa cluster running on -127.0.0.1 port 15000. +127.0.0.1 port 10101. Return the version of Pilosa: ```sh -$ curl "http://127.0.0.1:15000/version" +$ curl "http://127.0.0.1:10101/version" ``` Return a list of all databases and frames in the index: ```sh -$ curl "http://127.0.0.1:15000/schema" +$ curl "http://127.0.0.1:10101/schema" ``` ### Database and Frame Schema @@ -107,28 +107,28 @@ Before running a query, the corresponding database and frame must be created. No You can create the database `sample-db` using: ```sh -$ curl -XPOST "http://127.0.0.1:15000/db" \ +$ curl -XPOST "http://127.0.0.1:10101/db" \ -d '{"db": "sample-db"}' ``` Optionally, you can specify the column label on database creation: ```sh -$ curl -XPOST "http://127.0.0.1:15000/db" \ +$ curl -XPOST "http://127.0.0.1:10101/db" \ -d '{"db": "sample-db", "columnLabel": "user"}' ``` The frame `collaboration` may be created using the following call: ```sh -$ curl -XPOST "http://127.0.0.1:15000/frame" \ +$ curl -XPOST "http://127.0.0.1:10101/frame" \ -d '{"db": "sample-db", "frame": "collaboration"}' ``` It is possible to specify the frame row label on frame creation: ```sh -$ curl -XPOST "http://127.0.0.1:15000/frame" \ +$ curl -XPOST "http://127.0.0.1:10101/frame" \ -d '{"db": "sample-db", "frame": "collaboration"}, "options": {"rowLabel": "project"}}' ``` @@ -142,13 +142,13 @@ In this section, we assume both the database `sample-db` with column label `user A query sent to database `sample-db` will have the following format: ```sh -$ curl -X POST "http://127.0.0.1:15000/query?db=sample-db" -d 'Query()' +$ curl -X POST "http://127.0.0.1:10101/query?db=sample-db" -d 'Query()' ``` The `Query()` object referenced above should be made up of one or more of the query types listed below. So for example, a SetBit() query would look like this: ```sh -$ curl -X POST "http://127.0.0.1:15000/query?db=sample-db" -d 'SetBit(project=10, frame="collaboration", user=1)' +$ curl -X POST "http://127.0.0.1:10101/query?db=sample-db" -d 'SetBit(project=10, frame="collaboration", user=1)' ``` Query results have the format `{"results":[]}`, where `results` is a list of results for each `Query()`. This @@ -156,7 +156,7 @@ means that you can provide multiple `Query()` objects with each HTTP request and the results of all of the queries. ```sh -$ curl -X POST "http://127.0.0.1:15000/query?db=sample-db" -d 'Query() Query() Query()' +$ curl -X POST "http://127.0.0.1:10101/query?db=sample-db" -d 'Query() Query() Query()' ``` --- diff --git a/cmd/backup.go b/cmd/backup.go index f9b86b05d..ac1b19d7f 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -28,7 +28,7 @@ Backs up the database and frame from across the cluster into a single file. }, } flags := backupCmd.Flags() - flags.StringVarP(&Backuper.Host, "host", "", "localhost:15000", "host:port of Pilosa.") + flags.StringVarP(&Backuper.Host, "host", "", "localhost:10101", "host:port of Pilosa.") flags.StringVarP(&Backuper.Database, "database", "d", "", "Pilosa database to backup into.") flags.StringVarP(&Backuper.Frame, "frame", "f", "", "Frame to backup into.") flags.StringVarP(&Backuper.Path, "output-file", "o", "", "File to write backup to - default stdout") diff --git a/cmd/bench.go b/cmd/bench.go index e6e723ac8..ec7be3760 100644 --- a/cmd/bench.go +++ b/cmd/bench.go @@ -28,7 +28,7 @@ Executes a benchmark for a given operation against the database. }, } flags := benchCmd.Flags() - flags.StringVarP(&Bencher.Host, "host", "", "localhost:15000", "host:port of Pilosa.") + flags.StringVarP(&Bencher.Host, "host", "", "localhost:10101", "host:port of Pilosa.") flags.StringVarP(&Bencher.Database, "database", "d", "", "Pilosa database to benchmark.") flags.StringVarP(&Bencher.Frame, "frame", "f", "", "Frame to benchmark.") flags.StringVarP(&Bencher.Op, "operation", "o", "set-bit", "Operation to perform: choose from [set-bit]") diff --git a/cmd/export.go b/cmd/export.go index bc0348808..fb22ee369 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -36,7 +36,7 @@ The file does not contain any headers. } flags := exportCmd.Flags() - flags.StringVarP(&Exporter.Host, "host", "", "localhost:15000", "host:port of Pilosa.") + flags.StringVarP(&Exporter.Host, "host", "", "localhost:10101", "host:port of Pilosa.") flags.StringVarP(&Exporter.Database, "database", "d", "", "Pilosa database to export into.") flags.StringVarP(&Exporter.Frame, "frame", "f", "", "Frame to export into.") flags.StringVarP(&Exporter.Path, "output-file", "o", "", "File to write export to - default stdout") diff --git a/cmd/import.go b/cmd/import.go index c29d62800..b7998f750 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -35,7 +35,7 @@ omitted. If it is present then its format should be YYYY-MM-DDTHH:MM. }, } flags := importCmd.Flags() - flags.StringVarP(&Importer.Host, "host", "", "localhost:15000", "host:port of Pilosa.") + flags.StringVarP(&Importer.Host, "host", "", "localhost:10101", "host:port of Pilosa.") flags.StringVarP(&Importer.Database, "database", "d", "", "Pilosa database to import into.") flags.StringVarP(&Importer.Frame, "frame", "f", "", "Frame to import into.") flags.IntVarP(&Importer.BufferSize, "buffer-size", "s", 10000000, "Number of bits to buffer/sort before importing.") diff --git a/cmd/restore.go b/cmd/restore.go index b990e482e..a4930f668 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -29,7 +29,7 @@ Restores a frame to the cluster from a backup file. }, } flags := restoreCmd.Flags() - flags.StringVarP(&Restorer.Host, "host", "", "localhost:15000", "host:port of Pilosa.") + flags.StringVarP(&Restorer.Host, "host", "", "localhost:10101", "host:port of Pilosa.") flags.StringVarP(&Restorer.Database, "database", "d", "", "Pilosa database to restore into.") flags.StringVarP(&Restorer.Frame, "frame", "f", "", "Frame to restore into.") flags.StringVarP(&Restorer.Path, "input-file", "i", "", "File to restore from.") diff --git a/ctl/config.go b/ctl/config.go index 238972b1b..95298192d 100644 --- a/ctl/config.go +++ b/ctl/config.go @@ -25,13 +25,13 @@ func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand func (cmd *ConfigCommand) Run(ctx context.Context) error { fmt.Fprintln(cmd.Stdout, strings.TrimSpace(` data-dir = "~/.pilosa" -host = "localhost:15000" +host = "localhost:10101" [cluster] replicas = 1 [[cluster.node]] -host = "localhost:15000" +host = "localhost:10101" [plugins] path = ""