You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/09/04 13:27:43 UTC
[pulsar] 02/02: [fix][tool] Using int instead of long in python scriptsc (#17215)
This is an automated email from the ASF dual-hosted git repository.
jianghaiting pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit a0cdf3faaa8a4150d2ffab998337dcd11abcf8be
Author: Yong Zhang <zh...@gmail.com>
AuthorDate: Tue Aug 23 18:57:17 2022 +0800
[fix][tool] Using int instead of long in python scriptsc (#17215)
(cherry picked from commit 8286e8ccb2e1433814c306607c6f218ca548752a)
---
bin/pulsar-managed-ledger-admin | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/pulsar-managed-ledger-admin b/bin/pulsar-managed-ledger-admin
index 9ed5d69bb13..dce85ce3246 100755
--- a/bin/pulsar-managed-ledger-admin
+++ b/bin/pulsar-managed-ledger-admin
@@ -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))
@@ -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: