This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
471d068
commit 6d25648
Showing
81 changed files
with
3,686 additions
and
2,193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
CLICKHOUSE_DB="${CLICKHOUSE_DB:-cvat}"; | ||
CLICKHOUSE_USER="${CLICKHOUSE_USER:-user}"; | ||
CLICKHOUSE_PASSWORD="${CLICKHOUSE_PASSWORD:-password}"; | ||
|
||
cat <<EOT > /etc/clickhouse-server/users.d/user.xml | ||
<yandex> | ||
<!-- Docs: <https://clickhouse.tech/docs/en/operations/settings/settings_users/> --> | ||
<users> | ||
<${CLICKHOUSE_USER}> | ||
<profile>default</profile> | ||
<networks> | ||
<ip>::/0</ip> | ||
</networks> | ||
<password>${CLICKHOUSE_PASSWORD}</password> | ||
<quota>default</quota> | ||
</${CLICKHOUSE_USER}> | ||
</users> | ||
</yandex> | ||
EOT | ||
|
||
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS ${CLICKHOUSE_DB}"; | ||
|
||
echo " | ||
CREATE TABLE IF NOT EXISTS ${CLICKHOUSE_DB}.events | ||
( | ||
\`scope\` String NOT NULL, | ||
\`obj_name\` String NULL, | ||
\`obj_id\` UInt64 NULL, | ||
\`obj_val\` String NULL, | ||
\`source\` String NOT NULL, | ||
\`timestamp\` DateTime64(3, 'Etc/UTC') NOT NULL, | ||
\`count\` UInt16 NULL, | ||
\`duration\` UInt32 DEFAULT toUInt32(0), | ||
\`project_id\` UInt64 NULL, | ||
\`task_id\` UInt64 NULL, | ||
\`job_id\` UInt64 NULL, | ||
\`user_id\` UInt64 NULL, | ||
\`user_name\` String NULL, | ||
\`user_email\` String NULL, | ||
\`org_id\` UInt64 NULL, | ||
\`org_slug\` String NULL, | ||
\`payload\` String NULL | ||
) | ||
ENGINE = MergeTree | ||
PARTITION BY toYYYYMM(timestamp) | ||
ORDER BY (timestamp) | ||
SETTINGS index_granularity = 8192 | ||
;" | clickhouse-client |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.