如何使用hbase配置snappy

jdzmm42g  于 2021-05-30  发布在  Hadoop
关注(0)|答案(0)|浏览(302)

我正在尝试用snappy配置hbase。我安装了snappy和hadoop本机库:

ls /usr/local/lib

adp.pm              libprotobuf-lite.la         libprotobuf.a          libprotobuf.so.8.0.0  libprotoc.so.8      libsnappy.so.1.2.0
libhadoop.a         libprotobuf-lite.so         libprotobuf.la         libprotoc.a           libprotoc.so.8.0.0  pkgconfig
libhadoop.so        libprotobuf-lite.so.10      libprotobuf.so         libprotoc.la          libsnappy.a
libhadoop.so.1.0.0  libprotobuf-lite.so.10.0.0  libprotobuf.so.10      libprotoc.so          libsnappy.la
libjvm.so           libprotobuf-lite.so.8       libprotobuf.so.10.0.0  libprotoc.so.10       libsnappy.so
libprotobuf-lite.a  libprotobuf-lite.so.8.0.0   libprotobuf.so.8       libprotoc.so.10.0.0   libsnappy.so.1

当我尝试转到hbase shell时,总是出现以下错误:
2015-06-23 08:03:46542 warn[main]util.nativecodeloader:无法为您的平台加载本机hadoop库。。。在适用的情况下使用内置java类
也无法在hbase上使用snappy创建表。有人能帮我用hbase配置snappy吗?

create 'testsnap', {NAME=>'cf', COMPRESSION=>'SNAPPY'}

返回以下错误:

ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
        at org.apache.hadoop.hbase.master.HMaster.sanityCheckTableDescriptor(HMaster.java:1336)
        at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1269)
        at org.apache.hadoop.hbase.master.MasterRpcServices.createTable(MasterRpcServices.java:398)
        at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:42436)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
        at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
        at org.apache.hadoop.hbase.util.CompressionTest.testCompression(CompressionTest.java:101)
        at org.apache.hadoop.hbase.master.HMaster.checkCompression(HMaster.java:1462)
        at org.apache.hadoop.hbase.master.HMaster.checkCompression(HMaster.java:1455)
        at org.apache.hadoop.hbase.master.HMaster.sanityCheckTableDescriptor(HMaster.java:1334)
        ... 8 more
Caused by: java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z
        at org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy(Native Method)
        at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:63)
        at org.apache.hadoop.io.compress.SnappyCodec.getCompressorType(SnappyCodec.java:132)
        at org.apache.hadoop.io.compress.CodecPool.getCompressor(CodecPool.java:148)
        at org.apache.hadoop.io.compress.CodecPool.getCompressor(CodecPool.java:163)
        at org.apache.hadoop.hbase.io.compress.Compression$Algorithm.getCompressor(Compression.java:303)
        at org.apache.hadoop.hbase.util.CompressionTest.testCompression(CompressionTest.java:96)
        ... 11 more

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题