You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2019/12/22 17:48:02 UTC
[bookkeeper] branch branch-4.10 updated: Fixed bin/bookkeeper shell
readjournal
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-4.10
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.10 by this push:
new c8539c3 Fixed bin/bookkeeper shell readjournal
c8539c3 is described below
commit c8539c3fa5029a2eb72362b842c142043c1436e5
Author: Dapeng <42...@users.noreply.github.com>
AuthorDate: Mon Dec 23 01:47:22 2019 +0800
Fixed bin/bookkeeper shell readjournal
### Motivation
An error occurred while executing `bin/bookkeeper shell readjournal`,
![image](https://user-images.githubusercontent.com/42792537/70305222-d80d2300-183e-11ea-8759-88dfcc90b5be.png)
the journal file name is hexadecimal, but when readjournal is executed, the journal name is resolved in base 10
Reviewers: Enrico Olivelli <eo...@gmail.com>, Sijie Guo
This closes #2210 from SunDapeng1/branch-2208
(cherry picked from commit 2bbf58e0168df000db1712a84acaecf61d00c347)
Signed-off-by: Enrico Olivelli <eo...@apache.org>
---
.../apache/bookkeeper/tools/cli/commands/bookie/ReadJournalCommand.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadJournalCommand.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadJournalCommand.java
index 6729257..a61dd5a 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadJournalCommand.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadJournalCommand.java
@@ -156,7 +156,7 @@ public class ReadJournalCommand extends BookieCommand<ReadJournalCommand.ReadJou
return false;
}
String idString = name.split("\\.")[0];
- journalId = Long.parseLong(idString);
+ journalId = Long.parseLong(idString, 16);
}
scanJournal(journal, journalId, cmd.msg);
return true;