安装使用esrally

安装使用esrally

pip3 install --upgrade pip
pip3 install esrally

报错

    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=565 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
     #include <Python.h>

yum install python-devel.x86_64
rpm -qa | grep python-devel

rpm -ql python-devel-2.7.5-88.el7.x86_64 
rpm -ql python-devel-2.7.5-88.el7.x86_64 | grep Python.h


ln -s /usr/include/python2.7/Python.h /usr/include/python3.6m/Python.h
In file included from psutil/_psutil_common.c:9:0:
    /usr/include/python3.6m/Python.h:7:24: fatal error: patchlevel.h: No such file or directory
     #include "patchlevel.h"

cp -r /usr/include/python2.7/*.h /usr/include/python3.6m

看来是原来的Python3有问题呀

 yum install libffi-devel 
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
tar xvf Python-3.8.0.tar.xz
cd Python-3.8.0
./configure --prefix=/usr/local/python3.8
make && make install
ln /usr/local/python3.8/bin/pip3.8 /usr/sbin/pip3.8
ln /usr/local/python3.8/bin/python3.8 /usr/sbin/python3.8

pip3.8   install psutil
pip3.8   install --upgrade pip
pip3.8   install esrally

冷静冷静,这个esrally的位置我也是找了很久

/usr/local/python3.8/bin/esrally
ln -s /usr/local/python3.8/bin/esrally /usr/sbin/esrally
esrally --versin

ModuleNotFoundError: No module named '_bz2'

yum install bzip2-devel 
cd /usr/local/src/Python-3.8.0
./configure --prefix=/usr/local/python3.8
make && make install
esrally -h

数据下载太慢了,先直接用测试模式test-mode,下载1000条数据试下

esrally --pipeline=benchmark-only --target-hosts=192.168.41.103:9200,192.168.41.104:9200,192.168.41.105:9200 --test-mode

https://cloud.tencent.com/developer/article/1551836

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。