mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 16:45:55 +00:00
Merge branch 'master' into ma/cloud-109
This commit is contained in:
commit
bce6d91618
16 changed files with 42 additions and 42 deletions
|
|
@ -14,7 +14,7 @@ RUN cd /go/src/github.com/molecula/featurebase \
|
|||
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"]
|
||||
|
|
|
|||
12
Makefile
12
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <path> [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.
|
||||
`,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
`,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
cmd/root.go
12
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())
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue