Skip to content

Commit e5a02b7

Browse files
committed
AUTO: Sync ScalarDL docs in Japanese to docs site repo
1 parent 828c2ca commit e5a02b7

File tree

2 files changed

+437
-0
lines changed

2 files changed

+437
-0
lines changed
Lines changed: 319 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,319 @@
1+
---
2+
tags:
3+
- Community
4+
- Enterprise
5+
displayed_sidebar: docsJapanese
6+
---
7+
8+
# ScalarDL HashStore コマンドリファレンス
9+
10+
import TranslationBanner from '/src/components/_translation-ja-jp.mdx';
11+
12+
<TranslationBanner />
13+
14+
このページでは、ScalarDL HashStore とやりとりするためのクライアントコマンドである `scalardl-hashstore` について説明します。
15+
16+
## コマンドの概要
17+
18+
- **HashStore のブートストラップ**
19+
- [`bootstrap`](#bootstrap): HashStore を使用するために必要な ID と事前定義されたコントラクトを登録してブートストラップを実行します。
20+
- **オブジェクトの管理**
21+
- [`get-object`](#get-object): HashStore からオブジェクトを取得します。
22+
- [`put-object`](#put-object): HashStore にオブジェクトを保存します。
23+
- [`compare-object-versions`](#compare-object-versions): オブジェクトのバージョンを比較します。
24+
- **コレクションの管理**
25+
- [`create-collection`](#create-collection): 新しいコレクションを作成します。
26+
- [`get-collection`](#get-collection): HashStore からコレクションを取得します。
27+
- [`add-to-collection`](#add-to-collection): オブジェクトをコレクションに追加します。
28+
- [`remove-from-collection`](#remove-from-collection): コレクションからオブジェクトを削除します。
29+
- [`get-collection-history`](#get-collection-history): コレクションの履歴を取得します。
30+
- **台帳の検証**
31+
- [`validate-ledger`](#validate-ledger): HashStore 内の指定されたオブジェクトまたはコレクションを検証します。
32+
33+
## `bootstrap`
34+
35+
HashStore を使用するために必要な ID と事前定義されたコントラクトを登録してブートストラップを実行します。
36+
37+
### オプション
38+
39+
| オプション | 説明 |
40+
|:---------------------------|:-------------------------------------------|
41+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
42+
43+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
44+
45+
###
46+
47+
```console
48+
scalardl-hashstore bootstrap --properties client.properties
49+
```
50+
51+
## `get-object`
52+
53+
HashStore からオブジェクトを取得します。
54+
55+
### オプション
56+
57+
| オプション | 説明 |
58+
|:---------------------------|:-------------------------------------------|
59+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
60+
| `--object-id` | 取得するオブジェクトの ID。 |
61+
62+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
63+
64+
###
65+
66+
```console
67+
scalardl-hashstore get-object --properties client.properties --object-id foo
68+
```
69+
70+
## `put-object`
71+
72+
HashStore にオブジェクトを保存します。
73+
74+
### オプション
75+
76+
| オプション | 説明 |
77+
|:---------------------------|:------------------------------------------------------------|
78+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
79+
| `--object-id` | 保存するオブジェクトの ID。 |
80+
| `--hash` | オブジェクトのハッシュ値。 |
81+
| `--metadata` | オプションのメタデータ (JSON 文字列)。 |
82+
| `--put-to-mutable` | ミュータブルデータベースに対するオプションの Put 操作 (JSON 文字列)。 |
83+
84+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
85+
86+
###
87+
88+
ハッシュ値を持つオブジェクトを保存します。
89+
90+
```console
91+
scalardl-hashstore put-object --properties client.properties --object-id foo --hash b97a42c87a46ffebe1439f8c1cd2f86e2f9b84dad89c8e9ebb257a19b6fdfe1c
92+
```
93+
94+
メタデータを持つオブジェクトを保存します。
95+
96+
```console
97+
scalardl-hashstore put-object --properties client.properties --object-id foo --hash b97a42c87a46ffebe1439f8c1cd2f86e2f9b84dad89c8e9ebb257a19b6fdfe1c --metadata '{"note": "updated"}'
98+
```
99+
100+
## `compare-object-versions`
101+
102+
オブジェクトのバージョンを比較します。
103+
104+
### オプション
105+
106+
| オプション | 説明 |
107+
|:---------------------------|:--------------------------------------------------------------|
108+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
109+
| `--object-id` | バージョンを比較するオブジェクトの ID。 |
110+
| `--versions` | 比較するオブジェクトのバージョン (JSON 配列)。 |
111+
| `--all` | 台帳に保存されているすべてのバージョンを含めて比較します。 |
112+
| `--verbose` | 詳細な検証情報を表示します。 |
113+
114+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
115+
116+
###
117+
118+
引数で指定された最新バージョンを比較します。
119+
120+
```console
121+
scalardl-hashstore compare-object-versions --properties client.properties --object-id foo --versions '[{"version_id": "v1", "hash_value": "hash1"}, {"version_id": "v2", "hash_value": "hash2", "metadata": {"note": "updated"}}]'
122+
```
123+
124+
HashStore に保存されているすべてのバージョンを比較します。
125+
126+
```console
127+
scalardl-hashstore compare-object-versions --properties client.properties --object-id foo --versions '[{"version_id": "v1", "hash_value": "hash1"}, {"version_id": "v2", "hash_value": "hash2", "metadata": {"note": "updated"}}]' --all
128+
```
129+
130+
詳細出力で比較します。
131+
132+
```console
133+
scalardl-hashstore compare-object-versions --properties client.properties --object-id foo --versions '[{"version_id": "v1", "hash_value": "hash1"}]' --verbose
134+
```
135+
136+
## `create-collection`
137+
138+
新しいコレクションを作成します。
139+
140+
### オプション
141+
142+
| オプション | 説明 |
143+
|:---------------------------|:-------------------------------------------|
144+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
145+
| `--collection-id` | 作成するコレクションの ID。 |
146+
| `--object-ids` | コレクションに含めるオブジェクト ID。 |
147+
148+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
149+
150+
###
151+
152+
空のコレクションを作成します。
153+
154+
```console
155+
scalardl-hashstore create-collection --properties client.properties --collection-id audit_set
156+
```
157+
158+
初期オブジェクトを含むコレクションを作成します。
159+
160+
```console
161+
scalardl-hashstore create-collection --properties client.properties --collection-id audit_set --object-ids object1 --object-ids object2
162+
```
163+
164+
## `get-collection`
165+
166+
HashStore からコレクションを取得します。
167+
168+
### オプション
169+
170+
| オプション | 説明 |
171+
|:---------------------------|:-------------------------------------------|
172+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
173+
| `--collection-id` | 取得するコレクションの ID。 |
174+
175+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
176+
177+
###
178+
179+
```console
180+
scalardl-hashstore get-collection --properties client.properties --collection-id audit_set
181+
```
182+
183+
## `add-to-collection`
184+
185+
オブジェクトをコレクションに追加します。
186+
187+
### オプション
188+
189+
| オプション | 説明 |
190+
|:---------------------------|:--------------------------------------------------------------------|
191+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
192+
| `--collection-id` | コレクションの ID。 |
193+
| `--object-ids` | コレクションに追加するオブジェクト ID。 |
194+
| `--force` | コレクションに既に存在する重複オブジェクト ID の検証をスキップします。 |
195+
196+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
197+
198+
###
199+
200+
オブジェクトをコレクションに追加します。
201+
202+
```console
203+
scalardl-hashstore add-to-collection --properties client.properties --collection-id audit_set --object-ids object3 --object-ids object4
204+
```
205+
206+
force オプションを使用してオブジェクトを追加します。
207+
208+
```console
209+
scalardl-hashstore add-to-collection --properties client.properties --collection-id audit_set --object-ids object3 --force
210+
```
211+
212+
## `remove-from-collection`
213+
214+
コレクションからオブジェクトを削除します。
215+
216+
### オプション
217+
218+
| オプション | 説明 |
219+
|:---------------------------|:---------------------------------------------------------------|
220+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
221+
| `--collection-id` | コレクションの ID。 |
222+
| `--object-ids` | コレクションから削除するオブジェクト ID。 |
223+
| `--force` | コレクションに存在しないオブジェクト ID の検証をスキップします。 |
224+
225+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
226+
227+
###
228+
229+
コレクションからオブジェクトを削除します。
230+
231+
```console
232+
scalardl-hashstore remove-from-collection --properties client.properties --collection-id audit_set --object-ids object1 --object-ids object2
233+
```
234+
235+
force オプションを使用してオブジェクトを削除します。
236+
237+
```console
238+
scalardl-hashstore remove-from-collection --properties client.properties --collection-id audit_set --object-ids object1 --force
239+
```
240+
241+
## `get-collection-history`
242+
243+
コレクションの履歴を取得します。
244+
245+
### オプション
246+
247+
| オプション | 説明 |
248+
|:---------------------------|:----------------------------------------------------|
249+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
250+
| `--collection-id` | コレクションの ID。 |
251+
| `--limit` | 取得する最新の履歴エントリの最大数。 |
252+
253+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
254+
255+
###
256+
257+
コレクションのすべての履歴を取得します。
258+
259+
```console
260+
scalardl-hashstore get-collection-history --properties client.properties --collection-id audit_set
261+
```
262+
263+
コレクションの限定された履歴を取得します。
264+
265+
```console
266+
scalardl-hashstore get-collection-history --properties client.properties --collection-id audit_set --limit 10
267+
```
268+
269+
## `validate-ledger`
270+
271+
HashStore 内の指定されたオブジェクトまたはコレクションを検証します。
272+
273+
### オプション
274+
275+
| オプション | 説明 |
276+
|:---------------------------|:-------------------------------------------|
277+
| `--config`, `--properties` | .properties 形式の設定ファイル。 |
278+
| `--object-id` | 検証するオブジェクトの ID。 |
279+
| `--collection-id` | 検証するコレクションの ID。 |
280+
| `--start-age` | 検証範囲の開始世代。 |
281+
| `--end-age` | 検証範囲の終了世代。 |
282+
283+
[共通ユーティリティオプション](#共通ユーティリティオプション)も利用できます。
284+
285+
###
286+
287+
すべての世代のオブジェクトを検証します。
288+
289+
```console
290+
scalardl-hashstore validate-ledger --properties client.properties --object-id foo
291+
```
292+
293+
世代 0 から世代 10 までのオブジェクトのみを検証します。
294+
295+
```console
296+
scalardl-hashstore validate-ledger --properties client.properties --object-id foo --start-age 0 --end-age 10
297+
```
298+
299+
すべての世代のコレクションを検証します。
300+
301+
```console
302+
scalardl-hashstore validate-ledger --properties client.properties --collection-id audit_set
303+
```
304+
305+
世代 0 から世代 5 までのコレクションのみを検証します。
306+
307+
```console
308+
scalardl-hashstore validate-ledger --properties client.properties --collection-id audit_set --start-age 0 --end-age 5
309+
```
310+
311+
## 共通ユーティリティオプション
312+
313+
上記のすべてのコマンドで、以下のオプションを使用できます。
314+
315+
| オプション | 説明 |
316+
|:----------------------|:--------------------------------------------|
317+
| `-g`, `--use-gateway` | ゲートウェイを使用するオプション。 |
318+
| `-h`, `--help` | コマンドのヘルプメッセージを表示します。 |
319+
| `--stacktrace` | Java スタックトレースを `stderr` ストリームに出力します。 |

0 commit comments

Comments
 (0)