Skip to content

module executable #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@
# read airline.ontime test dataset from MySQL and write it to CH

# ugly stub to suppress unsufficient sockets
sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"
#sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"

# run data reader with specified Python version

PYTHON=python3.6
PYTHON=/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy
PYTHON=""
PYTHON="/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy"
PYTHON="python3.6"
PYTHON="python3"

$PYTHON ../clickhouse-mysql ${*:1} \
CH_MYSQL="/usr/bin/clickhouse-mysql"
CH_MYSQL="-m clickhouse_mysql.main"

if [ ! -d "clickhouse_mysql" ]; then
# no clickhouse_mysql dir available - step out of examples dir
cd ..
fi

$PYTHON $CH_MYSQL ${*:1} \
--src-resume \
--src-wait \
--nice-pause=1 \
Expand Down
10 changes: 9 additions & 1 deletion examples/run_datatypes.sh → examples/datatypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"

python3 ../clickhouse-mysql ${*:1} \
PYTHON=""
PYTHON="python3.6"
PYTHON="python3"
PYTHON="/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy"

CH_MYSQL="/usr/bin/clickhouse-mysql"
CH_MYSQL="-m clickhouse_mysql.main"

$PYTHON $CH_MYSQL ${*:1} \
--src-resume \
--src-wait \
--src-host=127.0.0.1 \
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
keywords='clickhouse mysql data migration',

# list of packages to be included into project
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
packages=find_packages(exclude=[
'contrib',
'docs',
'tests',
]),

# run-time dependencies
# these will be installed by pip
Expand All @@ -60,6 +64,7 @@
# cross-platform support for pip to create the appropriate form of executable
entry_points={
'console_scripts': [
# executable name=what to call
'clickhouse-mysql=clickhouse_mysql:main',
],
},
Expand Down