-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs related to zed/4758 changes #4811
Changes from all commits
b059b88
c29abb2
718889a
2f5c2c1
aa2803b
be5b0ac
0d79d38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -74,7 +74,7 @@ components come together. | |||||||||
While the CLI-first approach provides these benefits, | ||||||||||
all of the functionality is also exposed through [an API](../lake/api.md) to | ||||||||||
a Zed service. Many use cases involve an application like | ||||||||||
[Zui](https://github.com/brimdata/zui) or a | ||||||||||
[Zui](https://zui.brimdata.io/) or a | ||||||||||
programming environment like Python/Pandas interacting | ||||||||||
with the service API in place of direct use with the `zed` command. | ||||||||||
|
||||||||||
|
@@ -130,18 +130,17 @@ model onto a file system so that Zed lakes can also be deployed on standard file | |||||||||
|
||||||||||
The `zed` command provides a single command-line interface to Zed lakes, but | ||||||||||
different personalities are taken on by `zed` depending on the particular | ||||||||||
sub-command executed and the disposition of its `-lake` option | ||||||||||
(which defaults to the value of `ZED_LAKE` environment variable or, | ||||||||||
if `ZED_LAKE` is not set, to the client personality `https://localhost:9867`). | ||||||||||
sub-command executed and the [lake location](#locating-the-lake). | ||||||||||
|
||||||||||
To this end, `zed` can take on one of three personalities: | ||||||||||
|
||||||||||
* _Direct Access_ - When the lake is a storage path (`file` or `s3` URI), | ||||||||||
then the `zed` commands (except for `serve`) all operate directly on the | ||||||||||
lake located at that path. | ||||||||||
* _Client Personality_ - When the lake is an HTTP or HTTPS URL, then the | ||||||||||
lake is presumed to be a Zed lake service endpoint and the client | ||||||||||
commands are directed to the service managing the lake. | ||||||||||
* _Server Personality_ - When the `zed serve` command is executed, then | ||||||||||
* _Server Personality_ - When the [`zed serve`](#serve) command is executed, then | ||||||||||
the personality is always the server personality and the lake must be | ||||||||||
a storage path. This command initiates a continuous server process | ||||||||||
that serves client requests for the lake at the configured storage path. | ||||||||||
|
@@ -167,6 +166,25 @@ all adhere to the consistency semantics of the Zed lake. | |||||||||
> a server instance of `zed` on the same file system and data consistency will | ||||||||||
> be maintained. | ||||||||||
|
||||||||||
### Locating the Lake | ||||||||||
|
||||||||||
At times you may want the Zed CLI tools to access the same lake storage | ||||||||||
used by other tools such as [Zui](https://zui.brimdata.io/). To help | ||||||||||
enable this by default while allowing for separate lake storage when desired, | ||||||||||
`zed` checks each of the following in order to attempt to locate an existing | ||||||||||
lake. | ||||||||||
|
||||||||||
1. The contents of the `-lake` option (if specified) | ||||||||||
2. The contents of the `ZED_LAKE` environment variable (if defined) | ||||||||||
3. A Zed lake service running locally at `http://localhost:9867` (if a socket | ||||||||||
is listening at that port) | ||||||||||
4. A `zed` subdirectory below a path in the | ||||||||||
[`XDG_DATA_HOME`](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) | ||||||||||
environment variable (if defined) | ||||||||||
Comment on lines
+181
to
+183
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe tighten this?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nwt: This one was also intentionally un-tight because even on Windows the |
||||||||||
5. A default file system location based on detected OS platform: | ||||||||||
- `%LOCALAPPDATA%\zed` on Windows | ||||||||||
- `$HOME/.local/share/zed` on Linux and macOS | ||||||||||
|
||||||||||
### Data Pools | ||||||||||
|
||||||||||
A lake is made up of _data pools_, which are like "collections" in NoSQL | ||||||||||
|
@@ -415,8 +433,8 @@ without confirmation. | |||||||||
zed init [path] | ||||||||||
``` | ||||||||||
A new lake is initialized with the `init` command. The `path` argument | ||||||||||
is a [storage path](#storage-layer) and is optional. If not present, | ||||||||||
the path is taken from the `ZED_LAKE` environment variable, which must be defined. | ||||||||||
is a [storage path](#storage-layer) and is optional. If not present, the path | ||||||||||
is [determined automatically](#locating-the-lake). | ||||||||||
|
||||||||||
If the lake already exists, `init` reports an error and does nothing. | ||||||||||
|
||||||||||
|
@@ -712,7 +730,7 @@ pool `<existing>`, which may be referenced by its ID or its previous name. | |||||||||
zed serve [options] | ||||||||||
``` | ||||||||||
The `serve` command implements Zed's server personality to service requests | ||||||||||
from instances of Zed's client personality. | ||||||||||
from instances of Zed's client [personality](#zed-command-personalities). | ||||||||||
It listens for Zed lake API requests on the interface and port | ||||||||||
specified by the `-l` option, executes the requests, and returns results. | ||||||||||
|
||||||||||
|
@@ -727,8 +745,7 @@ is recommended. | |||||||||
zed use [<commitish>] | ||||||||||
``` | ||||||||||
The `use` command sets the working branch to the indicated commitish. | ||||||||||
When run without a commitish argument, it displays the current commitish | ||||||||||
in use. | ||||||||||
When run with no argument, it displays the working branch and [lake](#locating-the-lake). | ||||||||||
|
||||||||||
For example, | ||||||||||
``` | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe tighten this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nwt: I actually kept this one un-tight intentionally. During black box testing I noticed that if I run a simple program that just listens on
9867
and accepts the incoming connection, and the lake location logic makes it to this step,zed
effectively hangs indefinitely. I guess it's a hair-split to think that the text as I wrote it communicates this subtlety. But I was trying to express that all it takes is a listening socket for it to commit to this step.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philrz: That's a bug!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nwt: Cool! Glad we discussed. I've just opened #4824 to track this.