importer icon indicating copy to clipboard operation
importer copied to clipboard

tikv-importer configuration options

Open wwar opened this issue 5 years ago • 0 comments

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:

  1. The default port of 20160 is opaque. It is not well documented, and running tikv-importer --help does not show what the default values for options are (tidb-lightning --help for example will show defaults). I had to run lsof to discover the port :-)

  2. 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:

wwar avatar Jan 26 '20 18:01 wwar