Hive / HBase Integration

This topic contains 2 replies, has 2 voices, and was last updated by  Zin Zin 1 year, 3 months ago.

  • Creator
    Topic
  • #43424

    Zin Zin
    Participant

    I created a table through HCat with the following script

    CREATE TABLE
    My_Customer (id STRING, c1 STRING, c2 STRING)
    STORED BY ‘org.apache.hcatalog.hbase.HBaseHCatStorageHandler’
    TBLPROPERTIES (
    ‘hbase.table.name’ = ‘My_Customer’,
    ‘hbase.columns.mapping’ = ‘d:c1,d:c2′,
    ‘hcat.hbase.output.bulkMode’ = ‘true’
    );

    Then loaded some data using .ImportTsv

    Then I tried creating a Hive Table to link to the above HBase Table using the following script

    CREATE EXTERNAL TABLE IF NOT EXISTS My_Customer
    (Id INT, c1 STRING, c2 STRING)
    STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler’
    WITH SERDEPROPERTIES
    (“hbase.columns.mapping” = “:Id,d:c1, d:c2″)
    TBLPROPERTIES (“hbase.table.name” = “My_Customer”);

    Then I get the following error

    FAILED: RuntimeException java.lang.ClassNotFoundException: org.apache.hcatalog.hbase.HBaseInputFormat

    Where could I go wrong ? The installation does not show any warning

Viewing 2 replies - 1 through 2 (of 2 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #43679

    Zin Zin
    Participant

    Thanks Yi. After I added the jar — it worked

    Collapse
    #43516

    Yi Zhang
    Moderator

    Hi Paulie,

    Have you added the needed jars into hive’s auxiliary path?

    https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration

    Also is this HDP1.3 version or HDP2.0 version?

    Thanks,
    Yi

    Collapse
Viewing 2 replies - 1 through 2 (of 2 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.