Skip to content

Commit 59a6369

Browse files
authored
Merge pull request #3411 from ClickHouse/translate_ja
move images to static
2 parents eeef9d1 + 32e8972 commit 59a6369

30 files changed

+107
-77437
lines changed

docs/chdb/guides/jupysql.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: How to install chDB for Bun
66
keywords: [chdb, JupySQL]
77
---
88

9+
import PlayersPerRank from '@site/static/images/chdb/guides/players_per_rank.png';
10+
911
[JupySQL](https://jupysql.ploomber.io/en/latest/quick-start.html) is a Python library that lets you run SQL in Jupyter notebooks and the IPython shell.
1012
In this guide, we're going to learn how to query data using chDB and JupySQL.
1113

@@ -71,7 +73,7 @@ Next, let's import the `dbapi` module for chDB:
7173
from chdb import dbapi
7274
```
7375

74-
And we'll create a chDB connection.
76+
And we'll create a chDB connection.
7577
Any data that we persist will be saved to the `atp.chdb` directory:
7678

7779
```python
@@ -93,7 +95,7 @@ Next, we'll display the display limit so that results of queries won't be trunca
9395

9496
## Querying data in CSV files {#querying-data-in-csv-files}
9597

96-
We've downloaded a bunch of files with the `atp_rankings` prefix.
98+
We've downloaded a bunch of files with the `atp_rankings` prefix.
9799
Let's use the `DESCRIBE` clause to understand the schema:
98100

99101

@@ -273,7 +275,7 @@ We're going to write a query that finds the maximum points accumulate by each pl
273275

274276
```python
275277
%%sql
276-
SELECT name_first, name_last,
278+
SELECT name_first, name_last,
277279
max(points) as maxPoints,
278280
argMax(rank, points) as rank,
279281
argMax(ranking_date, points) as date
@@ -305,12 +307,12 @@ It's quite interesting that some of the players in this list accumulated a lot o
305307

306308
## Saving queries {#saving-queries}
307309

308-
We can save queries using the `--save` parameter on the same line as the `%%sql` magic.
310+
We can save queries using the `--save` parameter on the same line as the `%%sql` magic.
309311
The `--no-execute` parameter means that query execution will be skipped.
310312

311313
```python
312314
%%sql --save best_points --no-execute
313-
SELECT name_first, name_last,
315+
SELECT name_first, name_last,
314316
max(points) as maxPoints,
315317
argMax(rank, points) as rank,
316318
argMax(ranking_date, points) as date
@@ -357,7 +359,7 @@ Parameters are just normal variables:
357359
rank = 10
358360
```
359361

360-
And then we can use the `{{variable}}` syntax in our query.
362+
And then we can use the `{{variable}}` syntax in our query.
361363
The following query finds the players who had the least number of days between when they first had a ranking in the top 10 and last had a ranking in the top 10:
362364

363365
```python
@@ -422,4 +424,4 @@ plot = (
422424
)
423425
```
424426

425-
<img src={require('./images/players_per_rank.png').default} class="image" alt="Migrating Self-managed ClickHouse" style={{width: '90%', padding: '30px'}}/>
427+
<img src={PlayersPerRank} alt="Histogram of player rankings in ATP dataset" class="image" style={{width: '90%', padding: '30px'}} />

docs/data-compression/compression-modes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: ClickHouse column compression modes
66
keywords: [compression, codec, encoding, modes]
77
---
88

9+
import CompressionBlock from '@site/static/images/data-compression/ch_compression_block.png';
10+
911
# Compression modes
1012

1113
ClickHouse protocol supports **data blocks** compression with checksums.
@@ -41,7 +43,7 @@ From [Facebook benchmarks](https://facebook.github.io/zstd/#benchmarks):
4143
| mode | byte | Compression mode |
4244
| compressed_data | binary | Block of compressed data |
4345

44-
![compression block diagram](./images/ch_compression_block.png)
46+
<img src={CompressionBlock} alt="Diagram illustrating ClickHouse compression block structure" />
4547

4648
Header is (raw_size + data_size + mode), raw size consists of len(header + compressed_data).
4749

docs/deployment-guides/horizontal-scaling.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Scaling out
66
---
77
import ReplicationShardingTerminology from '@site/docs/_snippets/_replication-sharding-terminology.md';
88
import ConfigFileNote from '@site/docs/_snippets/_config-files.md';
9-
9+
import scalingOut1 from '@site/static/images/deployment-guides/scaling-out-1.png';
1010

1111
## Description {#description}
1212
This example architecture is designed to provide scalability. It includes three nodes: two combined ClickHouse plus coordination (ClickHouse Keeper) servers, and a third server with only ClickHouse Keeper to finish the quorum of three. With this example, we'll create a database, table, and a distributed table that will be able to query the data on both of the nodes.
@@ -17,7 +17,8 @@ This example architecture is designed to provide scalability. It includes three
1717

1818
## Environment {#environment}
1919
### Architecture Diagram {#architecture-diagram}
20-
![Architecture diagram for 2 shards and 1 replica](@site/docs/deployment-guides/images/scaling-out-1.png)
20+
21+
<img src={scalingOut1} alt="Architecture diagram for 2 shards and 1 replica" />
2122

2223
|Node|Description|
2324
|----|-----------|
@@ -31,7 +32,7 @@ In production environments we strongly recommend that ClickHouse Keeper runs on
3132

3233
## Install {#install}
3334

34-
Install Clickhouse on three servers following the [instructions for your archive type](/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gz, etc.). For this example, you will follow the installation instructions for ClickHouse Server and Client on all three machines.
35+
Install Clickhouse on three servers following the [instructions for your archive type](/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gz, etc.). For this example, you will follow the installation instructions for ClickHouse Server and Client on all three machines.
3536

3637
## Editing configuration files {#editing-configuration-files}
3738

@@ -45,7 +46,7 @@ For `chnode1`, there are five configuration files. You may choose to combine th
4546

4647
These values can be customized as you wish. This example configuration gives you a debug log that will roll over at 1000M three times. ClickHouse will listen on the IPv4 network on ports 8123 and 9000, and will use port 9009 for interserver communication.
4748

48-
```xml title="network-and-logging.xml on chnode1"
49+
```xml title="network-and-logging.xml on chnode1"
4950
<clickhouse>
5051
<logger>
5152
<level>debug</level>
@@ -110,8 +111,8 @@ If for any reason a Keeper node is replaced or rebuilt, do not reuse an existing
110111

111112
### Macros configuration {#macros-configuration}
112113

113-
The macros `shard` and `replica` reduce the complexity of distributed DDL. The values configured are automatically substituted in your DDL queries, which simplifies your DDL. The macros for this configuration specify the shard and replica number for each node.
114-
In this 2 shard 1 replica example, the replica macro is `replica_1` on both chnode1 and chnode2 as there is only one replica. The shard macro is `1` on chnode1 and `2` on chnode2.
114+
The macros `shard` and `replica` reduce the complexity of distributed DDL. The values configured are automatically substituted in your DDL queries, which simplifies your DDL. The macros for this configuration specify the shard and replica number for each node.
115+
In this 2 shard 1 replica example, the replica macro is `replica_1` on both chnode1 and chnode2 as there is only one replica. The shard macro is `1` on chnode1 and `2` on chnode2.
115116

116117
```xml title="macros.xml on chnode1"
117118
<clickhouse>
@@ -126,7 +127,7 @@ In this 2 shard 1 replica example, the replica macro is `replica_1` on both chno
126127
### Replication and sharding configuration {#replication-and-sharding-configuration}
127128

128129
Starting from the top:
129-
- The `remote_servers` section of the XML specifies each of the clusters in the environment. The attribute `replace=true` replaces the sample `remote_servers` in the default ClickHouse configuration with the `remote_servers` configuration specified in this file. Without this attribute, the remote servers in this file would be appended to the list of samples in the default.
130+
- The `remote_servers` section of the XML specifies each of the clusters in the environment. The attribute `replace=true` replaces the sample `remote_servers` in the default ClickHouse configuration with the `remote_servers` configuration specified in this file. Without this attribute, the remote servers in this file would be appended to the list of samples in the default.
130131
- In this example, there is one cluster named `cluster_2S_1R`.
131132
- A secret is created for the cluster named `cluster_2S_1R` with the value `mysecretphrase`. The secret is shared across all of the remote servers in the environment to ensure that the correct servers are joined together.
132133
- The cluster `cluster_2S_1R` has two shards, and each of those shards has one replica. Take a look at the architecture diagram toward the beginning of this document, and compare it with the two `shard` definitions in the XML below. In each of the shard definitions there is one replica. The replica is for that specific shard. The host and port for that replica is specified. The replica for the first shard in the configuration is stored on `chnode1`, and the replica for the second shard in the configuration is stored on `chnode2`.
@@ -158,7 +159,7 @@ Starting from the top:
158159

159160
### Configuring the use of Keeper {#configuring-the-use-of-keeper}
160161

161-
Up above a few files ClickHouse Keeper was configured. This configuration file `use-keeper.xml` is configuring ClickHouse Server to use ClickHouse Keeper for the coordination of replication and distributed DDL. This file specifies that ClickHouse Server should use Keeper on nodes chnode1 - 3 on port 9181, and the file is the same on `chnode1` and `chnode2`.
162+
Up above a few files ClickHouse Keeper was configured. This configuration file `use-keeper.xml` is configuring ClickHouse Server to use ClickHouse Keeper for the coordination of replication and distributed DDL. This file specifies that ClickHouse Server should use Keeper on nodes chnode1 - 3 on port 9181, and the file is the same on `chnode1` and `chnode2`.
162163

163164
```xml title="use-keeper.xml on chnode1"
164165
<clickhouse>
@@ -185,7 +186,7 @@ As the configuration is very similar on `chnode1` and `chnode2`, only the differ
185186

186187
### Network and logging configuration {#network-and-logging-configuration-1}
187188

188-
```xml title="network-and-logging.xml on chnode2"
189+
```xml title="network-and-logging.xml on chnode2"
189190
<clickhouse>
190191
<logger>
191192
<level>debug</level>
@@ -311,7 +312,7 @@ As `chnode3` is not storing data and is only used for ClickHouse Keeper to provi
311312

312313
### Network and logging configuration {#network-and-logging-configuration-2}
313314

314-
```xml title="network-and-logging.xml on chnode3"
315+
```xml title="network-and-logging.xml on chnode3"
315316
<clickhouse>
316317
<logger>
317318
<level>debug</level>
@@ -480,4 +481,3 @@ SELECT * FROM db1.table1_dist;
480481

481482
- The [Distributed Table Engine](/engines/table-engines/special/distributed.md)
482483
- [ClickHouse Keeper](/guides/sre/keeper/index.md)
483-

docs/deployment-guides/replicated.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ sidebar_label: Replication for fault tolerance
44
sidebar_position: 10
55
title: Replication for fault tolerance
66
---
7+
78
import ReplicationShardingTerminology from '@site/docs/_snippets/_replication-sharding-terminology.md';
89
import ConfigFileNote from '@site/docs/_snippets/_config-files.md';
910
import KeeperConfigFileNote from '@site/docs/_snippets/_keeper-config-files.md';
10-
11+
import ReplicationArchitecture from '@site/static/images/deployment-guides/architecture_1s_2r_3_nodes.png';
1112

1213
## Description {#description}
1314
In this architecture, there are five servers configured. Two are used to host copies of the data. The other three servers are used to coordinate the replication of data. With this example, we'll create a database and table that will be replicated across both data nodes using the ReplicatedMergeTree table engine.
@@ -18,7 +19,8 @@ In this architecture, there are five servers configured. Two are used to host co
1819

1920
## Environment {#environment}
2021
### Architecture Diagram {#architecture-diagram}
21-
![Architecture diagram for 1 shard and 2 replicas with ReplicatedMergeTree](@site/docs/deployment-guides/images/Architecture.1S_2R_ReplicatedMergeTree_5-nodes.3.CH.Keeper.nodes.2.CH.nodes.png)
22+
23+
<img src={ReplicationArchitecture} alt="Architecture diagram for 1 shard and 2 replicas with ReplicatedMergeTree" />
2224

2325
|Node|Description|
2426
|----|-----------|
@@ -34,7 +36,7 @@ In production environments, we strongly recommend using *dedicated* hosts for Cl
3436

3537
## Install {#install}
3638

37-
Install ClickHouse server and client on the two servers `clickhouse-01` and `clickhouse-02` following the [instructions for your archive type](/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gz, etc.).
39+
Install ClickHouse server and client on the two servers `clickhouse-01` and `clickhouse-02` following the [instructions for your archive type](/getting-started/install.md/#available-installation-options) (.deb, .rpm, .tar.gz, etc.).
3840

3941
Install ClickHouse Keeper on the three servers `clickhouse-keeper-01`, `clickhouse-keeper-02` and `clickhouse-keeper-03` following the [instructions for your archive type](/getting-started/install.md/#install-standalone-clickhouse-keeper) (.deb, .rpm, .tar.gz, etc.).
4042

@@ -53,7 +55,7 @@ These values can be customized as you wish. This example configuration gives yo
5355
- the name displayed when you connect with `clickhouse-client` is `cluster_1S_2R node 1`
5456
- ClickHouse will listen on the IPV4 network on ports 8123 and 9000.
5557

56-
```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-01"
58+
```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-01"
5759
<clickhouse>
5860
<logger>
5961
<level>debug</level>
@@ -71,8 +73,8 @@ These values can be customized as you wish. This example configuration gives yo
7173

7274
### Macros configuration {#macros-configuration}
7375

74-
The macros `shard` and `replica` reduce the complexity of distributed DDL. The values configured are automatically substituted in your DDL queries, which simplifies your DDL. The macros for this configuration specify the shard and replica number for each node.
75-
In this 1 shard 2 replica example, the replica macro is `replica_1` on clickhouse-01 and `replica_2` on clickhouse-02. The shard macro is `1` on both clickhouse-01 and clickhouse-02 as there is only one shard.
76+
The macros `shard` and `replica` reduce the complexity of distributed DDL. The values configured are automatically substituted in your DDL queries, which simplifies your DDL. The macros for this configuration specify the shard and replica number for each node.
77+
In this 1 shard 2 replica example, the replica macro is `replica_1` on clickhouse-01 and `replica_2` on clickhouse-02. The shard macro is `1` on both clickhouse-01 and clickhouse-02 as there is only one shard.
7678

7779
```xml title="/etc/clickhouse-server/config.d/macros.xml on clickhouse-01"
7880
<clickhouse>
@@ -88,7 +90,7 @@ In this 1 shard 2 replica example, the replica macro is `replica_1` on clickhous
8890
### Replication and sharding configuration {#replication-and-sharding-configuration}
8991

9092
Starting from the top:
91-
- The remote_servers section of the XML specifies each of the clusters in the environment. The attribute `replace=true` replaces the sample remote_servers in the default ClickHouse configuration with the remote_server configuration specified in this file. Without this attribute the remote servers in this file would be appended to the list of samples in the default.
93+
- The remote_servers section of the XML specifies each of the clusters in the environment. The attribute `replace=true` replaces the sample remote_servers in the default ClickHouse configuration with the remote_server configuration specified in this file. Without this attribute the remote servers in this file would be appended to the list of samples in the default.
9294
- In this example, there is one cluster named `cluster_1S_2R`.
9395
- A secret is created for the cluster named `cluster_1S_2R` with the value `mysecretphrase`. The secret is shared across all of the remote servers in the environment to ensure that the correct servers are joined together.
9496
- The cluster `cluster_1S_2R` has one shard, and two replicas. Take a look at the architecture diagram toward the beginning of this document, and compare it with the `shard` definition in the XML below. The shard definition contains two replicas. The host and port for each replica is specified. One replica is stored on `clickhouse-01`, and the other replica is stored on `clickhouse-02`.
@@ -117,7 +119,7 @@ Starting from the top:
117119

118120
### Configuring the use of Keeper {#configuring-the-use-of-keeper}
119121

120-
This configuration file `use-keeper.xml` is configuring ClickHouse Server to use ClickHouse Keeper for the coordination of replication and distributed DDL. This file specifies that ClickHouse Server should use Keeper on nodes clickhouse-keeper-01 - 03 on port 9181, and the file is the same on `clickhouse-01` and `clickhouse-02`.
122+
This configuration file `use-keeper.xml` is configuring ClickHouse Server to use ClickHouse Keeper for the coordination of replication and distributed DDL. This file specifies that ClickHouse Server should use Keeper on nodes clickhouse-keeper-01 - 03 on port 9181, and the file is the same on `clickhouse-01` and `clickhouse-02`.
121123

122124
```xml title="/etc/clickhouse-server/config.d/use-keeper.xml on clickhouse-01"
123125
<clickhouse>
@@ -147,7 +149,7 @@ As the configuration is very similar on clickhouse-01 and clickhouse-02 only the
147149

148150
This file is the same on both clickhouse-01 and clickhouse-02, with the exception of `display_name`.
149151

150-
```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-02"
152+
```xml title="/etc/clickhouse-server/config.d/network-and-logging.xml on clickhouse-02"
151153
<clickhouse>
152154
<logger>
153155
<level>debug</level>

docs/faq/general/columnar-database.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ toc_hidden: true
55
toc_priority: 101
66
---
77

8+
import RowOriented from '@site/static/images/row-oriented.gif';
9+
import ColumnOriented from '@site/static/images/column-oriented.gif';
10+
811
# What Is a Columnar Database? {#what-is-a-columnar-database}
912

1013
A columnar database stores the data of each column independently. This allows reading data from disk only for those columns that are used in any given query. The cost is that operations that affect whole rows become proportionally more expensive. The synonym for a columnar database is a column-oriented database management system. ClickHouse is a typical example of such a system.
@@ -18,10 +21,10 @@ Key columnar database advantages are:
1821
Here is the illustration of the difference between traditional row-oriented systems and columnar databases when building reports:
1922

2023
**Traditional row-oriented**
21-
![Traditional row-oriented](@site/docs/images/row-oriented.gif#)
24+
<img src={RowOriented} alt="Traditional row-oriented database" />
2225

2326
**Columnar**
24-
![Columnar](@site/docs/images/column-oriented.gif#)
27+
<img src={ColumnOriented} alt="Columnar database" />
2528

2629
A columnar database is the preferred choice for analytical applications because it allows having many columns in a table just in case, but to not pay the cost for unused columns on read query execution time (a traditional OLTP database reads all of the data during queries as the data is stored in rows and not columns). Column-oriented databases are designed for big data processing and data warehousing, they often natively scale using distributed clusters of low-cost hardware to increase throughput. ClickHouse does it with combination of [distributed](../../engines/table-engines/special/distributed.md) and [replicated](../../engines/table-engines/mergetree-family/replication.md) tables.
2730

0 commit comments

Comments
 (0)