Re: Read HFile from Local file system for studying and testing

2016-04-16 Thread Bin Wang
Hi there, I fixed the error by trying different maven dependencies and that solved the problem in the end. First, you should not need and, should NOT include the hadoop-core jar. Here is all the code you need in the end to read HFile from a localfile system. And I tested this on a brand new Ubunt

Re: Read HFile from Local file system for studying and testing

2016-04-15 Thread Bin Wang
Hi St.Ack, localfs = FileSystem.get(conf) triggers another exception and it failed right at that step, let alone print out localfs. 16/04/15 21:54:04 WARN util.NativeCodeLoader: Unable to load native-hadoop > library for your platform... using builtin-java classes where applicable > Exception in

Re: Read HFile from Local file system for studying and testing

2016-04-14 Thread Stack
On Thu, Apr 14, 2016 at 8:03 PM, Bin Wang wrote: > Hi there, > > I have a HFile that I copied from HDFS down to my laptop. > > I am trying to use the HFile.createreader to read in that HFile and play > with it. However, it was really hard to figure that out how to read it from > local file system

Re: Read HFile from Local file system for studying and testing

2016-04-14 Thread Ted Yu
Please take a look at: hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java There're various tests under hbase-server/src/test which demonstrate the usage. FYI On Thu, Apr 14, 2016 at 8:03 PM, Bin Wang wrote: > Hi there, > > I have a HFile that I copied from HDFS down to

Read HFile from Local file system for studying and testing

2016-04-14 Thread Bin Wang
Hi there, I have a HFile that I copied from HDFS down to my laptop. I am trying to use the HFile.createreader to read in that HFile and play with it. However, it was really hard to figure that out how to read it from local file system. public class MyHbase { public static void main(Strin