[ 
https://issues.apache.org/jira/browse/HBASE-20395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440908#comment-16440908
 ] 

Sean Busbey commented on HBASE-20395:
-------------------------------------

{code}
diff --git a/hbase-examples/src/main/python/thrift2/DemoClient.py 
b/hbase-examples/src/main/python/thrift2/DemoClient.py
index 63719f0e0b..83ac6ecf10 100644
--- a/hbase-examples/src/main/python/thrift2/DemoClient.py
+++ b/hbase-examples/src/main/python/thrift2/DemoClient.py
@@ -61,6 +61,11 @@ client = THBaseService.Client(protocol)
 
 transport.open()
 
+# Check Thrift Server Type
+serverType = client.getThriftServerType()
+if serverType != 1:
+  raise Exception("Mismatch between client and server, server type is %s" 
%serverType)
+
 table = "example"
{code}

This should be checking for {{serverType != 2}}

> Displaying thrift server type on the thrift page
> ------------------------------------------------
>
>                 Key: HBASE-20395
>                 URL: https://issues.apache.org/jira/browse/HBASE-20395
>             Project: HBase
>          Issue Type: Improvement
>          Components: Thrift
>            Reporter: Guangxu Cheng
>            Assignee: Guangxu Cheng
>            Priority: Major
>         Attachments: HBASE-20395.master.001.patch, 
> HBASE-20395.master.002.patch, HBASE-20395.master.003.patch, 
> HBASE-20395.master.004.patch, result.png
>
>
> HBase supports two types of thrift server: thrift and thrift2.
> But after start the thrift server successfully, we can not get the thrift 
> server type conveniently. 
> So, displaying thrift server type on the thrift page may provide some 
> convenience for the users.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to