hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <fancye...@gmail.com>
Subject Re: Unable to load native-hadoop library in java hbase client
Date Tue, 06 Jan 2015 02:58:32 GMT
yes, I have read it. the hbase server is correctly configured because
I can create a table with snappy compression algorithm. Also it's
correct for the ./bin/hbase shell.
But my java client print this warning message.(for now it's a single
node pesudo cluster and the java client run on the same machine of
hbase/hadoop) I think the problem is the java client can't find native
library path. What environment variables should I set?

On Mon, Jan 5, 2015 at 11:59 PM, Stack <stack@duboce.net> wrote:
> You checked the section in the refguide on loading native libs:
> http://hbase.apache.org/book.html#hadoop.native.lib ? It was updated
> recently.
>
> You have symlinked or copied the the native libs under your client?  List
> out the links for us here.
>
> St.Ack
>
>
> On Mon, Jan 5, 2015 at 12:26 AM, Li Li <fancyerii@gmail.com> wrote:
>
>> WARN main org.apache.hadoop.util.NativeCodeLoader Unable to load
>> native-hadoop library for your platform... using builtin-java classes
>> where applicable
>>
>> I have correctly installed native lib in hadoop and hbase.
>>
>> I can verify it by ./bin/hbase --config ~/conf_hbase
>> org.apache.hadoop.util.NativeLibraryChecker
>> 15/01/05 16:22:53 WARN bzip2.Bzip2Factory: Failed to load/initialize
>> native-bzip2 library system-native, will use pure-Java version
>> 15/01/05 16:22:53 INFO zlib.ZlibFactory: Successfully loaded &
>> initialized native-zlib library
>> Native library checking:
>> hadoop: true /home/lli/hadoop-2.3.0/lib/native/libhadoop.so.1.0.0
>> zlib:   true /lib/x86_64-linux-gnu/libz.so.1
>> snappy: true /usr/local/lib/libsnappy.so.1
>> lz4:    true revision:99
>> bzip2:  false
>>
>> bzip2 is not installed but I don't use it.
>>
>> Also when run hbase shell, it's ok(no warn of unable to load
>> native-hadoop library)
>>
>> But when I run java client codes, it prints this warn.
>> my java code is simple:
>>
>>     Configuration conf = HBaseConfiguration.create();
>>     conf.set("hbase.zookeeper.quorum", "localhost");
>>     conf.set("hbase.zookeeper.property.clientPort", "2181");
>>     HConnection conn = HConnectionManager.createConnection(conf);
>>

Mime
View raw message