From 124fd6a351fd9d34a10713da6aa77403606ced3b Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 28 Jun 2017 15:44:39 -0500 Subject: [PATCH 1/4] Add brief explanations for query parameters on the query endpoint --- docs/api-reference.md | 4 ++++ docs/data-model.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index 39f66683f..afc4d9f1a 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -93,6 +93,10 @@ In order to send protobuf binaries in the request and response, set `Content-Typ The response doesn't include column attributes by default. To return them, set `columnAttrs` query argument to `true`. +The query is executed for all [slices](data-model#slice) by default. To use specified slices only, set `slices` query argument to a comma-separated list of slice indices. + +The time quantum can be specified with the `time_granularity`. Valid values match those for the [time-quantum](#/index//time-quantum) endpoint. + Request: ``` curl localhost:10101/index/user/query?columnAttrs=true \ diff --git a/docs/data-model.md b/docs/data-model.md index b4b98de9a..2779f17ad 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -54,7 +54,7 @@ Attributes are arbitrary key/value pairs that can be associated to both rows or ### Slice -Indexes are sharded into groups of columns called Slices - each Slice contains a fixed number of columns which is the SliceWidth. +Indexes are sharded into groups of columns called Slices - each Slice contains a fixed number of columns which is the SliceWidth. SliceWidth is a non-configurable constant set to 2^20. Columns are sharded on a preset width, and each shard is referred to as a Slice. Slices are operated on in parallel, and they are evenly distributed across a cluster via a consistent hash algorithm. From f70c4e637b8201ddb110e7c790051fef6a0a5092 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 28 Jun 2017 16:08:07 -0500 Subject: [PATCH 2/4] Formatting and link tweaks --- docs/api-reference.md | 6 +++--- docs/data-model.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index afc4d9f1a..5871fd309 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -93,13 +93,13 @@ In order to send protobuf binaries in the request and response, set `Content-Typ The response doesn't include column attributes by default. To return them, set `columnAttrs` query argument to `true`. -The query is executed for all [slices](data-model#slice) by default. To use specified slices only, set `slices` query argument to a comma-separated list of slice indices. +The query is executed for all [slices](../data-model#slice) by default. To use specified slices only, set `slices` query argument to a comma-separated list of slice indices. -The time quantum can be specified with the `time_granularity`. Valid values match those for the [time-quantum](#/index//time-quantum) endpoint. +The time quantum can be specified with the `time_granularity`. Valid values match those for the `time-quantum` endpoint. Request: ``` -curl localhost:10101/index/user/query?columnAttrs=true \ +curl "localhost:10101/index/user/query?columnAttrs=true&slices=0,1" \ -X POST \ -d 'Bitmap(frame="language", id=5)' ``` diff --git a/docs/data-model.md b/docs/data-model.md index 2779f17ad..f8987f87b 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -54,7 +54,7 @@ Attributes are arbitrary key/value pairs that can be associated to both rows or ### Slice -Indexes are sharded into groups of columns called Slices - each Slice contains a fixed number of columns which is the SliceWidth. SliceWidth is a non-configurable constant set to 2^20. +Indexes are sharded into groups of columns called Slices - each Slice contains a fixed number of columns which is the SliceWidth. SliceWidth is a non-configurable constant set to 220. Columns are sharded on a preset width, and each shard is referred to as a Slice. Slices are operated on in parallel, and they are evenly distributed across a cluster via a consistent hash algorithm. From af0e53120dd6de66730cb9c2d7def2575e433c6c Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 28 Jun 2017 16:09:15 -0500 Subject: [PATCH 3/4] Tweak wording --- docs/api-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index 5871fd309..96ca16229 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -91,11 +91,11 @@ Response: In order to send protobuf binaries in the request and response, set `Content-Type` and `Accept` headers to: `application/x-protobuf`. -The response doesn't include column attributes by default. To return them, set `columnAttrs` query argument to `true`. +The response doesn't include column attributes by default. To return them, set the `columnAttrs` query argument to `true`. -The query is executed for all [slices](../data-model#slice) by default. To use specified slices only, set `slices` query argument to a comma-separated list of slice indices. +The query is executed for all [slices](../data-model#slice) by default. To use specified slices only, set the `slices` query argument to a comma-separated list of slice indices. -The time quantum can be specified with the `time_granularity`. Valid values match those for the `time-quantum` endpoint. +The time quantum can be specified with the `time_granularity` query argument. Valid values match those for the `time-quantum` endpoint. Request: ``` From 264c657500c3f03ff3667479db63ca214a9ed500 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Wed, 28 Jun 2017 17:26:12 -0500 Subject: [PATCH 4/4] De-document unused query argument --- docs/api-reference.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/api-reference.md b/docs/api-reference.md index 96ca16229..adea42ff4 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -95,8 +95,6 @@ The response doesn't include column attributes by default. To return them, set t The query is executed for all [slices](../data-model#slice) by default. To use specified slices only, set the `slices` query argument to a comma-separated list of slice indices. -The time quantum can be specified with the `time_granularity` query argument. Valid values match those for the `time-quantum` endpoint. - Request: ``` curl "localhost:10101/index/user/query?columnAttrs=true&slices=0,1" \