From e5548fb99eb97f6e4e2c04e1faf87b7fa4f2483d Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Tue, 30 May 2017 12:45:54 +0300 Subject: [PATCH] CLICKHOUSE-2981: prefer sphinx docs over original reference --- website/gulpfile.js | 3 ++- website/index.html | 6 +++--- website/reference_en.html | 12 +++++++++--- website/reference_ru.html | 11 ++++++++++- website/tutorial.html | 33 +++++++++++++++------------------ 5 files changed, 39 insertions(+), 26 deletions(-) diff --git a/website/gulpfile.js b/website/gulpfile.js index 512fa0cd064..5ff641d37fa 100644 --- a/website/gulpfile.js +++ b/website/gulpfile.js @@ -36,7 +36,7 @@ gulp.task('reference', [], function () { }); gulp.task('docs', [], function () { - run('cd ' + docsDir + '; make'); + run('cd ' + docsDir + '; make', {}); return gulp.src(paths.docs) .pipe(gulp.dest(outputDir + '/docs')) .pipe(connect.reload()) @@ -87,6 +87,7 @@ gulp.task('images', [], function () { gulp.task('watch', function () { gulp.watch(paths.htmls, ['htmls']); + gulp.watch(paths.htmls, ['reference']); gulp.watch(paths.scripts, ['scripts']); gulp.watch(paths.images, ['images']); }); diff --git a/website/index.html b/website/index.html index 082f8d49292..c3d0073ad7a 100644 --- a/website/index.html +++ b/website/index.html @@ -453,7 +453,7 @@
Quick Start Performance - Documentation + Documentation Contacts
@@ -790,7 +790,7 @@ clickhouse-client href="https://github.com/yandex/ClickHouse/blob/master/doc/build.md" rel="external nofollow" target="_blank">instruction.

-

After installation proceed to tutorial or full +

After installation proceed to tutorial or full documentation.

@@ -824,7 +824,7 @@ clickhouse-client - + -
- +
+
+ Warning! +

+ClickHouse documentation has been moved to new location and the rest of this page is considered deprecated.
+Go to current ClickHouse documentation +

+
+
diff --git a/website/reference_ru.html b/website/reference_ru.html index 1b4bf23ff26..2fdac77e364 100644 --- a/website/reference_ru.html +++ b/website/reference_ru.html @@ -52,7 +52,16 @@ function getParams() {
- +
diff --git a/website/tutorial.html b/website/tutorial.html index de520480bec..790cb7ed7eb 100644 --- a/website/tutorial.html +++ b/website/tutorial.html @@ -225,15 +225,15 @@ ClickHouse from sources and then install.

clickhouse-client package contains clickhouse-client application — + href="docs/en/interfaces/cli.html">clickhouse-client application — interactive ClickHouse client. clickhouse-server-base contains a clickhouse-server binary file. clickhouse-server-common — contains config files for the clickhouse-server.

Server config files are located in /etc/clickhouse-server/. Before getting to work please notice the path element in config. Path determines the location for data storage. It's not really handy to directly edit config.xml file considering package updates. Recommended way is to override the config elements in - files of config.d directory. - Also you may want to set up access + files of config.d directory. + Also you may want to set up access rights at the start.

clickhouse-server won't be launched automatically after package installation. It won't be automatically @@ -395,7 +395,7 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);

-

Now we have a table of MergeTree type. +

Now we have a table of MergeTree type. MergeTree table type is recommended for usage in production. Table of this kind has a primary key used for incremental sort of table data. This allows fast execution of queries in ranges of a primary key.

@@ -415,15 +415,15 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);

Load data

xz -v -c -d < ontime.csv.xz | clickhouse-client --query="INSERT INTO ontime FORMAT CSV"
-

ClickHouse INSERT query allows to load data in any supported +

ClickHouse INSERT query allows to load data in any supported format. Data load requires just O(1) RAM consumption. INSERT query can receive any data volume as input. It's strongly recommended to insert data with not too small + href="docs/en/introduction/performance.html#performance-on-data-insertion">not too small size blocks. Notice that insert of blocks with size up to max_insert_block_size (= 1 048 576 rows by default) is an atomic operation: data block will be inserted completely or not inserted at all. In case of disconnect during insert operation you may not know if the block was inserted successfully. To achieve exactly-once semantics ClickHouse supports idempotency for replicated tables. This means + href="docs/en/table_engines/replication.html">replicated tables. This means that you may retry insert of the same data block (possibly on a different replicas) but this block will be inserted just once. Anyway in this guide we will load data from our localhost so we may not take care about data blocks generation and exactly-once semantics.

@@ -434,7 +434,7 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);

Our sample dataset is a bit not optimal. There are two reasons.

The first is that String data type is used in cases when Enum or numeric type would fit best.

+ href="docs/en/data_types/enum.html">Enum or numeric type would fit best.

When set of possible values is determined and known to be small. (E.g. OS name, browser vendors etc.) it's recommended to use Enums or numbers to improve performance. @@ -445,9 +445,10 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192); which DateTime handling functions may be not efficient.

ClickHouse functions + href="docs/en/functions/date_time_functions.html">functions for operating with DateTime fields are well-optimized so such redundancy is not required. Anyway much - columns is not a reason to worry — ClickHouse is a column-oriented + columns is not a reason to worry — ClickHouse is a column-oriented DBMS. This allows you to have as much fields as you need. Hundreds of columns in a table is fine for ClickHouse.

@@ -710,9 +711,9 @@ LIMIT 20
-

To enable replication ZooKeeper is required. ClickHouse will take care - of data consistency on all replicas and run restore procedure after failure automatically. It's recommended to - deploy ZooKeeper cluster to separate servers.

+

To enable replication ZooKeeper is required. + ClickHouse will take care of data consistency on all replicas and run restore procedure after failure + automatically. It's recommended to deploy ZooKeeper cluster to separate servers.

ZooKeeper is not a requirement — in some simple cases you can duplicate the data by writing it into all the replicas from your application code. This approach is not recommended — in this case ClickHouse is not able to @@ -760,7 +761,7 @@ ENGINE = ReplicatedMergeTree( (Year, FlightDate), 8192); -

Here we use ReplicatedMergeTree +

Here we use ReplicatedMergeTree table type. In parameters we specify ZooKeeper path containing shard and replica identifiers.

INSERT INTO ontime_replica SELECT * FROM ontime;
@@ -790,10 +791,6 @@ ENGINE = ReplicatedMergeTree(