title: Hive integration with hbase-0.95.0
body: <p>I am using Hadoop-1.2.0, HBase-0.95.0-Hadoop1 and trying to integrate Hive-0.11.0 into it. Hadoop and HBase is running.</p>
  
  <p>I am able to connect to Hive and execute statements independently in Hive. But when I try to create table in HBase through Hive, it's giving me the following exception:</p>
  
  <pre><code>kanmani@kanmani-VirtualBox:~/hadoop$ jps
  
  6695 HRegionServer
  2640 DataNode
  7301 Jps
  2969 JobTracker
  6404 HMaster
  3192 TaskTracker
  2861 SecondaryNameNode
  2413 NameNode
  6508 Main
  6368 HQuorumPeer
  
  kanmani@kanmani-VirtualBox:~/hadoop$ hive/bin/hive
  
  Logging initialized using configuration in jar:file:/home/kanmani/hadoop/hive/lib/hive-common-0.11.0.jar!/hive-log4j.properties
  Hive history file=/home/kanmani/hadoop/hive/logs/hive_job_log_kanmani_7363@kanmani-VirtualBox_201306081006_284888583.txt
  
  hive&gt;
  
  hive&gt; show tables;
  
  OK
  test
  Time taken: 18.74 seconds, Fetched: 1 row(s)
  
  hive&gt; create table pokes(foo int,value string);
  
  OK
  Time taken: 3.606 seconds
  
  hive&gt; CREATE TABLE hbase_table(key int, value string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val") TBLPROPERTIES ("hbase.table.name" = "xyz");
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>   java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/MasterNotRunningException
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:266)
      at org.apache.hadoop.hive.ql.metadata.HiveUtils.getStorageHandler(HiveUtils.java:287)
      at org.apache.hadoop.hive.ql.metadata.Table.getStorageHandler(Table.java:281)
      at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3648)
      at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:256)
      at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:144)
      at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
      at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1355)
      at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1139)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:945)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:756)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.MasterNotRunningException
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      ... 21 more
  FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.DDLTask
  </code></pre>
  
  <p>I need to use the same versions of Hadoop, Hbase which I was using from beginning. But should be able to integrate Hive with Hbase without issues. Hope someone will help me solve my issue in this context.</p>