開啟HBASE的thrift server,實現編程接口


 
 
說明:hbase的thriftserver默認已經編譯好,可以使用,不需要跟hadoop thrift一樣配置。
 

啟動thrift server

要使用Hbase的thrift接口,必須將它的服務啟動,命令行為:
    hbase-daemon.sh start thrift
 
thrift默認的監聽端口是9090,可以用netstat -nl | grep 9090看看該端口是否有服務。
 
 
 

針對性配置文件

vi  hbase-site.xml
  <property>
      <name>hbase.regionserver.thrift.framed</name>
     <value>true</value>
   </property>
   <property>
      <name> hbase.regionserver.thrift.compact</name>
      <value>true</value>
   </property>
 

實現連接

 
HBASE的python接口之參數指定
                conn = happybase.Connection(host="10.255.111.92",port=9090,protocol='compact',transport='framed')
 
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM