Home Forums Hive / HCatalog Hive / HBase Integration

This topic contains 2 replies, has 2 voices, and was last updated by  Paulie Brammer 5 months, 1 week ago.

  • Creator
    Topic
  • #43424

    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 logged in to reply to this topic.

  • Author
    Replies
  • #43679

    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)