Skip to content

Commit

Permalink
[fix][tool] Using int instead of long in python scriptsc (apache#17215)
Browse files Browse the repository at this point in the history
  • Loading branch information
zymap authored Aug 23, 2022
1 parent 6dffa1d commit 8286e8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/pulsar-managed-ledger-admin
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def deleteMLLedgerIdsCommand(zk, mlPath, deleteLedgerIds):
deletLedgerIds = set(deleteLedgerIds.split(","))
deletLedgerIdSet = set()
for id in deletLedgerIds:
deletLedgerIdSet.add(long(id))
deletLedgerIdSet.add(int(id))
deleteLedgerIdsFromManagedLedgerInfo(zk, mlPath, deletLedgerIdSet)
else:
print('Usage: --command {} [--ledgerIds]'.format(deleteMlLedgerIds))
Expand Down Expand Up @@ -274,7 +274,7 @@ def updateMarkDeleteOfCursorCommand(zk, mlPath, cursorName, markDeletePosition):
if markDeletePosition:
positionPair = markDeletePosition.split(":")
if len(positionPair) == 2:
updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (long(positionPair[0])), long(positionPair[1]))
updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (int(positionPair[0])), int(positionPair[1]))
else:
print("markDeletePosition must be in format <ledger_id>:<entry_id>")
else:
Expand Down

0 comments on commit 8286e8c

Please sign in to comment.