Commit graph

46 commits

Author SHA1 Message Date
Fletcher Haynes
5c39a49285 Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
Lory Cloutier
b6ae088f24 FB-1766: cleaning up the CmdIO objects passing alternate stdin/
stdout/stderr around

A lot of functions in the cmd and ctl packages were passing these
around and barely using them. Replaced them with a logger for most
functions. Some functions get an io.Writer instead so that their
tests can find the output they're looking for.

More cleanup on fb-1766: reworked the tests that were using io.Pipe
or os.Pipe to check their results so they now use a bytes.Buffer.

Unexported some variables that didn't need to be exported.
Fixed NewConfigCommand to use the provided stderr, not os.Stderr.
Added tests for rbf_dump, rbf_page, and keygen, since those weren't
being tested at all.

Added chksum_test, final cleanup.

(cherry picked from commit f627199acb)
2022-12-12 09:01:20 -08:00
Seebs
3c05f1ff37 Distinguish between usage errors and other errors
Cobra automatically displays usage messages, and also a gratuitous
"Error: [...]" line in some cases, when any error at all occurs
running a command. To suppress the usage message, you have to set
cmd.SilenceUsage to true. But the code that would do this doesn't
have access to it. To address this, we introduce a category of
"usage error", implemented with stdlib error wrapping (%w) and
use errors.Is to check for it. There's also utility functions
to do this checking automatically, or indeed, to handle wrapping
of the ctl.SomethingCommand and handle running it with a suitable
context and everything.

In fact, several of the places we're checking for usage errors,
we can never actually report one, but we're checking consistently
so that if we want to report usage errors, we can.

For instance, server.Start and (dax)server.Start don't ever
return usage errors, right now, but we're checking their responses
anyway.

(cherry picked from commit c681642734)
2022-12-12 09:01:20 -08:00
Fletcher Haynes
da9b57bd45 Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
Fletcher Haynes
eb06bb50ae Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Cody Soyland
0ec9d3b7e6 Add support for TLS client certificate verification and custom CA 2019-09-24 11:09:58 -05:00
Yuce Tekol
fc231ff802
Fixes #1731 2018-11-08 17:01:05 +03:00
Travis Turner
caf8e06712
add clear functional option for imports 2018-10-23 17:37:57 -05:00
Yuce Tekol
1ad5bf20d2
Adds more tests; better help text; updated defaults for cache type, size 2018-09-06 23:19:10 +03:00
Yuce Tekol
81f126dd34
Added field options to pilosa import 2018-09-06 17:04:07 +03:00
Yuce Tekol
48bd76b967
Removed --string-keys option from pilosa import 2018-09-05 22:58:23 +03:00
Yuce Tekol
7b872e00cb
Implements #1570 2018-09-05 17:10:56 +03:00
Travis Turner
2f892e5e80
change string-keys DEPRECATED message to REMOVED 2018-08-15 14:55:02 -05:00
Travis Turner
6a327a26fe
add deprecation warnings for --string-keys flag 2018-08-15 10:31:27 -05:00
Ben Johnson
a31a08c330
Support keys on import CLI. 2018-08-14 09:32:39 -05:00
Cody Soyland
f01d850b17 Fix linter issues: gosimple 2018-07-20 09:06:43 -05:00
Cody Soyland
0b86bbb4f5 Fix linter issues: gochecknoinits 2018-07-18 11:58:27 -05:00
Cody Soyland
c86758e998 Unexport cmd.NewImportCommand 2018-07-05 23:11:56 -05:00
Travis Turner
5dd7a9556a
rename slice to shard 2018-06-28 14:07:07 -05:00
Travis Turner
50794bf63b
move fieldOptions unmarshal to the handler
validate fieldOptions in http package
2018-06-25 15:14:22 -05:00
Travis Turner
2a9b1e9e5b
final Frame to Field rename 2018-06-06 01:27:12 -05:00
Travis Turner
0d44e586cc
remove field flag from pilosa import command 2018-06-05 16:14:26 -05:00
Matt Jaffee
75e8a873b1
remove rangeEnabled option everywhere 2018-05-25 13:09:32 -05:00
Matt Jaffee
4ef266e5cc
revert a bunch of stuff and fix some comments 2018-05-24 16:35:27 -05:00
Todd Gruben
fb7bf11825 Bit -> Column migration 2018-05-23 15:05:22 -05:00
Alan Bernstein
b670afaa8d Clean up CLI 2018-05-14 17:46:11 -05:00
Travis Turner
e7151eb2a8
Remove Index.TimeQuantum 2018-04-18 08:17:26 -05:00
Matthew Jaffee
fe0ba6280f
deprecate RangeEnabled, but leave in API
the RangeEnabled option now has no effect, but it still exists in the API. A few
tests still use it to ensure this. This would only be considered a breaking
change if someone was relying on Pilosa to enforce the RangeEnabled: false
option to prevent fields being created in certain frames. This seems unlikely.
2018-04-16 16:08:04 -05:00
Travis Turner
a56410a70b
WIP: Modify pilosa import to support string rows/columns
This PR adds a flag `pilosa import --string-keys=true` which treats the
payload CSV as comma separated strings.
2018-01-22 15:34:45 -06:00
Yuce Tekol
9de9b7cc30
Deprecate index time quantum in the docs; resolves #978 2017-11-21 23:36:20 +03:00
Yuce Tekol
aa8cbe8ae3
Add TLS support for commands 2017-10-11 08:30:11 +03:00
Travis
01fa368c6a
Import FieldValues
This PR adds the ability to import field values into RangeEnabled frames
using the `pilosa import` command.

Example:
```
pilosa import -i i -f f --field foo sample-vals.csv
```
imports data from sample-vals.csv, which contains data in the format:
```
[ColumnID, Value]
```

Also fixes a bug where `frame.rangeEnabled` was not being set on frame creation.
2017-09-27 11:43:10 -05:00
Yuce Tekol
ad05938a5e
Enables auto-creating the schema on imports; Resolves #765 2017-09-22 14:56:36 +03:00
Ben Johnson
1c34ea7f8f
Add sorting flag to import command. 2017-06-08 11:00:02 -06:00
Michael Baird
59f26ce585 removed no-op stats tracking, fixed typos 2017-05-30 11:13:39 -05:00
Michael Baird
57da86dd8e cleanup merge conflict 2017-05-23 10:33:35 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Travis
2ad322c2c7
Rename DB to Index
Rename `db.go` to `index.go` and `db_test.go` to `index_test.go`
2017-04-23 21:49:27 -05:00
Ben Johnson
d34687121f
Rename bitmap/profile to row/column. 2017-04-21 21:23:24 -06:00
Matt Jaffee
60805d7f3e change port 15000 to 10101 everywhere 2017-03-17 16:43:04 -05:00
Matt Jaffee
74b79dd928 add tests for subcommands 2017-03-17 16:43:04 -05:00
Matt Jaffee
2aef65989e convert all commands to use RunE and global Command var 2017-03-17 16:43:04 -05:00
Matt Jaffee
c3b7710d67 WIP on converting commands to be non-global and testable 2017-03-17 16:43:04 -05:00
Matt Jaffee
c7caea6b30 fix short help strings on commands 2017-03-06 16:45:37 -06:00
Matt Jaffee
e349dca06a move import to subcommand 2017-03-03 14:11:12 -06:00