你如何使用hbase配置snappy

时间:2015-06-23 12:08:06

标签: hadoop hbase snappy

我正在尝试使用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:无法为您的平台加载native-hadoop库...使用适用的builtin-java类

也无法在HBASE上创建带有SNAPPY的表。可以用somone帮助我用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

0 个答案:

没有答案