7 Star 24 Fork 10

Gitee 极速下载/questdb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
.idea
artifacts
benchmarks
ci
compat
core
examples
i18n
pkg/ami/marketplace
utils
src
README.md
pom.xml
win64svc
.all-contributorsrc
.git-blame-ignore-revs
.gitignore
.gitmodules
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.txt
README.md
SECURITY.md
examples.manifest.yaml
github_run_action.py
pom.xml
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/questdb/questdb
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

QuestDB command line utils

TxSerializer

Serializes binary _txn file to / from readable JSON format. Primary usage to investigate storage issues

Usage

io.questdb.cliutil.TxSerializer -d <txn_path> | -s <json_path> <txn_path>
  • -d option prints contents of _txn file to std output in JSON format
  • -s option transforms existing JSON file into binary _txn format

Examples

java -cp utils.jar io.questdb.cliutil.TxSerializer -d /questdb-root/db/trades-COINBASE/_txn > /questdb-root/db/trades-COINBASE/txn.json

java -cp utils.jar io.questdb.cliutil.TxSerializer -s /questdb-root/db/trades-COINBASE/txn.json /questdb-root/db/trades-COINBASE/_txnCopy

Rebuild index

Rebuilds table indexes

Usage

io.questdb.cliutil.RebuildIndex <table_path> [-p <partition_name>] [-c <column_name>]
  • <table_path> full path to the table
  • -c column name, optional. If omitted, all indexed columns will have indexes rebuilt
  • -p optional partition name. If omitted, all partitions will be affected

Examples

java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE

java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -c symbol

java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -p 2022-03-21

java -cp utils.jar io.questdb.cliutil.IndexBuilder /questdb-root/db/trades-COINBASE -p 2022-03-21 -c symbol

Rebuild String column index .i file

Rebuilds String column .i file from .d file, helpful when .i file is corrupted

Usage

io.questdb.cliutil.RecoverVarIndex <table_path> [-p <partition_name>] [-c <column_name>]
  • <table_path> full path to the table
  • -c column name, optional. If omitted, all string columns will have .i file rebuild
  • -p optional partition name. If omitted, all partitions will be affected

Examples

java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE

java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -c stringColumn

java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -p 2022-03-21

java -cp utils.jar io.questdb.cliutil.RecoverVarIndex /questdb-root/db/trades-COINBASE -p 2022-03-21 -c stringColumn

Copy table from one instance to another using Postgres wire to read and ILP to write

Copies all the data from one QuestDB instance to another. Uses Postgres wire to select the data and ILP to insert it. Useful to migrate data to the running instance.

Usage

io.questdb.cliutil.Table2Ilp -d <destination_table_name> -dc <destination_ilp_host_port> -s <source_select_query> -sc <source_pg_connection_string>
                               [-sts <timestamp_column>] [-sym <symbol_columns>] [-dauth <ilp_auth_key:ilp_auth_token>] [-dtls]
  • -d destination table name
  • -dilp destination ILP connection string, e.g. https::addr=localhost:9000;username=admin;password=quest;
  • -s source select query, e.g. trades or trades WHERE timestamp in '2021-01'
  • -sc source connection string, e.g. jdbc:pgsql://localhost:8812/qdb
  • -sts source designated timestamp column name, defaults to timestamp
  • -sym comma separated list of symbol columns, e.g. symbol,exchange

Examples

java -cp utils.jar io.questdb.cliutil.Table2Ilp -d trades -dilp "https::addr=localhost:9000;username=admin;password=quest;" -s "trades WHERE start_time in '2022-06'" \ 
     -sc "jdbc:postgresql://localhost:9812/qdb?user=account&password=secret&ssl=false" \
     -sym "ticker,exchagne" -sts start_time

Build Utils project

To build single jar with dependencies run

mvn clean package
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/mirrors/questdb.git
git@gitee.com:mirrors/questdb.git
mirrors
questdb
questdb
master

搜索帮助