-
Notifications
You must be signed in to change notification settings - Fork 37
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
Revise Schema Loader documentation #1196
Conversation
[skip ci]
docs/schema-loader.md
Outdated
<div id="tabset-1"> | ||
<div class="tab"> | ||
<button class="tablinks" onclick="openTab(event, 'Install', 'tabset-1')" id="defaultOpen-1">Install</button> | ||
<button class="tablinks" onclick="openTab(event, 'Build', 'tabset-1')">Build</button> | ||
<button class="tablinks" onclick="openTab(event, 'Docker', 'tabset-1')">Docker</button> | ||
</div> | ||
|
||
<div id="Install" class="tabcontent" markdown="1"> | ||
|
||
You can download the release versions of Schema Loader from the [ScalarDB Releases](https://github.com/scalar-labs/scalardb/releases) page. | ||
</div> | ||
<div id="Build" class="tabcontent" markdown="1"> | ||
|
||
If you want to build Schema Loader from the source, run the following command: | ||
|
||
In case you want to build `schema-loader` from the source: | ||
```console | ||
$ ./gradlew schema-loader:shadowJar | ||
``` | ||
- The built fat jar file is `schema-loader/build/libs/scalardb-schema-loader-<version>.jar` | ||
|
||
## Docker | ||
Running that command builds a fat JAR file named `scalardb-schema-loader-<VERSION>.jar` in the `schema-loader/build/libs` folder, with `<VERSION>` matching the version of ScalarDB that you are using. | ||
</div> | ||
<div id="Docker" class="tabcontent" markdown="1"> | ||
|
||
You can pull the Docker image from the [Scalar container registry](https://github.com/orgs/scalar-labs/packages/container/package/scalardb-schema-loader) by running the following command, replacing the contents in the angle brackets as described: | ||
|
||
You can pull the docker image from [Scalar's container registry](https://github.com/orgs/scalar-labs/packages/container/package/scalardb-schema-loader). | ||
```console | ||
docker run --rm -v <your_local_schema_file_path>:<schema_file_path_in_docker> [-v <your_local_config_file_path>:<config_file_path_in_docker>] ghcr.io/scalar-labs/scalardb-schema-loader:<version> <command_arguments> | ||
docker run --rm -v <PATH_TO_YOUR_LOCAL_SCHEMA_FILE>:<PATH_TO_SCHEMA_FILE_DOCKER> [-v <PATH_TO_YOUR_LOCAL_PROPERTIES_FILE>:<PATH_TO_PROPERTIES_FILE_IN_DOCKER>] ghcr.io/scalar-labs/scalardb-schema-loader:<VERSION> <COMMAND_ARGUMENTS> | ||
``` | ||
- Note that you can specify the same command arguments even if you use the fat jar or the container. The example commands in the next section are shown with a jar, but you can run the commands with the container in the same way by replacing `java -jar scalardb-schema-loader-<version>.jar` with `docker run --rm -v <your_local_schema_file_path>:<schema_file_path_in_docker> [-v <your_local_config_file_path>:<config_file_path_in_docker>] ghcr.io/scalar-labs/scalardb-schema-loader:<version>`. | ||
|
||
You can also build the docker image as follows. | ||
{% capture notice--info %} | ||
**Note** | ||
|
||
You can specify the same command arguments even if you use the fat JAR or the container. In the [Available commands](#available-commands) section, the JAR is used, but you can run the commands by using the container in the same way by replacing `java -jar scalardb-schema-loader-<VERSION>.jar` with `docker run --rm -v <PATH_TO_YOUR_LOCAL_SCHEMA_FILE>:<PATH_TO_SCHEMA_FILE_DOCKER> [-v <PATH_TO_YOUR_LOCAL_PROPERTIES_FILE>:<PATH_TO_PROPERTIES_FILE_IN_DOCKER>] ghcr.io/scalar-labs/scalardb-schema-loader:<VERSION>`. | ||
{% endcapture %} | ||
|
||
<div class="notice--info">{{ notice--info | markdownify }}</div> | ||
|
||
You can also build the Docker image as follows by running the following command: | ||
|
||
```console | ||
$ ./gradlew schema-loader:docker | ||
``` | ||
</div> | ||
</div> |
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.
Note
This part within the
<div>
tags contains the three methods for setting up Schema Loader. On the docs site, these three methods will appear as tabbed content, allowing users to select their preferred setup method.
docs/schema-loader.md
Outdated
<div id="tabset-2"> | ||
<div class="tab"> | ||
<button class="tablinks" onclick="openTab(event, 'Cassandra', 'tabset-2')" id="defaultOpen-2">Cassandra</button> | ||
<button class="tablinks" onclick="openTab(event, 'Cosmos DB for NoSQL', 'tabset-2')">Cosmos DB for NoSQL</button> | ||
<button class="tablinks" onclick="openTab(event, 'DynamoDB', 'tabset-2')">DynamoDB</button> | ||
<button class="tablinks" onclick="openTab(event, 'JDBC_databases', 'tabset-2')">JDBC databases</button> | ||
</div> | ||
|
||
For Cassandra: | ||
- `compaction-strategy`, a compaction strategy. It should be `STCS` (SizeTieredCompaction), `LCS` (LeveledCompactionStrategy) or `TWCS` (TimeWindowCompactionStrategy). | ||
<div id="Cassandra" class="tabcontent" markdown="1"> | ||
|
||
For DynamoDB and Cosmos DB for NoSQL: | ||
- `ru`, a request unit. Please see [RU](#ru) for the details. | ||
The `compaction-strategy` option is the compaction strategy used. This option should be `STCS` (SizeTieredCompaction), `LCS` (LeveledCompactionStrategy), or `TWCS` (TimeWindowCompactionStrategy). | ||
</div> | ||
<div id="Cosmos DB for NoSQL" class="tabcontent" markdown="1"> | ||
|
||
## Scaling Performance | ||
The `ru` option stands for Request Units. For details, see [RUs](#rus). | ||
</div> | ||
<div id="DynamoDB" class="tabcontent" markdown="1"> | ||
|
||
### RU | ||
The `ru` option stands for Request Units. For details, see [RUs](#rus). | ||
</div> | ||
<div id="JDBC_databases" class="tabcontent" markdown="1"> | ||
|
||
You can scale the throughput of Cosmos DB for NoSQL and DynamoDB by specifying `--ru` option (which applies to all the tables) or `ru` parameter for each table. The default values are `400` for Cosmos DB for NoSQL and `10` for DynamoDB respectively, which are set without `--ru` option. | ||
No options are available for JDBC databases. | ||
</div> | ||
</div> |
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.
Note
This part within the
<div>
tags contains the options that users can specify for each database. On the docs site, these databases will appear as tabbed content, allowing users to select one of the databases.
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.
Overall, it looks good! I left several comments while approving the PR. PTAL!
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.
Left several comments. Please take a look when you have time!
[skip ci]
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.
Overall, looking good! Thank you!
Left one comment, so PTAL!
[skip ci]
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.
LGTM! Thank you!
[skip ci]
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.
Other than what I commented, LGTM! Thank you!
[skip ci] Remove a part about building the Docker image for Schema Loader.
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.
LGTM! Thank you!
[skip ci] Remove mentions of features not available for this version of ScalarDB.
[skip ci] Remove mentions of features not available for this version of ScalarDB.
[skip ci] Remove mentions of features not available for this version of ScalarDB.
[skip ci] Remove mentions of features not available for this version of ScalarDB.
Description
This PR revises the Schema Loader document.
Related issues and/or PRs
N/A
Changes made
The following is a screenshot of
schema-loader.md
on the docs site (locally).Checklist
Additional notes (optional)
Please see the comments in the document.
Release notes
N/A