cd /home/hadoop/hbase-2.0.5/bin
[hadoop@master bin]$ hbase-daemon.sh start thrift2
vim /home/hadoop/hbase-2.0.5/logs/hbase-hadoop-thrift2-master.out
Caused by: java.net.BindException: 地址已在使用
netstat -ntlp | grep 9095
tcp6 0 0 :::9095 :::* LISTEN -
9091 外部端口(原9090被占用) 9096 内部通信端口(原9095被占用),若要重设端口hbase-daemon.sh start rest -p
[hadoop@master bin]$ hbase-daemon.sh start thrift2 -p 9091 --infoport 9096
[hadoop@master bin]$ jps
45123 NodeManager
98866 HMaster
43863 NameNode
72630 Jps
44459 SecondaryNameNode
44877 ResourceManager
70879 ThriftServer
https://www-us.apache.org/dist/hbase/2.0.5/hbase-2.0.5-src.tar.gz
cd /hbase-2.0.5/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2
thrift --gen c_glib hbase.thrift
[ryan@master thrift2]$ thrift --gen c_glib hbase.thrift
[ryan@master thrift2]$ ls
gen-c_glib hbase.thrift
[ryan@master gen-c_glib]$ ls
hbase_types.c hbase_types.h t_h_base_service.c t_h_base_service.h
Starting the HBase Thrift Server in the Background
Where is the service’s port, and is the port for the web-ui with information about the service, use the following command to start the HBase Thrift server in the background:
/usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift -p --infoport
Where is the service’s port, and is the port for the web-ui with information about the service, use the following command to start the HBase REST server in the background:
/usr/hdp/current/hbase-master/bin/
For additional information, see the Starting and Stopping the REST Server and Thrift API and Filter Language sections of Apache HBase Reference Guide.