The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hive / HCatalog Forum

The query from HIVE to HBASE with 'where' does not work.

  • #49177
    Sergey Sukharev

    The table was created from HIVE:

    CREATE TABLE hbase_job
    id int,
    name string
    STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler’
    WITH SERDEPROPERTIES (“hbase.columns.mapping” = “:key,cf:name”)
    TBLPROPERTIES(“” = “hbase_job”)

    hbase(main):001:0> scan ‘hbase_job’
    1 column=cf:name, timestamp=1393254158657, value=Secretary
    2 column=cf:name, timestamp=1393254158657, value=Manager
    3 column=cf:name, timestamp=1393254158657, value=Sales Person
    4 column=cf:name, timestamp=1393254158657, value=Managing Director
    5 column=cf:name, timestamp=1393254158657, value=Director
    6 column=cf:name, timestamp=1393254158657, value=Mechanic
    7 column=cf:name, timestamp=1393254158657, value=Foreman
    8 column=cf:name, timestamp=1393254158657, value=Clerk
    9 column=cf:name, timestamp=1393254158657, value=Accountant
    9 row(s) in 0.1240 seconds

    hive> use motors;
    Time taken: 1.225 seconds
    hive> select count(*) from hbase_job;
    Total MapReduce jobs = 1
    Launching Job 1 out of 1

    MapReduce Jobs Launched:
    Job 0: Map: 1 Reduce: 1 Cumulative CPU: 4.36 sec HDFS Read: 279 HDFS Write: 2 SUCCESS
    Total MapReduce CPU Time Spent: 4 seconds 360 msec
    Time taken: 23.266 seconds, Fetched: 1 row(s)

    hive> select * from hbase_job where id=8;
    Total MapReduce jobs = 1
    Launching Job 1 out of 1

    MapReduce Jobs Launched:
    Job 0: Map: 1 Cumulative CPU: 3.12 sec HDFS Read: 282 HDFS Write: 8 SUCCESS
    Total MapReduce CPU Time Spent: 3 seconds 120 msec
    8 Clerk
    Time taken: 15.394 seconds, Fetched: 1 row(s)

    But next query gives me an error:

    hive> select * from hbase_job where name=’Clerk’;
    Total MapReduce jobs = 1
    Launching Job 1 out of 1

    Job Submission failed with exception ‘java.lang.RuntimeException(Unexpected residual predicate (name = ‘Clerk’))’
    FAILED: Execution Error, return code 1 from

    Is anybody knows what could be the cause of the error? I would be very grateful for any help.


The forum ‘Hive / HCatalog’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

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.