Documentation ¶
Overview ¶
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. All rights reserved.
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2021 Molecula Corp. All rights reserved.
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0 package ctl contains all pilosa subcommands other than 'server'. These are generally administration, testing, and debugging tools.
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Copyright 2022 Molecula Corp. All rights reserved.
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func BuildDAXFlags(cmd *cobra.Command, srv *server.Command)
- func BuildServerFlags(cmd *cobra.Command, srv *server.Command)
- func Post(ctx context.Context, url, contentType string, rd io.Reader, ...) error
- func SetTLSConfig(flags *pflag.FlagSet, prefix string, certificatePath *string, ...)
- type AnyClientOption
- type AuthTokenCommand
- type BackupCommand
- type BackupTarCommand
- type ChkSumCommand
- type CommandWithTLSSupport
- type ConfigCommand
- type DataframeCsvLoaderCommand
- type ExportCommand
- type GenerateConfigCommand
- type ImportCommand
- type KeygenCommand
- type Number
- type ParquetInfoCommand
- type PreSortCommand
- type RBFCheckCommand
- type RBFDumpCommand
- type RBFPageCommand
- type RBFPagesCommand
- type RestoreCommand
- type RestoreTarCommand
- type ShardDiff
- func (s *ShardDiff) IsValid(col int, row int) bool
- func (s *ShardDiff) SetFloatValue(col int, row int64, val float64)
- func (s *ShardDiff) SetIntValue(col int, row int64, val int64)
- func (s *ShardDiff) SetNulll(col int, row uint64)
- func (s *ShardDiff) SetRow(row int64)
- func (s *ShardDiff) SetStringValue(col int, row int64, val string)
- func (s *ShardDiff) Setup(schema *arrow.Schema)
- func (s *ShardDiff) Store(index string, schema *arrow.Schema, fb *client.Client) error
- type Sharder
Constants ¶
This section is empty.
Variables ¶
var ErrUsage ctlUsageError
var (
Sentinal = uint64(math.MaxUint64)
)
Functions ¶
func BuildDAXFlags ¶
BuildDAXFlags attaches a set of flags to the command for a server instance.
func BuildServerFlags ¶
BuildServerFlags attaches a set of flags to the command for a server instance.
Types ¶
type AnyClientOption ¶
type AnyClientOption interface{}
AnyClientOption can be either pilosa.InternalClientOption or pilosa.ClientOption. The internal options are specific to the featurebase client, whereas the client options are applied to the Go HTTP client that gets used under the hood.
type AuthTokenCommand ¶
type AuthTokenCommand struct { // TLS configuration. TLS server.TLSConfig // Host is the host and port of the FeatureBase node to authenticate with. Host string `json:"host"` // contains filtered or unexported fields }
AuthTokenCommand represents a command for retrieving an auth-token from a FeatureBase node.
func NewAuthTokenCommand ¶
func NewAuthTokenCommand(logdest logger.Logger) *AuthTokenCommand
NewAuthTokenCommand returns a new instance of AuthTokenCommand.
func (*AuthTokenCommand) Logger ¶
func (cmd *AuthTokenCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*AuthTokenCommand) Run ¶
func (cmd *AuthTokenCommand) Run(ctx context.Context) (err error)
Run executes the main program execution.
func (*AuthTokenCommand) TLSConfiguration ¶
func (cmd *AuthTokenCommand) TLSConfiguration() server.TLSConfig
TLSConfiguration implements the CommandWithTLSSupport interface.
func (*AuthTokenCommand) TLSHost ¶
func (cmd *AuthTokenCommand) TLSHost() string
TLSHost implements the CommandWithTLSSupport interface.
type BackupCommand ¶
type BackupCommand struct { // Destination host and port. Host string `json:"host"` // Optional Index filter Index string `json:"index"` // Path to write the backup to. OutputDir string // If true, skips file sync. NoSync bool // Number of concurrent backup goroutines running at a time. Concurrency int // Amount of time after first failed request to continue retrying. RetryPeriod time.Duration `json:"retry-period"` // Response Header Timeout for HTTP Requests HeaderTimeoutStr string HeaderTimeout time.Duration `json:"header-timeout"` // Host:port on which to listen for pprof. Pprof string `json:"pprof"` TLS server.TLSConfig AuthToken string IgnoreSpaceCheck bool // contains filtered or unexported fields }
BackupCommand represents a command for backing up a FeatureBase node.
func NewBackupCommand ¶
func NewBackupCommand(logdest logger.Logger) *BackupCommand
NewBackupCommand returns a new instance of BackupCommand.
func (*BackupCommand) Logger ¶
func (cmd *BackupCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*BackupCommand) Run ¶
func (cmd *BackupCommand) Run(ctx context.Context) (err error)
Run executes the main program execution.
func (*BackupCommand) TLSConfiguration ¶
func (cmd *BackupCommand) TLSConfiguration() server.TLSConfig
func (*BackupCommand) TLSHost ¶
func (cmd *BackupCommand) TLSHost() string
type BackupTarCommand ¶
type BackupTarCommand struct { // Destination host and port. Host string `json:"host"` // Optional Index filter Index string `json:"index"` // Path to write the backup to. OutputPath string // TempDir location of scratch files TempDir string // Amount of time after first failed request to continue retrying. RetryPeriod time.Duration `json:"retry-period"` // Response Header Timeout for HTTP Requests HeaderTimeoutStr string HeaderTimeout time.Duration `json:"header-timeout"` // Host:port on which to listen for pprof. Pprof string `json:"pprof"` TLS server.TLSConfig AuthToken string // contains filtered or unexported fields }
BackupTarCommand represents a command for backing up a Pilosa node.
func NewBackupTarCommand ¶
func NewBackupTarCommand(logwriter io.Writer) *BackupTarCommand
NewBackupTarCommand returns a new instance of BackupCommand.
func (*BackupTarCommand) Logger ¶
func (cmd *BackupTarCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*BackupTarCommand) Run ¶
func (cmd *BackupTarCommand) Run(ctx context.Context) (err error)
Run executes the main program execution.
func (*BackupTarCommand) TLSConfiguration ¶
func (cmd *BackupTarCommand) TLSConfiguration() server.TLSConfig
func (*BackupTarCommand) TLSHost ¶
func (cmd *BackupTarCommand) TLSHost() string
type ChkSumCommand ¶
type ChkSumCommand struct { // Destination host and port. Host string `json:"host"` TLS server.TLSConfig // contains filtered or unexported fields }
ChkSumCommand represents a command for backing up a Pilosa node.
func NewChkSumCommand ¶
func NewChkSumCommand(logdest logger.Logger, stdout io.Writer) *ChkSumCommand
NewChkSumCommand returns a new instance of BackupCommand.
func (*ChkSumCommand) Logger ¶
func (cmd *ChkSumCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*ChkSumCommand) Run ¶
func (cmd *ChkSumCommand) Run(ctx context.Context) (err error)
Run executes the main program execution.
func (*ChkSumCommand) TLSConfiguration ¶
func (cmd *ChkSumCommand) TLSConfiguration() server.TLSConfig
func (*ChkSumCommand) TLSHost ¶
func (cmd *ChkSumCommand) TLSHost() string
type CommandWithTLSSupport ¶
type CommandWithTLSSupport interface { TLSHost() string TLSConfiguration() server.TLSConfig Logger() logger.Logger }
CommandWithTLSSupport is the interface for commands which has TLS settings
type ConfigCommand ¶
ConfigCommand represents a command for printing a default config.
func NewConfigCommand ¶
func NewConfigCommand(stderr io.Writer) *ConfigCommand
NewConfigCommand returns a new instance of ConfigCommand.
type DataframeCsvLoaderCommand ¶ added in v3.27.0
type DataframeCsvLoaderCommand struct { Host string Index string // Filepath to the csv file Path string // max line length of csv file MaxCapacity int // Batch Size BatchSize int // Host:port on which to listen for pprof. Pprof string `json:"pprof"` TLS idk.TLSConfig AuthToken string `flag:"auth-token" help:"Authentication Token for FeatureBase"` SchemaManager idk.SchemaManager `flag:"-"` // contains filtered or unexported fields }
DataframeCsvLoaderCommand is used to load a dataframe from CSV.
func NewDataframeCsvLoaderCommand ¶ added in v3.27.0
func NewDataframeCsvLoaderCommand(logdest logger.Logger) *DataframeCsvLoaderCommand
NewDataframeCsvLoaderCommand returns a new instance of DataframeCsvLoaderCommand.
func (*DataframeCsvLoaderCommand) Logger ¶ added in v3.27.0
func (cmd *DataframeCsvLoaderCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*DataframeCsvLoaderCommand) Run ¶ added in v3.27.0
func (cmd *DataframeCsvLoaderCommand) Run(ctx context.Context) (err error)
Run executes the dataload.
func (*DataframeCsvLoaderCommand) Setup ¶ added in v3.27.0
func (cmd *DataframeCsvLoaderCommand) Setup() (err error)
type ExportCommand ¶
type ExportCommand struct { // Remote host and port. Host string // Name of the index & field to export from. Index string Field string // Filename to export to. Path string TLS server.TLSConfig // contains filtered or unexported fields }
ExportCommand represents a command for bulk exporting data from a server.
func NewExportCommand ¶
func NewExportCommand(logdest logger.Logger) *ExportCommand
NewExportCommand returns a new instance of ExportCommand.
func (*ExportCommand) Logger ¶
func (cmd *ExportCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*ExportCommand) Run ¶
func (cmd *ExportCommand) Run(ctx context.Context) error
Run executes the export.
func (*ExportCommand) TLSConfiguration ¶
func (cmd *ExportCommand) TLSConfiguration() server.TLSConfig
func (*ExportCommand) TLSHost ¶
func (cmd *ExportCommand) TLSHost() string
type GenerateConfigCommand ¶
type GenerateConfigCommand struct {
// contains filtered or unexported fields
}
GenerateConfigCommand represents a command for printing a default config.
func NewGenerateConfigCommand ¶
func NewGenerateConfigCommand(logdest logger.Logger) *GenerateConfigCommand
NewGenerateConfigCommand returns a new instance of GenerateConfigCommand.
type ImportCommand ¶
type ImportCommand struct { // Destination host and port. Host string `json:"host"` // Name of the index & field to import into. Index string `json:"index"` Field string `json:"field"` // Options for the index to be created if it doesn't exist IndexOptions pilosa.IndexOptions // Options for the field to be created if it doesn't exist FieldOptions pilosa.FieldOptions // CreateSchema ensures the schema exists before import CreateSchema bool // Clear clears the import data as opposed to setting it. Clear bool // RowColMode indicates whether to read csv values as row id, col id or use default behavior. RowColMode bool // Filenames to import from. Paths []string `json:"paths"` // Size of buffer used to chunk import. BufferSize int `json:"bufferSize"` // Enables sorting of data file before import. Sort bool `json:"sort"` TLS server.TLSConfig AuthToken string // contains filtered or unexported fields }
ImportCommand represents a command for bulk importing data.
func NewImportCommand ¶
func NewImportCommand(logdest logger.Logger) *ImportCommand
NewImportCommand returns a new instance of ImportCommand.
func (*ImportCommand) Logger ¶
func (cmd *ImportCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*ImportCommand) Run ¶
func (cmd *ImportCommand) Run(ctx context.Context) error
Run executes the main program execution.
func (*ImportCommand) TLSConfiguration ¶
func (cmd *ImportCommand) TLSConfiguration() server.TLSConfig
func (*ImportCommand) TLSHost ¶
func (cmd *ImportCommand) TLSHost() string
type KeygenCommand ¶
type KeygenCommand struct { KeyLength int // contains filtered or unexported fields }
KeygenCommand represents a command for generating a cryptographic key.
func NewKeygenCommand ¶
func NewKeygenCommand(logdest logger.Logger) *KeygenCommand
NewKeygen returns a new instance of Keygen.
type ParquetInfoCommand ¶ added in v3.30.0
type ParquetInfoCommand struct { // Filepath or URL to the parquet file. Path string // contains filtered or unexported fields }
ParquetInfoCommand represents a command for displaying info about a parquet file
func NewParquetInfoCommand ¶ added in v3.30.0
func NewParquetInfoCommand(logdest logger.Logger) *ParquetInfoCommand
NewParquetInfoCommand returns a new instance of ParquetInfoCommand.
type PreSortCommand ¶ added in v3.29.0
type PreSortCommand struct { // Optional Index filter File string Type string Table string PrimaryKeyFields []string PrimaryKeySeparator string PartitionN int JobSize int NumWorkers int // Path to write sorted files to OutputDir string // contains filtered or unexported fields }
func NewPreSortCommand ¶ added in v3.29.0
func NewPreSortCommand(logdest logger.Logger) *PreSortCommand
NewPreSortCommand returns a new instance of PreSortCommand.
func (*PreSortCommand) Run ¶ added in v3.29.0
func (cmd *PreSortCommand) Run(ctx context.Context) error
Run executes the main program execution.
func (*PreSortCommand) RunCSV ¶ added in v3.29.0
func (cmd *PreSortCommand) RunCSV(filelist []string) error
type RBFCheckCommand ¶
type RBFCheckCommand struct { // Filepath to the RBF database. Path string // contains filtered or unexported fields }
RBFCheckCommand represents a command for running a consistency check on RBF.
func NewRBFCheckCommand ¶
func NewRBFCheckCommand(logdest logger.Logger) *RBFCheckCommand
NewRBFCheckCommand returns a new instance of RBFCheckCommand.
type RBFDumpCommand ¶
type RBFDumpCommand struct { // Filepath to the RBF database. Path string // Page numbers to print. Pgnos []uint32 // contains filtered or unexported fields }
RBFDumpCommand represents a command for dumping raw data for an RBF page.
func NewRBFDumpCommand ¶
func NewRBFDumpCommand(logdest logger.Logger) *RBFDumpCommand
NewRBFDumpCommand returns a new instance of RBFDumpCommand.
type RBFPageCommand ¶
type RBFPageCommand struct { // Filepath to the RBF database. Path string // Page numbers to print. Pgnos []uint32 // contains filtered or unexported fields }
RBFPageCommand represents a command for printing data for a single RBF page.
func NewRBFPageCommand ¶
func NewRBFPageCommand(logdest logger.Logger) *RBFPageCommand
NewRBFPageCommand returns a new instance of RBFPageCommand.
type RBFPagesCommand ¶
type RBFPagesCommand struct { // Filepath to the RBF database. Path string // Print the b-tree key with each row. WithTree bool // contains filtered or unexported fields }
RBFPagesCommand represents a command for printing a list of RBF page metadata.
func NewRBFPagesCommand ¶
func NewRBFPagesCommand(logdest logger.Logger) *RBFPagesCommand
NewRBFPagesCommand returns a new instance of RBFPagesCommand.
type RestoreCommand ¶
type RestoreCommand struct { Host string Concurrency int // Filepath to the backup file. Path string // Amount of time after first failed request to continue retrying. RetryPeriod time.Duration `json:"retry-period"` // Host:port on which to listen for pprof. Pprof string `json:"pprof"` TLS server.TLSConfig AuthToken string // contains filtered or unexported fields }
RestoreCommand represents a command for restoring a backup to
func NewRestoreCommand ¶
func NewRestoreCommand(logdest logger.Logger) *RestoreCommand
NewRestoreCommand returns a new instance of RestoreCommand.
func (*RestoreCommand) Logger ¶
func (cmd *RestoreCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*RestoreCommand) Run ¶
func (cmd *RestoreCommand) Run(ctx context.Context) (err error)
Run executes the restore.
func (*RestoreCommand) TLSConfiguration ¶
func (cmd *RestoreCommand) TLSConfiguration() server.TLSConfig
func (*RestoreCommand) TLSHost ¶
func (cmd *RestoreCommand) TLSHost() string
type RestoreTarCommand ¶
type RestoreTarCommand struct { Host string // Filepath to the backup file. Path string // Amount of time after first failed request to continue retrying. RetryPeriod time.Duration `json:"retry-period"` // Host:port on which to listen for pprof. Pprof string `json:"pprof"` TLS server.TLSConfig AuthToken string // TempDir location of scratch files TempDir string // contains filtered or unexported fields }
RestoreTarCommand represents a command for restoring a backup to
func NewRestoreTarCommand ¶
func NewRestoreTarCommand(logdest logger.Logger) *RestoreTarCommand
NewRestoreTarCommand returns a new instance of RestoreTarCommand.
func (*RestoreTarCommand) Logger ¶
func (cmd *RestoreTarCommand) Logger() logger.Logger
Logger returns the command's associated Logger to maintain CommandWithTLSSupport interface compatibility
func (*RestoreTarCommand) Run ¶
func (cmd *RestoreTarCommand) Run(ctx context.Context) (err error)
Run executes the restore.
func (*RestoreTarCommand) TLSConfiguration ¶
func (cmd *RestoreTarCommand) TLSConfiguration() server.TLSConfig
func (*RestoreTarCommand) TLSHost ¶
func (cmd *RestoreTarCommand) TLSHost() string
type ShardDiff ¶ added in v3.27.0
type ShardDiff struct {
// contains filtered or unexported fields
}