From 7e718743d22958ccc4c6d376acc6d632db0cf025 Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 14 Jul 2021 10:07:34 -0500 Subject: [PATCH] Rename pilosa binary to featurebase --- Dockerfile-clustertests | 4 ++-- Makefile | 12 ++++++------ cmd/backup.go | 6 +++--- cmd/check.go | 2 +- cmd/check_test.go | 2 +- cmd/chksum.go | 6 +++--- cmd/convert.go | 2 +- cmd/export.go | 6 +++--- cmd/export_test.go | 2 +- cmd/{pilosa => featurebase}/main.go | 0 cmd/import.go | 8 ++++---- cmd/import_test.go | 2 +- cmd/inspect_test.go | 2 +- cmd/root.go | 12 ++++++------ cmd/server.go | 12 ++++++------ internal/clustertests/docker-compose.yml | 6 +++--- 16 files changed, 42 insertions(+), 42 deletions(-) rename cmd/{pilosa => featurebase}/main.go (100%) diff --git a/Dockerfile-clustertests b/Dockerfile-clustertests index 8a155b9e9..95b35b318 100644 --- a/Dockerfile-clustertests +++ b/Dockerfile-clustertests @@ -14,7 +14,7 @@ RUN cd /go/src/github.com/pilosa/pilosa \ ADD https://github.com/alexei-led/pumba/releases/download/0.6.0/pumba_linux_amd64 /pumba RUN chmod +x /pumba -RUN cp /go/bin/pilosa /pilosa +RUN cp /go/bin/featurebase /featurebase COPY LICENSE /LICENSE COPY NOTICE /NOTICE @@ -23,4 +23,4 @@ EXPOSE 10101 VOLUME /data ENTRYPOINT ["bash", "-c"] -CMD ["/pilosa", "server", "--data-dir", "/data", "--bind", "http://0.0.0.0:10101"] +CMD ["/featurebase", "server", "--data-dir", "/data", "--bind", "http://0.0.0.0:10101"] diff --git a/Makefile b/Makefile index 5ea170d9f..b5ababcce 100644 --- a/Makefile +++ b/Makefile @@ -96,14 +96,14 @@ cover-viz: cover # Compile Pilosa build: - $(GO) build -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/pilosa + $(GO) build -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/featurebase # Create a single release build under the build directory release-build: - $(MAKE) $(if $(DOCKER_BUILD),docker-)build FLAGS="-o build/pilosa-$(VERSION_ID)/pilosa" - cp NOTICE README.md LICENSE build/pilosa$(VERSION_ID) - tar -cvz -C build -f build/pilosa-$(VERSION_ID).tar.gz pilosa-$(VERSION_ID)/ - @echo Created release build: build/pilosa-$(VERSION_ID).tar.gz + $(MAKE) $(if $(DOCKER_BUILD),docker-)build FLAGS="-o build/featurebase-$(VERSION_ID)/featurebase" + cp NOTICE README.md LICENSE build/featurebase$(VERSION_ID) + tar -cvz -C build -f build/featurebase-$(VERSION_ID).tar.gz featurebase-$(VERSION_ID)/ + @echo Created release build: build/featurebase-$(VERSION_ID).tar.gz # Error out if there are untracked changes in Git check-clean: @@ -153,7 +153,7 @@ backuptests: vendor # Install Pilosa install: - $(GO) install -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/pilosa + $(GO) install -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/featurebase install-bench: $(GO) install -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/pilosa-bench diff --git a/cmd/backup.go b/cmd/backup.go index 85a77dd15..072384e5a 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -26,9 +26,9 @@ func newBackupCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobr cmd := ctl.NewBackupCommand(stdin, stdout, stderr) ccmd := &cobra.Command{ Use: "backup", - Short: "Back up pilosa server", + Short: "Back up FeatureBase server", Long: ` -Backs up a pilosa server to a local, tar-formatted snapshot file. +Backs up a FeatureBase server to a local, tar-formatted snapshot file. `, RunE: func(c *cobra.Command, args []string) error { return cmd.Run(context.Background()) @@ -39,7 +39,7 @@ Backs up a pilosa server to a local, tar-formatted snapshot file. flags.StringVarP(&cmd.OutputDir, "output", "o", "", "output dir to write to") flags.BoolVar(&cmd.NoSync, "no-sync", false, "disable file sync") flags.IntVar(&cmd.Concurrency, "concurrency", cmd.Concurrency, "number of concurrent backup goroutines") - flags.StringVar(&cmd.Host, "host", "localhost:10101", "host:port of Pilosa.") + flags.StringVar(&cmd.Host, "host", "localhost:10101", "host:port of FeatureBase.") ctl.SetTLSConfig(flags, "", &cmd.TLS.CertificatePath, &cmd.TLS.CertificateKeyPath, &cmd.TLS.CACertPath, &cmd.TLS.SkipVerify, &cmd.TLS.EnableClientVerification) return ccmd } diff --git a/cmd/check.go b/cmd/check.go index 4d075e4ad..aa5edef13 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -30,7 +30,7 @@ func newCheckCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobra checker = ctl.NewCheckCommand(stdin, stdout, stderr) checkCmd := &cobra.Command{ Use: "check [path2]...", - Short: "Do a consistency check on a pilosa data file.", + Short: "Do a consistency check on a FeatureBase data file.", Long: ` Performs a consistency check on data files. `, diff --git a/cmd/check_test.go b/cmd/check_test.go index a50b48330..053f840c4 100644 --- a/cmd/check_test.go +++ b/cmd/check_test.go @@ -23,7 +23,7 @@ func TestCheckHelp(t *testing.T) { output, err := ExecNewRootCommand(t, "check", "--help") if !strings.Contains(output, "Usage:") || !strings.Contains(output, "Flags:") || - !strings.Contains(output, "pilosa check") || err != nil { + !strings.Contains(output, "featurebase check") || err != nil { t.Fatalf("Command 'check --help' not working, err: '%v', output: '%s'", err, output) } } diff --git a/cmd/chksum.go b/cmd/chksum.go index 8732cd155..39268d795 100644 --- a/cmd/chksum.go +++ b/cmd/chksum.go @@ -26,9 +26,9 @@ func newChkSumCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobr cmd := ctl.NewChkSumCommand(stdin, stdout, stderr) ccmd := &cobra.Command{ Use: "chksum", - Short: "digital signature of pilosa data", + Short: "Digital signature of FeatureBase data", Long: ` - Generates a digital signature of all the data associated with a provided pilosa server + Generates a digital signature of all the data associated with a provided FeatureBase server WARNING: could be slow if high cardinality fields exist `, RunE: func(c *cobra.Command, args []string) error { @@ -37,7 +37,7 @@ func newChkSumCommand(stdin io.Reader, stdout io.Writer, stderr io.Writer) *cobr } flags := ccmd.Flags() - flags.StringVar(&cmd.Host, "host", "localhost:10101", "host:port of Pilosa.") + flags.StringVar(&cmd.Host, "host", "localhost:10101", "host:port of FeatureBase.") ctl.SetTLSConfig(flags, "", &cmd.TLS.CertificatePath, &cmd.TLS.CertificateKeyPath, &cmd.TLS.CACertPath, &cmd.TLS.SkipVerify, &cmd.TLS.EnableClientVerification) return ccmd } diff --git a/cmd/convert.go b/cmd/convert.go index 86452905d..d1a80f0dd 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -31,7 +31,7 @@ func newInspectCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command inspectCmd := &cobra.Command{ Use: "inspect", - Short: "Get stats on a pilosa data file.", + Short: "Get stats on a FeatureBase data file.", Long: ` Inspects a data file and provides stats. `, diff --git a/cmd/export.go b/cmd/export.go index bceedb98a..01ba413df 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -29,7 +29,7 @@ func newExportCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command Exporter = ctl.NewExportCommand(stdin, stdout, stderr) exportCmd := &cobra.Command{ Use: "export", - Short: "Export data from pilosa.", + Short: "Export data from FeatureBase.", Long: ` Bulk exports a fragment to a CSV file. If the OUTFILE is not specified then the output is written to STDOUT. @@ -46,8 +46,8 @@ The file does not contain any headers. } flags := exportCmd.Flags() - flags.StringVarP(&Exporter.Host, "host", "", "localhost:10101", "host:port of Pilosa.") - flags.StringVarP(&Exporter.Index, "index", "i", "", "Pilosa index to export") + flags.StringVarP(&Exporter.Host, "host", "", "localhost:10101", "host:port of FeatureBase.") + flags.StringVarP(&Exporter.Index, "index", "i", "", "FeatureBase index to export") flags.StringVarP(&Exporter.Field, "field", "f", "", "Field to export") flags.StringVarP(&Exporter.Path, "output-file", "o", "", "File to write export to - default stdout") ctl.SetTLSConfig(flags, "", &Exporter.TLS.CertificatePath, &Exporter.TLS.CertificateKeyPath, &Exporter.TLS.CACertPath, &Exporter.TLS.SkipVerify, &Exporter.TLS.EnableClientVerification) diff --git a/cmd/export_test.go b/cmd/export_test.go index bd14eaba1..a1214d421 100644 --- a/cmd/export_test.go +++ b/cmd/export_test.go @@ -25,7 +25,7 @@ func TestExportHelp(t *testing.T) { output, err := ExecNewRootCommand(t, "export", "--help") if !strings.Contains(output, "Usage:") || !strings.Contains(output, "Flags:") || - !strings.Contains(output, "pilosa export") || err != nil { + !strings.Contains(output, "featurebase export") || err != nil { t.Fatalf("Command 'export --help' not working, err: '%v', output: '%s'", err, output) } } diff --git a/cmd/pilosa/main.go b/cmd/featurebase/main.go similarity index 100% rename from cmd/pilosa/main.go rename to cmd/featurebase/main.go diff --git a/cmd/import.go b/cmd/import.go index cd091dc9a..acba10694 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -25,12 +25,12 @@ import ( var Importer *ctl.ImportCommand -// newImportCommand runs the Pilosa import subcommand for ingesting bulk data. +// newImportCommand runs the FeatureBase import subcommand for ingesting bulk data. func newImportCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { Importer = ctl.NewImportCommand(stdin, stdout, stderr) importCmd := &cobra.Command{ Use: "import", - Short: "Bulk load data into pilosa.", + Short: "Bulk load data into FeatureBase.", Long: `Bulk imports one or more CSV files to a host's index and field. The data of the CSV file are grouped by shard for the most efficient import. @@ -48,8 +48,8 @@ omitted. If it is present then its format should be YYYY-MM-DDTHH:MM. } flags := importCmd.Flags() - flags.StringVarP(&Importer.Host, "host", "", "localhost:10101", "host:port of Pilosa.") - flags.StringVarP(&Importer.Index, "index", "i", "", "Pilosa index to import into.") + flags.StringVarP(&Importer.Host, "host", "", "localhost:10101", "host:port of FeatureBase.") + flags.StringVarP(&Importer.Index, "index", "i", "", "FeatureBase index to import into.") flags.StringVarP(&Importer.Field, "field", "f", "", "Field to import into.") flags.BoolVar(&Importer.IndexOptions.Keys, "index-keys", false, "Specify keys=true when creating an index") flags.BoolVar(&Importer.FieldOptions.Keys, "field-keys", false, "Specify keys=true when creating a field") diff --git a/cmd/import_test.go b/cmd/import_test.go index e8c0ff2fb..9ee1323c1 100644 --- a/cmd/import_test.go +++ b/cmd/import_test.go @@ -28,7 +28,7 @@ func TestImportHelp(t *testing.T) { output, err := ExecNewRootCommand(t, "import", "--help") if !strings.Contains(output, "Usage:") || !strings.Contains(output, "Flags:") || - !strings.Contains(output, "pilosa import") || err != nil { + !strings.Contains(output, "featurebase import") || err != nil { t.Fatalf("Command 'import --help' not working, err: '%v', output: '%s'", err, output) } } diff --git a/cmd/inspect_test.go b/cmd/inspect_test.go index 4c2b64d76..7de1c25ce 100644 --- a/cmd/inspect_test.go +++ b/cmd/inspect_test.go @@ -22,7 +22,7 @@ import ( func TestInspectHelp(t *testing.T) { output, err := ExecNewRootCommand(t, "inspect", "--help") if !strings.Contains(output, "Usage:") || - !strings.Contains(output, "pilosa inspect") || err != nil { + !strings.Contains(output, "featurebase inspect") || err != nil { t.Fatalf("Command 'inspect --help' not working, err: '%v', output: '%s'", err, output) } } diff --git a/cmd/root.go b/cmd/root.go index 73b9babfc..52e4790e5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,17 +27,17 @@ import ( func NewRootCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { rc := &cobra.Command{ - Use: "pilosa", + Use: "featurebase", // TODO: These short/long descriptions could use some updating. - Short: "Pilosa - A Distributed In-memory Binary Bitmap Index.", - Long: `Pilosa is a fast index to turbocharge your database. + Short: "FeatureBase is a feature extraction and storage technology that enables real-time analytics.", + Long: `FeatureBase is a feature extraction and storage technology that enables real-time analytics. -This binary contains Pilosa itself, as well as common -tools for administering Pilosa, importing/exporting data, +This binary contains FeatureBase itself, as well as common +tools for administering FeatureBase, importing/exporting data, backing up, and more. Complete documentation is available at https://docs.molecula.cloud/. -` + pilosa.VersionInfo(false) + "\n", +` + pilosa.VersionInfo(true) + "\n", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { v := viper.New() err := setAllConfig(v, cmd.Flags()) diff --git a/cmd/server.go b/cmd/server.go index 1fe9e8400..f2a26e77d 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -30,14 +30,14 @@ import ( var Server *server.Command var holder *server.Command -// newHolderCmd creates a pilosa server for just long enough to open the +// newHolderCmd creates a FeatureBase server for just long enough to open the // holder, then shuts it down again. func newHolderCmd(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { holder = server.NewCommand(stdin, stdout, stderr) serveCmd := &cobra.Command{ Use: "holder", - Short: "Load Pilosa.", - Long: `pilosa holder starts (and immediately stops) Pilosa. + Short: "Load FeatureBase.", + Long: `featurebase holder starts (and immediately stops) FeatureBase. It opens the data directory and loads it, then shuts down immediately. This is only useful for diagnostic use. @@ -56,13 +56,13 @@ This is only useful for diagnostic use. return serveCmd } -// newServeCmd creates a pilosa server and runs it with command line flags. +// newServeCmd creates a FeatureBase server and runs it with command line flags. func newServeCmd(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { Server = server.NewCommand(stdin, stdout, stderr) serveCmd := &cobra.Command{ Use: "server", - Short: "Run Pilosa.", - Long: `pilosa server runs Pilosa. + Short: "Run FeatureBase.", + Long: `featurebase server runs FeatureBase. It will load existing data from the configured directory and start listening for client connections diff --git a/internal/clustertests/docker-compose.yml b/internal/clustertests/docker-compose.yml index 37b7519e3..0e922a999 100644 --- a/internal/clustertests/docker-compose.yml +++ b/internal/clustertests/docker-compose.yml @@ -17,7 +17,7 @@ services: networks: - pilosanet command: - - "/pilosa server --bind pilosa1:10101" + - "/featurebase server --bind pilosa1:10101" pilosa2: build: context: ../.. @@ -35,7 +35,7 @@ services: networks: - pilosanet command: - - "/pilosa server --bind pilosa2:10101" + - "/featurebase server --bind pilosa2:10101" pilosa3: build: context: ../.. @@ -53,7 +53,7 @@ services: networks: - pilosanet command: - - "/pilosa server --bind pilosa3:10101" + - "/featurebase server --bind pilosa3:10101" client1: build: context: .