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

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

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

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