kudu 官网:https://kudu.apache.org/docs/installation.html#rhel_from_source
# 下载源码
git clone git@github.com:apache/kudu.git
git clone https://github.com/memkind/memkind.git
sudo yum install autoconf automake cyrus-sasl-devel cyrus-sasl-gssapi \
cyrus-sasl-plain flex gcc gcc-c++ gdb git java-1.8.0-openjdk-devel \
krb5-server krb5-workstation libtool make openssl-devel patch \
pkgconfig redhat-lsb-core rsync unzip vim-common which
# 我的环境是centos7
sudo yum install centos-release-scl-rh
sudo yum install devtoolset-8
# 安装memkind
sudo yum install numactl-libs numactl-devel
cd memkind
./build.sh --prefix=/usr
sudo yum remove memkind
sudo make install
sudo ldconfig
cd kudu
###### 这一步执行我一天时间... ######
build-support/enable_devtoolset.sh thirdparty/build-if-necessary.sh
###### 这一步更长时间...... ######
mkdir -p build/release
cd build/release
../../build-support/enable_devtoolset.sh \
../../thirdparty/installed/common/bin/cmake \
-DCMAKE_BUILD_TYPE=release ../..
########################
# 上一步可以跳过 test
# 请加上 -DNO_TESTS=1 \ 可以跳过大量test模块的安装
########################
../../build-support/enable_devtoolset.sh \
../../thirdparty/installed/common/bin/cmake \
-DNO_TESTS=1 \
-DCMAKE_BUILD_TYPE=release ../..
### 这一步可能会遇到问题
## https://blog.csdn.net/qq_15138049/article/details/120891174?spm=1001.2014.3001.5501
###
make -j4
绝大部分都是 test… 我是因为下载到80%实在虚拟机没空间 - -,才百度到 -DNO_TESTS=1 \
编译完人都傻了…
[hadoop@hadoop03 kudu]$ tree
.
├── bin
│ ├── kudu
│ ├── kudu-master
│ └── kudu-tserver
├── conf
│ ├── master.gflagfile
│ └── tserver.gflagfile
├── data
├── logs
└── www
├── bootstrap
│ ├── css
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap.min.css.map
│ │ ├── bootstrap-table.min.css
│ │ ├── bootstrap-theme.min.css
│ │ └── bootstrap-theme.min.css.map
│ ├── fonts
│ │ └── glyphicons-halflings-regular.woff
│ └── js
│ ├── bootstrap.js
│ ├── bootstrap.js-bak
│ ├── bootstrap.min.js
│ ├── bootstrap.min.js-bak
│ ├── bootstrap-table.min.js
│ └── bootstrap-table.min.js-bak
├── config.mustache
├── d3.v2.js
├── dashboards.mustache
├── epoch.0.5.2.min.css
├── epoch.0.5.2.min.js
├── favicon.ico
├── home.mustache
├── index.html
├── jquery-3.5.1.min.js
├── key.png
├── kudu.css
├── kudu.js
├── log-anchors.mustache
├── logo.png
├── logs.mustache
├── maintenance-manager.mustache
├── masters.mustache
├── metrics-epoch.js
├── metrics.html
├── scans.mustache
├── table.mustache
├── tables.mustache
├── tablet-consensus-status.mustache
├── tablet.mustache
├── tablet-rowsetlayout-svg.mustache
├── tablet-servers.mustache
├── tablets.mustache
├── threadz.mustache
├── tracing.html
└── tracing.js
26 directories, 105 files
[hadoop@hadoop03 kudu]$
服务执行
# master
/opt/module/kudu/bin/kudu-master --flagfile=/opt/module/kudu/conf/master.gflagfile
# tserver
/opt/module/kudu/bin/kudu-tserver --flagfile=/opt/module/kudu/conf/tserver.gflagfile
遇到的问题
安装完成后执行:kudu-master,All healthy data directories are full 虚拟机编译安装kudu 磁盘吃完了(df -h 100%)…释放一些磁盘空间就好了
[hadoop@hadoop03 kudu]$ bin/kudu-master --flagfile=/opt/module/kudu/conf/master.gflagfile
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1022 13:25:46.162350 56665 block_cache.cc:108] Block cache capacity exceeds 50% of the memory pressure threshold (536870912 bytes vs. 50% of 915711590 bytes). This may cause performance problems. Consider lowering --block_cache_capacity_mb or raising --memory_limit_hard_bytes.
E1022 13:25:46.326290 56726 master.cc:280] Unable to init master catalog manager: IO error: Unable to initialize catalog manager: Failed to initialize sys tables async: Failed to create TabletMetadata: All healthy data directories are full (error 28)
E1022 13:25:46.351853 56665 master_main.cc:40] IO error: RunMasterServer() failed: Unable to initialize catalog manager: Failed to initialize sys tables async: Failed to create TabletMetadata: All healthy data directories are full (error 28)
编译过程中出现:compiler error: Segmentation fault
[hadoop@hadoop03 release]$ make -j4
...
[ 65%] Building CXX object src/kudu/tablet/CMakeFiles/tablet.dir/tablet.cc.o
In file included from /opt/module/sourcecode/kudu/thirdparty/installed/uninstrumented/include/gmock/gmock-spec-build ers.h:75,
from /opt/module/sourcecode/kudu/thirdparty/installed/uninstrumented/include/gmock/gmock-generated- function-mockers.h:47,
from /opt/module/sourcecode/kudu/thirdparty/installed/uninstrumented/include/gmock/gmock-function-m ocker.h:39,
from /opt/module/sourcecode/kudu/thirdparty/installed/uninstrumented/include/gmock/gmock.h:61,
from /opt/module/sourcecode/kudu/src/kudu/util/test_macros.h:20,
from /opt/module/sourcecode/kudu/src/kudu/rebalance/rebalance-test.cc:34:
/opt/module/sourcecode/kudu/thirdparty/installed/uninstrumented/include/gmock/gmock-matchers.h:1913:5: internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
继续多make -j2 几次…