title: Hive-HBase integration : Table not found
body: <p>I'm referring to <a href="https://cwiki.apache.org/Hive/hbaseintegration.html#HBaseIntegration-Usage" rel="nofollow">this</a> for Hive-HBase integration.</p>
  
  <p>First, I verified that there is no table named ORDERS_HIVE_DUMMY in HBase :</p>
  
  <pre><code>hbase(main):016:0&gt; describe 'ORDERS_HIVE_DUMMY'
  
  ERROR: Failed to find table named ORDERS_HIVE_DUMMY
  
  Here is some help for this command:
  Describe the named table. For example:
    hbase&gt; describe 't1'
  </code></pre>
  
  <p>Then I started the hive shell :</p>
  
  <pre><code>hduser@cldx-1139-1033:~/hadoop_ecosystem/apache_hive/hive_installation/hive-0.9.0/bin$ ./hive --auxpath $HIVE_HOME/lib/hive-hbase-handler-0.9.0.jar,$HBASE_HOME/hbase-0.94.6.1.jar,$HBASE_HOME/lib/zookeeper-3.4.5.jar,$HIVE_HOME/lib/guava-r09.jar -hiveconf hbase.zookeeper.quorum=cldx-1140-1034
  WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
  Logging initialized using configuration in jar:file:/home/hduser/hadoop_ecosystem/apache_hive/hive_installation/hive-0.9.0/lib/hive-common-0.9.0.jar!/hive-log4j.properties
  Hive history file=/tmp/hduser/hive_job_log_hduser_201304192016_1559705029.txt
  hive&gt;
  </code></pre>
  
  <p>Then, I created a table </p>
  
  <pre><code>hive&gt; CREATE TABLE ORDERS_HIVE_DUMMY(ORDER_ID STRING,CUSTOMER_ID STRING,PRODUCT_ID STRING,ORDER_DATE TIMESTAMP,QUANTITY DOUBLE,AMOUNT DOUBLE,PAYMENT_MODE STRING) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'  WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,ORDER_DETAILS:CUSTOMER_ID,ORDER_DETAILS:PRODUCT_ID,ORDER_DETAILS:REQUEST_DATE,ORDER_DETAILS:PRODUCT_QUANTITY,ORDER_DETAILS:PRICE,ORDER_DETAILS:PAYMENT_MODE");
  OK
  Time taken: 11.893 seconds
  </code></pre>
  
  <p>Then, I verified that the table is created in HBase</p>
  
  <pre><code>hbase(main):017:0&gt; describe 'ORDERS_HIVE_DUMMY'
  DESCRIPTION                                                                       ENABLED
   {NAME =&gt; 'ORDERS_HIVE_DUMMY', FAMILIES =&gt; [{NAME =&gt; 'ORDER_DETAILS', BLOOMFILTER true
    =&gt; 'NONE', REPLICATION_SCOPE =&gt; '0', VERSIONS =&gt; '3', COMPRESSION =&gt; 'NONE', MI
   N_VERSIONS =&gt; '0', TTL =&gt; '2147483647', BLOCKSIZE =&gt; '65536', IN_MEMORY =&gt; 'fals
   e', BLOCKCACHE =&gt; 'true'}]}
  </code></pre>
  
  <p>But now when I query the table on Hive, I get an exception :</p>
  
  <pre><code>hive&gt; select * from ORDERS_HIVE_DUMMY;
  OK
  Failed with exception java.io.IOException:org.apache.hadoop.hbase.TableNotFoundException: orders_hive_dummy
  Time taken: 0.455 seconds
  </code></pre>
  
  <p>I guess that querying external tables requires some hint to the query written on the HIve prompt? What could be the error?</p>