编译步骤:
yum install lzo-devel
source /opt/gitcode/kdp-impala/bin/impala-config.sh
git clone --branch master https://github.com/chufucun/impala-lzo.git
cd $IMPALA_LZO_HOME
./build.sh release &IMPALA_HOME
报错一:
CMake Error at CMakeLists.txt:115 (find_package):
By not providing "FindThrift.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Thrift", but
CMake did not find one.
Could not find a package configuration file provided by "Thrift" with any
of the following names:
ThriftConfig.cmake
thrift-config.cmake
Add the installation prefix of "Thrift" to CMAKE_PREFIX_PATH or set
"Thrift_DIR" to a directory containing one of the above files. If "Thrift"
provides a separate development package or SDK, be sure it has been
installed.
修改CMakeLists.txt中:
find_package(Thrift REQUIRED)
修改为:
find_package(ThriftJava REQUIRED)
报错二:
In file included from /data/keendata/kdp-package/impala-lzo/hdfs-lzo-text-scanner.cc:22:
/data/keendata/kdp-package/impala-lzo/hdfs-lzo-text-scanner.h:9:10: fatal error: exec/hdfs-text-scanner.h: 没有那个文件或目录
9 | #include "exec/hdfs-text-scanner.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
解决办法:修改 #include "exec/hdfs-text-scanner.h" 为 #include "exec/text/hdfs-text-scanner.h"
报错三:
/data/keendata/kdp-package/kdp-impala/be/src/util/in-list-filter.h:21:10: fatal error: orc/sargs/Literal.hh: 没有那个文件或目录
21 | #include <orc/sargs/Literal.hh>
| ^~~~~~~~~~~~~~~~~~~~~~
解决办法:修改CMakeLists.txt中,添加
# 4.3+ contains orc file
# find ORC headers and libs
#find_package(Orc REQUIRED)
#IMPALA_ADD_THIRDPARTY_LIB(orc ${ORC_INCLUDE_DIR} ${ORC_STATIC_LIB} "")
include_directories("${impala toochain orc include 路径}")