<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HBase thrift python example in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189141#M61925</link>
    <description>&lt;P&gt;
	Hi,&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;regarding your first bunch of questions:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The answer depends on which distribution and versions you use or if you are using vanilla HBase. When you, e.g., install HDP 2.4, here is a guide to start the thrift server:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_installing_manually_book/content/ref-2a6efe32-d0e1-4e84-9068-4361b8c36dc8.1.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_installing_manually_book/content/ref-2a6efe32-d0e1-4e84-9068-4361b8c36dc8.1.html&lt;/A&gt;&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;regarding your last question:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; the error message indicates, that you don't have the thrift module installed, that you will need on the &lt;STRONG&gt;client side&lt;/STRONG&gt; to execute &lt;EM&gt;your&lt;/EM&gt; python program.&lt;/P&gt;&lt;P&gt;
	Depending on how you manage packages, e.g., using pip you would need to install the thrift module:&lt;/P&gt;&lt;PRE&gt;pip install thrift&lt;/PRE&gt;&lt;P&gt;Doing so, at least this error message will disappear.&lt;/P&gt;</description>
    <pubDate>Mon, 29 May 2017 12:56:14 GMT</pubDate>
    <dc:creator>StefanDunkler</dc:creator>
    <dc:date>2017-05-29T12:56:14Z</dc:date>
    <item>
      <title>HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189140#M61924</link>
      <description>&lt;P&gt;Hi, 
I've been successfully using HBase with java client for months, but now I would like to implement a python application to reach my data.
I've read several posts about thrift but cannot figure out something : 
I installed a standalone HBase instance on my linux VM, and it seems that I can execute thrift server directly with "hbase thrift start" command. Did I understand correctly ? Does HBase provide an embedded thrift server ?

All the posts I've read suggest to download an instance of thrift server and to compile it in order to generate language (python) specific bindings.
Can't I use the "embedded" thrift from hbase for that ? 

Does it mean that the downloaded &amp;amp; compiled thrift server will "only" be used to generate a few python packages that will be used by my application (but will not be launched itself) ?

After having processed with all steps from &lt;A href="https://acadgild.com/blog/connecting-hbase-with-python-application-using-thrift-server/" target="_blank"&gt;https://acadgild.com/blog/connecting-hbase-with-python-application-using-thrift-server/&lt;/A&gt;, when I try to execute table.py, I'm facing following error :
 &lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "table.py", line 1, in &amp;lt;module&amp;gt;
    from thrift.transport.TSocket import TSocket
ModuleNotFoundError: No module named 'thrift'&lt;/PRE&gt;&lt;P&gt;

I don't understand what I missed here...Should I install a thrift package for python somehow (in addition to my generated bindings) ?

Thanks for your help,
Regards,

Sebastien&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 15:10:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189140#M61924</guid>
      <dc:creator>schausson</dc:creator>
      <dc:date>2017-05-28T15:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189141#M61925</link>
      <description>&lt;P&gt;
	Hi,&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;regarding your first bunch of questions:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The answer depends on which distribution and versions you use or if you are using vanilla HBase. When you, e.g., install HDP 2.4, here is a guide to start the thrift server:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_installing_manually_book/content/ref-2a6efe32-d0e1-4e84-9068-4361b8c36dc8.1.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.3/bk_installing_manually_book/content/ref-2a6efe32-d0e1-4e84-9068-4361b8c36dc8.1.html&lt;/A&gt;&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;regarding your last question:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; the error message indicates, that you don't have the thrift module installed, that you will need on the &lt;STRONG&gt;client side&lt;/STRONG&gt; to execute &lt;EM&gt;your&lt;/EM&gt; python program.&lt;/P&gt;&lt;P&gt;
	Depending on how you manage packages, e.g., using pip you would need to install the thrift module:&lt;/P&gt;&lt;PRE&gt;pip install thrift&lt;/PRE&gt;&lt;P&gt;Doing so, at least this error message will disappear.&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 12:56:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189141#M61925</guid>
      <dc:creator>StefanDunkler</dc:creator>
      <dc:date>2017-05-29T12:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189142#M61926</link>
      <description>&lt;P&gt;Thanks for your help, I got rid with python error. &lt;/P&gt;&lt;P&gt;Anyway, I still cannot connect from my python client to hbase thrift server (about your question, I'm trying to use a vanilla HBase, without any other component), because I can see following error on server side :&lt;/P&gt;&lt;PRE&gt;2017-05-30 08:01:11,816 WARN  [thrift-worker-0-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connexion refusée
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-05-30 08:01:11,916 ERROR [thrift-worker-0] zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 4 attempts
2017-05-30 08:01:11,917 WARN  [thrift-worker-0] zookeeper.ZKUtil: hconnection-0x3330972d0x0, quorum=localhost:2181, baseZNode=/hbase Unable to set watcher on znode (/hbase/hbaseid)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045)
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:220)
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:419)
    at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
    at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
    at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:905)

&lt;/PRE&gt;&lt;P&gt;It seems that HBase is trying to reach zookeeper, but I didn't setup any zookeeper...Is it possible to run HBase without zookeeper ?&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 02:47:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189142#M61926</guid>
      <dc:creator>schausson</dc:creator>
      <dc:date>2017-05-31T02:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189143#M61927</link>
      <description>&lt;P&gt;In fact, was my fault : when my box went back from stand-bye mode, I had not restarted hbase ... It works now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 02:47:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189143#M61927</guid>
      <dc:creator>schausson</dc:creator>
      <dc:date>2017-05-31T02:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189144#M61928</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/13341/schausson.html" nodeid="13341"&gt;@Sebastien Chausson&lt;/A&gt;&lt;P&gt;Cool, glad to see that you got it up and running yourself! If my answer was helpful you can vote it up or mark it as best answer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 02:52:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189144#M61928</guid>
      <dc:creator>StefanDunkler</dc:creator>
      <dc:date>2017-05-31T02:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: HBase thrift python example</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189145#M61929</link>
      <description>&lt;P&gt;To answer your question regarding Zookeeper. HBase needs Zookeeper. If you didn't set up Zookeeper yourself, HBase spins up an "internal" Zookeeper server, which is great for testing, but shouldn't be used in production scenarios.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 03:25:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-thrift-python-example/m-p/189145#M61929</guid>
      <dc:creator>StefanDunkler</dc:creator>
      <dc:date>2017-05-31T03:25:12Z</dc:date>
    </item>
  </channel>
</rss>

