2

我正在尝试使用 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:46,542 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... 在适用的情况下使用内置 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
4

0 回答 0