Skip to content

Commit 8286e8c

Browse files
authored
[fix][tool] Using int instead of long in python scriptsc (apache#17215)
1 parent 6dffa1d commit 8286e8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/pulsar-managed-ledger-admin

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def deleteMLLedgerIdsCommand(zk, mlPath, deleteLedgerIds):
244244
deletLedgerIds = set(deleteLedgerIds.split(","))
245245
deletLedgerIdSet = set()
246246
for id in deletLedgerIds:
247-
deletLedgerIdSet.add(long(id))
247+
deletLedgerIdSet.add(int(id))
248248
deleteLedgerIdsFromManagedLedgerInfo(zk, mlPath, deletLedgerIdSet)
249249
else:
250250
print('Usage: --command {} [--ledgerIds]'.format(deleteMlLedgerIds))
@@ -274,7 +274,7 @@ def updateMarkDeleteOfCursorCommand(zk, mlPath, cursorName, markDeletePosition):
274274
if markDeletePosition:
275275
positionPair = markDeletePosition.split(":")
276276
if len(positionPair) == 2:
277-
updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (long(positionPair[0])), long(positionPair[1]))
277+
updateCursorMarkDelete(zk, mlPath + "/" + cursorName, (int(positionPair[0])), int(positionPair[1]))
278278
else:
279279
print("markDeletePosition must be in format <ledger_id>:<entry_id>")
280280
else:

0 commit comments

Comments
 (0)