简体   繁体   中英

How to store XML files in HBase?

I'm trying to work on following scenarios:

  1. I have simple XML data:

     <main_tag> <x> <a>name value</a> <b>age value</b> </x> <y> <c>country value</c> <y> </main_tag> 

    I want the above XML file to be stored in HBase. How can we do it?

  2. If I have large number of XML files, how can I do bulk loading of files into HBase?

In both the scenarios, I don't want to use HDFS initially.

Your first question answered by @ravindra. For second question, You have the option of bulk loading where you can use map reduce to read large data, and convert it into HFile format, and then use bulk loading command to load output of map reduce to Hbase. For this, since map reduce reads data from HDFS, you should have large data in HDFS.

It depends on your data too. Look here for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM