snappy压缩算法详解_hive存储格式和压缩格式

snappy压缩算法详解_hive存储格式和压缩格式,第1张

snappy压缩算法详解_hive存储格式和压缩格式 Hadoop3编译安装基础环境:Centos 7.7编译环境软件安装目录mkdir -p /export/server
Hadoop编译安装安装编译相关的依赖1、yum install gcc gcc-c++ -y#下面这个命令不需要执行 手动安装cmake2、yum install make cmake #(这里cmake版本推荐为3.6版本以上,版本低源码无法编译!可手动安装)3、yum install autoconf automake libtool curl -y4、yum install lzo-devel zlib-devel openssl openssl-devel ncurses-devel -y5、yum install snappy snappy-devel bzip2 bzip2-devel lzo lzo-devel lzop libXtst -y手动安装cmake#yum卸载已安装cmake 版本低yum erase cmake#解压tar zxvf cmake-3.13.5.tar.gz#编译安装cd /export/server/cmake-3.13.5./configuremake && make install#验证[root@node4 ~]# cmake -version cmake version 3.13.5#如果没有正确显示版本 请断开SSH连接 重写登录手动安装snappy#卸载已经安装的cd /usr/local/librm -rf libsnappy*#上传解压tar zxvf snappy-1.1.3.tar.gz #编译安装cd /export/server/snappy-1.1.3./configuremake && make install#验证是否安装[root@node4 snappy-1.1.3]# ls -lh /usr/local/lib |grep snappy-rw-r--r-- 1 root root 511K Nov 4 17:13 libsnappy.a-rwxr-xr-x 1 root root 955 Nov 4 17:13 libsnappy.lalrwxrwxrwx 1 root root 18 Nov 4 17:13 libsnappy.so -> libsnappy.so.1.3.0lrwxrwxrwx 1 root root 18 Nov 4 17:13 libsnappy.so.1 -> libsnappy.so.1.3.0-rwxr-xr-x 1 root root 253K Nov 4 17:13 libsnappy.so.1.3.0安装配置JDK 1.8#解压安装包tar zxvf jdk-8u65-linux-x64.tar.gz#配置环境变量vim /etc/profileexport JAVA_HOME=/export/server/jdk1.8.0_65export PATH=$PATH:$JAVA_HOME/binexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarsource /etc/profile#验证是否安装成功java -versionjava version "1.8.0_65"Java(TM) SE Runtime Environment (build 1.8.0_65-b17)Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)You have new mail in /var/spool/mail/root安装配置maven#解压安装包tar zxvf apache-maven-3.5.4-bin.tar.gz#配置环境变量vim /etc/profileexport MAVEN_HOME=/export/server/apache-maven-3.5.4export MAVEN_OPTS="-Xms4096m -Xmx4096m"export PATH=:$MAVEN_HOME/bin:$PATHsource /etc/profile#验证是否安装成功[root@node4 ~]# mvn -vApache Maven 3.5.4#添加maven 阿里云仓库地址 加快国内编译速度vim /export/server/apache-maven-3.5.4/conf/settings.xml<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror></mirrors>安装ProtocolBuffer 2.5.0#解压tar zxvf protobuf-2.5.0.tar.gz#编译安装cd /export/server/protobuf-2.5.0./configuremake && make install#验证是否安装成功[root@node4 protobuf-2.5.0]# protoc --versionlibprotoc 2.5.0编译hadoop#上传解压源码包tar zxvf hadoop-3.1.4-src.tar.gz#编译cd /export/server/hadoop-3.1.4-srcmvn clean package -Pdist,native -DskipTests -Dtar -Dbundle.snappy -Dsnappy.lib=/usr/local/lib#参数说明:Pdist,native :把重新编译生成的hadoop动态库;DskipTests :跳过测试Dtar :最后把文件以tar打包Dbundle.snappy :添加snappy压缩支持【默认官网下载的是不支持的】Dsnappy.lib=/usr/local/lib :指snappy在编译机器上安装后的库路径编译之后的安装包路径/export/server/hadoop-3.1.4-src/hadoop-dist/target

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/664906.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-18
下一篇 2022-04-18

发表评论

登录后才能评论

评论列表(0条)

保存