Foreword:
Because hbase does not support secondary indexes, if you need to combine queries after importing hive into
hive, then introduce phoenix.
hive2hbase three ways
1.
Hive and hbase build mapping table Direct operation of the hive table is to operate the hbase table-relational data is imported into hbase to initialize the data, but this kind of hive partition and hbase pre-partitioning are not friendly, if only the general hive table can be used.
2. Use sparksql operation to complete hive processing and then enter hbase. Here, batch input into hbase uses hbase api. Here you can choose scala/java language to write hbase, of course python is ok.
Use spark to read Hive table data and import it into Hbase in batches
3. Use jdbc in sparksql to write to phoenix. See:
spark+phoenix read the data in the table through jdbc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.