Skip to content

Commit

Permalink
HBASE-20395 Displaying thrift server type on the thrift page
Browse files Browse the repository at this point in the history
  • Loading branch information
guangxuCheng committed Nov 9, 2019
1 parent f58bd4a commit 6cf90fc
Show file tree
Hide file tree
Showing 71 changed files with 31,339 additions and 21,026 deletions.
7 changes: 6 additions & 1 deletion hbase-examples/src/main/python/thrift1/DemoClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from thrift import Thrift
from thrift.transport import TSocket, TTransport
from thrift.protocol import TBinaryProtocol
from hbase import ttypes
from hbase.ttypes import *
from hbase.Hbase import Client, ColumnDescriptor, Mutation

def printVersions(row, versions):
Expand Down Expand Up @@ -66,6 +66,11 @@ def demo_client(host, port, is_framed_transport):
# Connect!
transport.open()

# Check Thrift Server Type
serverType = client.getThriftServerType()
if serverType != TThriftServerType.ONE:
raise Exception("Mismatch between client and server, server type is %s" % serverType)

t = "demo_table"

#
Expand Down
Loading

0 comments on commit 6cf90fc

Please sign in to comment.