title: Read Data from HBase running on EMR Cluster with Spark installed on local machine
body: <p>I have HBase running on EMR cluster and I'm trying to access the tables on it with Spark from local machine.</p>
  <p>It seems that it connects to Zookeeper but can't find the table I'm looking for.</p>
  <p>Here is my code, <code>hbase-site.xml</code> and the messages I get.</p>
  <pre><code>package org.apache.spark.examples
  
      import org.apache.hadoop.fs.Path
      import org.apache.hadoop.hbase.HBaseConfiguration
      import org.apache.hadoop.hbase.client.HBaseAdmin
      import org.apache.hadoop.hbase.mapreduce.TableInputFormat
      import org.apache.spark._
      
      
      
      object HBaseTestEMR {
        def main(args: Array[String]) {
          val sparkConf = new SparkConf().setAppName(&quot;HBaseTest&quot;).setMaster(&quot;local[4]&quot;)
          val sc = new SparkContext(sparkConf)
      
          val conf = HBaseConfiguration.create()
       
          val table_name=&quot;empl&quot;
          conf.addResource(new Path(&quot;/home/spark/development/hbase/conf/hbase-site.xml&quot;))
          conf.set(TableInputFormat.INPUT_TABLE, table_name)
          
          println(&quot;-------------1&quot;)
          val admin = new HBaseAdmin(conf)
          //println(admin.listTables())
          println(&quot;-------------2&quot;)
          if (admin.isTableAvailable(table_name))  println(&quot;la table existe&quot;)
          else println(&quot;la table n'existe pas&quot;)
          println(&quot;-------------3&quot;)
      
      
          sc.stop()
      
        }
      }
  </code></pre>
  <p>hbase-site.xml</p>
  <pre><code>&lt;configuration&gt;
    &lt;property&gt;&lt;name&gt;fs.hdfs.impl&lt;/name&gt;&lt;value&gt;emr.hbase.fs.BlockableFileSystem&lt;/value&gt;&lt;/property&gt;
    &lt;property&gt;&lt;name&gt;hbase.regionserver.handler.count&lt;/name&gt;&lt;value&gt;100&lt;/value&gt;&lt;/property&gt;
    &lt;property&gt;&lt;name&gt;hbase.zookeeper.quorum&lt;/name&gt;&lt;value&gt;ec2-52-26-***-***.us-west-2.compute.amazonaws.com&lt;/value&gt;&lt;/property&gt;
    &lt;property&gt;&lt;name&gt;hbase.rootdir&lt;/name&gt;&lt;value&gt;hdfs://10.0.0.25:9000/hbase&lt;/value&gt;&lt;/property&gt;
    &lt;property&gt;&lt;name&gt;hbase.cluster.distributed&lt;/name&gt;&lt;value&gt;true&lt;/value&gt;&lt;/property&gt;
    &lt;property&gt;&lt;name&gt;hbase.tmp.dir&lt;/name&gt;&lt;value&gt;/mnt/var/lib/hbase/tmp-data&lt;/value&gt;&lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>and the message i get</p>
  <pre><code>15/06/10 12:00:28 INFO ZooKeeper: Client environment:java.io.tmpdir=/tmp
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:java.compiler=&lt;NA&gt;
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:os.name=Linux
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:os.arch=amd64
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:os.version=3.2.0-67-generic
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:user.name=spark
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:user.home=/home/spark
  15/06/10 12:00:28 INFO ZooKeeper: Client environment:user.dir=/home/spark/projetWordCount
  15/06/10 12:00:28 INFO ZooKeeper: Initiating client connection, connectString=ec2-52-26-***-***.us-west-2.compute.amazonaws.com:2181 sessionTimeout=90000 watcher=hconnection-0x7ecf3c090x0, quorum=ec2-52-26-***-***.us-west-2.compute.amazonaws.com:2181, baseZNode=/hbase
  15/06/10 12:00:28 INFO ClientCnxn: Opening socket connection to server ec2-52-26-***-***.us-west-2.compute.amazonaws.com/52.26.***.***:2181. Will not attempt to authenticate using SASL (unknown error)
  15/06/10 12:00:28 INFO ClientCnxn: Socket connection established to ec2-52-26-***-***.us-west-2.compute.amazonaws.com/52.26.***.***:2181, initiating session
  15/06/10 12:00:28 INFO ClientCnxn: Session establishment complete on server ec2-52-26-***-***.us-west-2.compute.amazonaws.com/52.26.***.***:2181, sessionid = 0x14ddc7d70ed0023, negotiated timeout = 90000
  -------------2
  </code></pre>
  <p>and then nothing happens</p>
  <p>so, is it possible to do what i want ? and what part of my configuration is wrong ?</p>