liuxiaocs7 commented on code in PR #7671:
URL: https://github.com/apache/hbase/pull/7671#discussion_r2754805751
##########
hbase-examples/src/main/python/thrift1/DemoClient.py:
##########
@@ -131,25 +123,25 @@ def demo_client(host, port, is_framed_transport):
try:
mutations = [Mutation(column="entry:foo", value=invalid)]
client.mutateRow(t, invalid, mutations, dummy_attributes)
- except ttypes.IOError, e:
- print 'expected exception: %s' %(e.message)
+ except ttypes.IOError as e:
+ print(f'expected exception: {e.message}')
# Run a scanner on the rows we just created
- print "Starting scanner..."
+ print("Starting scanner...")
scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes)
r = client.scannerGet(scanner)
while r:
printRow(r[0])
r = client.scannerGet(scanner)
- print "Scanner finished"
+ print("Scanner finished")
#
# Run some operations on a bunch of rows.
#
for e in range(100, 0, -1):
# format row keys as "00000" to "00100"
- row = "%0.5d" % (e)
+ row = f"{row:05}"
Review Comment:
Hi, @guluo2016, HBase-23644(https://github.com/apache/hbase/pull/7530)
depends on HBASE-29454 on branch-3, HBase-23644 will be backported after
HBASE-29454 in branch-3 and should fix this problem, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]