Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.1.0
Description
When I start Sentry, I noticed an exception on the console due to an illegal format string in LeaderStatusMonitor.toString()
java.util.IllegalFormatConversionException: d != java.util.concurrent.atomic.AtomicLong at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747) at java.util.Formatter.format(Formatter.java:2520) at java.util.Formatter.format(Formatter.java:2455) at java.lang.String.format(String.java:2940) at org.apache.sentry.provider.db.service.persistent.LeaderStatusMonitor.toString(LeaderStatusMonitor.java:282) at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:297) at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:269) at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:227) at org.slf4j.helpers.MessageFormatter.format(MessageFormatter.java:124) at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:322) at org.apache.sentry.provider.db.service.persistent.LeaderStatusMonitor.takeLeadership(LeaderStatusMonitor.java:251) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector$WrappedListener.takeLeadership(LeaderSelector.java:537) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector.doWork(LeaderSelector.java:399) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector.doWorkLoop(LeaderSelector.java:444) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector.access$100(LeaderSelector.java:64) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector$2.call(LeaderSelector.java:245) at sentry.org.apache.curator.framework.recipes.leader.LeaderSelector$2.call(LeaderSelector.java:239) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
Seems that the leaderCount=%d used in the String.format() is causing the issue.
Attachments
Attachments
Issue Links
- is broken by
-
SENTRY-2078 Have sentry server print an obvious INFO level log message when it becomes the writer
- Resolved
- is duplicated by
-
SENTRY-2176 IllegalFormatConversionException while trying to convert AtomicLong to int
- Resolved
- links to