You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/08/24 02:01:16 UTC

[pulsar] 01/04: [fix][tool] Using int instead of long in python scriptsc (#17215)

This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 345cd8c507b5fe962732d12fb8362e052d032368
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)
---
 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 abe7f7b034c..3357ec0713e 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: