importer
importer copied to clipboard
tikv-importer configuration options
Feature Request
Is your feature request related to a problem? Please describe:
I have a script that imports an example database with tidb-lightning / tikv-importer. It works like this:
#!/bin/sh
mysql -e 'drop database if exists ontime'
killall -9 tikv-importer
killall -9 tidb-lightning
BASE=/mnt/evo860
cd $BASE
rm -rf $BASE/tmp && mkdir -p $BASE/tmp
./bin/tikv-importer --import-dir $BASE/tmp &
sleep 5
./bin/tidb-lightning -d $BASE/data-sets/ontime-data -importer localhost:20160
Describe the feature you'd like:
Besides https://github.com/pingcap/tidb-lightning/issues/264, I have two critiques of tikv-importer's configuration:
-
The default port of
20160
is opaque. It is not well documented, and runningtikv-importer --help
does not show what the default values for options are (tidb-lightning --help
for example will show defaults). I had to runlsof
to discover the port :-) -
The option called
--import-dir
appears to be purely for ephemeral storage, since it ends up being stored in tikv, and sourced from tidb-lightning. This would more correctly be called--tmp-dir
. The name is important because it communicates how to provision its storage (i.e. in cloud it should be on the local ephemeral drive, not network attached, and backup/redundancy etc is not important).
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy: