手把手教你Excel制作动态模糊匹配的下拉菜单(vba下拉框模糊匹配)
678
2022-05-29
1 前言
大数据系统又重又复杂,对于很多感兴趣、又想玩一把的同学来讲,门槛着实有点高,今天我选择了Apache Kudu这个项目,来手把手指导大家从源码开始构建一个本地的集群,然后进行简单的数据读写和集群管理。
注意,以下操作只需要ctrl+c & ctrl+v 即可:)
2 准备工作
在开始本文之前,建议在华为云购买一台云服务器,同时考虑到后续的顺利操作,云服务器需要有一些要求:
CPU架构:x86计算
规格:c6.2xlarge.2(提高编译速度)
镜像:公共镜像,CentOS CentOS 8.0 64bit
系统盘:高IO,100GB
弹性公网:按流量计费(提高下载速度)
3 操作系统
安装软件包
[root@ecs-kudu ~]# yum install -y git autoconf automake libtool flex rsync gcc-c++.x86_64 cyrus-sasl-devel.x86_64 cyrus-sasl-plain.x86_64 openssl-devel.x86_64 java-1.8.0-openjdk-devel.x86_64
创建软连接
[root@ecs-kudu ~]# cd /usr/bin [root@ecs-kudu bin]# ln -s python3 python [root@ecs-kudu bin]# ls -lrt python* lrwxrwxrwx 1 root root 32 Nov 21 2019 python3.6m -> /usr/libexec/platform-python3.6m lrwxrwxrwx 1 root root 31 Nov 21 2019 python3.6 -> /usr/libexec/platform-python3.6 lrwxrwxrwx 1 root root 25 Feb 12 10:34 python3 -> /etc/alternatives/python3 lrwxrwxrwx 1 root root 7 Jun 8 19:05 python -> python3
4 编译源码
clone代码:
[root@ecs-kudu ~]# git clone https://github.com/apache/kudu
编译三方包
[root@ecs-kudu ~]# cd kudu/ [root@ecs-kudu kudu]# ./thirdparty/build-if-necessary.sh
编译源码
[root@ecs-kudu kudu]# mkdir -p build/release [root@ecs-kudu kudu]# cd build/release/ [root@ecs-kudu release]# ../../thirdparty/installed/common/bin/cmake -DCMAKE_BUILD_TYPE=release ../.. [root@ecs-kudu release]# make -j8
5 部署集群
这里我们以1个master + 3个tserver的集群进行举例说明。
创建目录
[root@ecs-kudu release]# cd ~/kudu [root@ecs-kudu kudu]# mkdir -p cluster/master/wal mkdir -p cluster/master/data mkdir -p cluster/master/conf mkdir -p cluster/master/log mkdir -p cluster/tserver1/wal mkdir -p cluster/tserver1/data mkdir -p cluster/tserver1/conf mkdir -p cluster/tserver1/log mkdir -p cluster/tserver2/wal mkdir -p cluster/tserver2/data mkdir -p cluster/tserver2/conf mkdir -p cluster/tserver2/log mkdir -p cluster/tserver3/wal mkdir -p cluster/tserver3/data mkdir -p cluster/tserver3/conf mkdir -p cluster/tserver3/log
配置文件
master节点配置
[root@ecs-kudu kudu]# cd cluster [root@ecs-kudu cluster]# vi master/conf/master.conf -rpc_bind_addresses=localhost:7051 -webserver_interface=localhost -webserver_port=8051 -fs_wal_dir=/root/kudu/cluster/master/wal -fs_data_dirs=/root/kudu/cluster/master/data -log_dir=/root/kudu/cluster/master/log -unlock_unsafe_flags -never_fsync -time_source=system_unsync
tserver1节点配置
[root@ecs-kudu cluster]# vi tserver1/conf/tserver.conf -rpc_bind_addresses=localhost:7150 -webserver_interface=localhost -webserver_port=8150 -fs_wal_dir=/root/kudu/cluster/tserver1/wal -fs_data_dirs=/root/kudu/cluster/tserver1/data -log_dir=/root/kudu/cluster/tserver1/log -unlock_unsafe_flags -never_fsync -time_source=system_unsync
tserver2节点配置
[root@ecs-kudu cluster]# vi tserver2/conf/tserver.conf -rpc_bind_addresses=localhost:7250 -webserver_interface=localhost -webserver_port=8250 -fs_wal_dir=/root/kudu/cluster/tserver2/wal -fs_data_dirs=/root/kudu/cluster/tserver2/data -log_dir=/root/kudu/cluster/tserver2/log -unlock_unsafe_flags -never_fsync -time_source=system_unsync
tserver3节点配置
[root@ecs-kudu cluster]# vi tserver3/conf/tserver.conf -rpc_bind_addresses=localhost:7350 -webserver_interface=localhost -webserver_port=8350 -fs_wal_dir=/root/kudu/cluster/tserver3/wal -fs_data_dirs=/root/kudu/cluster/tserver3/data -log_dir=/root/kudu/cluster/tserver3/log -unlock_unsafe_flags -never_fsync -time_source=system_unsync
启动进程
[root@ecs-kudu cluster]# ../build/release/bin/kudu-master --flagfile=./master/conf/master.conf & ../build/release/bin/kudu-tserver --flagfile=./tserver1/conf/tserver.conf & ../build/release/bin/kudu-tserver --flagfile=./tserver2/conf/tserver.conf & ../build/release/bin/kudu-tserver --flagfile=./tserver3/conf/tserver.conf &
测试尝鲜
"OK"表示集群的状态正常:
[root@ecs-kudu cluster]# ../build/release/bin/kudu cluster ksck localhost:7051 ... ... OK [root@ecs-kudu cluster]#
写数据
[root@ecs-kudu cluster]# ../build/release/bin/kudu perf loadgen localhost:7051 -table_num_hash_partitions=3 -table_num_replicas=3 -num_rows_per_thread=10000 -keep_auto_table Using auto-created table 'default.loadgen_auto_d1de323678bd4aa5a5dea618cbb8449c' INSERT report rows total: 20000 time total: 35.4161 ms time per row: 0.0017708 ms [root@ecs-kud cluster]#
读数据(注意表名和上面的一样)
[root@ecs-kudu cluster]# ../build/release/bin/kudu perf table_scan localhost:7051 default.loadgen_auto_d1de323678bd4aa5a5dea618cbb8449c T 988dc2eef4b84ed4a9f3f085f01407e1 scanned count 6640 cost 0.00353404 seconds T f1116c276f10455c8d58ff4720383542 scanned count 6649 cost 0.00355792 seconds T fb010f4e720d4e4293abcda44f51210a scanned count 6711 cost 0.00305647 seconds Total count 20000 cost 0.0068044 seconds [root@ecs-kudu cluster]#
上面是集群状态和读、写集群的操作,通过kudu工具还可以做其他各种丰富的操作,大家可以参考https://kudu.apache.org/docs/command_line_tools_reference.html
以上step by step步骤有什么问题,请大家留言。另外,大家对Apache Kudu有什么想要了解的也可以留言哈^_^
大数据
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。